agent-transport-system 0.7.13 → 0.7.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ats-dev.js +2 -2
- package/dist/ats.js +32186 -33466
- package/dist/ats.js.map +1 -1
- package/dist/{daemon-runtime-lease-BWYGVA4a.js → daemon-runtime-lease-C1cET4lj.js} +1 -1
- package/dist/{lock-BeL3w4ma.js → lock-BbSDV7cL.js} +410 -600
- package/dist/lock-BbSDV7cL.js.map +1 -0
- package/dist/{runtime-config-BmPPPJcT.js → runtime-config-CudFeMaG.js} +6 -19
- package/dist/runtime-config-CudFeMaG.js.map +1 -0
- package/package.json +2 -2
- package/skills/ats-cli/SKILL.md +36 -1
- package/skills/ats-cli/playbooks/agent-onboarding.md +1 -1
- package/skills/ats-cli/references/commands.md +10 -0
- package/dist/lock-BeL3w4ma.js.map +0 -1
- package/dist/runtime-config-BmPPPJcT.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lock-BeL3w4ma.js","names":["initializer","util.jsonStringifyReplacer","core.$ZodAsyncError","util.finalizeIssue","core.config","parse","errors.$ZodRealError","parseAsync","errors.$ZodError","safeParse","safeParseAsync","encode","decode","encodeAsync","decodeAsync","safeEncode","safeDecode","safeEncodeAsync","safeDecodeAsync","duration","_emoji","date","time","datetime","string","number","boolean","_null","util.floatSafeRemainder","util.NUMBER_FORMAT_RANGES","regexes.integer","util.nullish","util.getLengthableOrigin","regexes.lowercase","regexes.uppercase","util.escapeRegex","util.aborted","core.$ZodAsyncError","safeParse","safeParseAsync","regexes.string","regexes.guid","regexes.uuid","regexes.email","regexes.emoji","regexes.nanoid","regexes.cuid","regexes.cuid2","regexes.ulid","regexes.xid","regexes.ksuid","regexes.datetime","regexes.date","regexes.time","regexes.duration","regexes.ipv4","regexes.ipv6","regexes.cidrv4","regexes.cidrv6","regexes.base64","regexes.base64url","regexes.e164","regexes.number","regexes.boolean","regexes.null","util.prefixIssues","util.optionalKeys","util.cached","isObject","util.isObject","util.esc","allowsEval","util.allowsEval","util.finalizeIssue","core.config","util.cleanRegex","util.isPlainObject","util.getEnumValues","util.escapeRegex","core.$ZodEncodeError","util.issue","util.normalizeParams","_null","checks.$ZodCheckLessThan","checks.$ZodCheckGreaterThan","checks.$ZodCheckMultipleOf","checks.$ZodCheckMaxLength","checks.$ZodCheckMinLength","checks.$ZodCheckLengthEquals","checks.$ZodCheckRegex","checks.$ZodCheckLowerCase","checks.$ZodCheckUpperCase","checks.$ZodCheckIncludes","checks.$ZodCheckStartsWith","checks.$ZodCheckEndsWith","checks.$ZodCheckOverwrite","util.slugify","issue","util.issue","checks.$ZodCheck","describe","meta","process","process","core._isoDateTime","core._isoDate","core._isoTime","core._isoDuration","core.formatError","core.flattenError","util.jsonStringifyReplacer","core.$constructor","parse","safeParse","util.mergeDefs","core.clone","parse.parse","parse.safeParse","parse.parseAsync","parse.safeParseAsync","parse.encode","parse.decode","parse.encodeAsync","parse.decodeAsync","parse.safeEncode","parse.safeDecode","parse.safeEncodeAsync","parse.safeDecodeAsync","checks.overwrite","processors.stringProcessor","checks.regex","checks.includes","checks.startsWith","checks.endsWith","checks.minLength","checks.maxLength","checks.length","checks.lowercase","checks.uppercase","checks.trim","checks.normalize","checks.toLowerCase","checks.toUpperCase","checks.slugify","core._email","core._url","core._jwt","core._emoji","core._guid","core._uuid","core._uuidv4","core._uuidv6","core._uuidv7","core._nanoid","core._cuid","core._cuid2","core._ulid","core._base64","core._base64url","core._xid","core._ksuid","core._ipv4","core._ipv6","core._cidrv4","core._cidrv6","core._e164","iso.datetime","iso.date","iso.time","iso.duration","core._string","processors.numberProcessor","checks.gt","checks.gte","checks.lt","checks.lte","checks.multipleOf","core._number","core._int","processors.booleanProcessor","core._boolean","processors.nullProcessor","core._null","processors.unknownProcessor","core._unknown","processors.neverProcessor","core._never","processors.arrayProcessor","core._array","processors.objectProcessor","util.extend","util.safeExtend","util.merge","util.pick","util.omit","util.partial","util.required","util.normalizeParams","processors.unionProcessor","processors.intersectionProcessor","processors.recordProcessor","processors.enumProcessor","processors.literalProcessor","processors.transformProcessor","core.$ZodEncodeError","issue","util.issue","processors.optionalProcessor","processors.nullableProcessor","processors.defaultProcessor","util.shallowClone","processors.prefaultProcessor","processors.nonoptionalProcessor","processors.catchProcessor","processors.pipeProcessor","processors.readonlyProcessor","processors.customProcessor","core._refine","core._superRefine","core.describe","core.meta","z.enum","trimmedNonEmptyStringSchema","z.string","z.strictObject","z.union","z.iso.datetime","z.preprocess","z.number","z.object","z.unknown","normalizeOptionalText","z.boolean","z.array","clientMessageIdSchema","z.literal","isoDateTimeSchema","ISO_DATE_TIME_SCHEMA$1","z.discriminatedUnion","z.null","ISO_DATE_TIME_SCHEMA","boundedIdentifierSchema$2","boundedIdentifierSchema$1","boundedNullableIdentifierSchema","boundedReasonCodeSchema$1","z.record","boundedIdentifierSchema","boundedReasonCodeSchema","z.int","z.enum","z.literal","z.strictObject","normalizeOptionalText","z.string","z.array","z.int","z.boolean","z.iso.datetime","z.union","z.null","z.discriminatedUnion","z.number","z.unknown","z.NEVER","z.preprocess","z.object","z.record","resolveLocksDir","process"],"sources":["../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/core.js","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/util.js","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/errors.js","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/parse.js","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/regexes.js","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/checks.js","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/doc.js","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/versions.js","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/schemas.js","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/registries.js","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/api.js","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/to-json-schema.js","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema-processors.js","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/iso.js","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/errors.js","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/parse.js","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/schemas.js","../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/compat.js","../../../packages/schemas/dist/daemon-hub-DecCVKaH.js","../../../packages/schemas/dist/entry-brief-BgrRW0ZT.js","../../../packages/schemas/dist/index.js","../src/config/session-profile.ts","../src/config/lock.ts"],"sourcesContent":["/** A special constant with type `never` */\nexport const NEVER = Object.freeze({\n status: \"aborted\",\n});\nexport /*@__NO_SIDE_EFFECTS__*/ function $constructor(name, initializer, params) {\n function init(inst, def) {\n if (!inst._zod) {\n Object.defineProperty(inst, \"_zod\", {\n value: {\n def,\n constr: _,\n traits: new Set(),\n },\n enumerable: false,\n });\n }\n if (inst._zod.traits.has(name)) {\n return;\n }\n inst._zod.traits.add(name);\n initializer(inst, def);\n // support prototype modifications\n const proto = _.prototype;\n const keys = Object.keys(proto);\n for (let i = 0; i < keys.length; i++) {\n const k = keys[i];\n if (!(k in inst)) {\n inst[k] = proto[k].bind(inst);\n }\n }\n }\n // doesn't work if Parent has a constructor with arguments\n const Parent = params?.Parent ?? Object;\n class Definition extends Parent {\n }\n Object.defineProperty(Definition, \"name\", { value: name });\n function _(def) {\n var _a;\n const inst = params?.Parent ? new Definition() : this;\n init(inst, def);\n (_a = inst._zod).deferred ?? (_a.deferred = []);\n for (const fn of inst._zod.deferred) {\n fn();\n }\n return inst;\n }\n Object.defineProperty(_, \"init\", { value: init });\n Object.defineProperty(_, Symbol.hasInstance, {\n value: (inst) => {\n if (params?.Parent && inst instanceof params.Parent)\n return true;\n return inst?._zod?.traits?.has(name);\n },\n });\n Object.defineProperty(_, \"name\", { value: name });\n return _;\n}\n////////////////////////////// UTILITIES ///////////////////////////////////////\nexport const $brand = Symbol(\"zod_brand\");\nexport class $ZodAsyncError extends Error {\n constructor() {\n super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);\n }\n}\nexport class $ZodEncodeError extends Error {\n constructor(name) {\n super(`Encountered unidirectional transform during encode: ${name}`);\n this.name = \"ZodEncodeError\";\n }\n}\nexport const globalConfig = {};\nexport function config(newConfig) {\n if (newConfig)\n Object.assign(globalConfig, newConfig);\n return globalConfig;\n}\n","// functions\nexport function assertEqual(val) {\n return val;\n}\nexport function assertNotEqual(val) {\n return val;\n}\nexport function assertIs(_arg) { }\nexport function assertNever(_x) {\n throw new Error(\"Unexpected value in exhaustive check\");\n}\nexport function assert(_) { }\nexport function getEnumValues(entries) {\n const numericValues = Object.values(entries).filter((v) => typeof v === \"number\");\n const values = Object.entries(entries)\n .filter(([k, _]) => numericValues.indexOf(+k) === -1)\n .map(([_, v]) => v);\n return values;\n}\nexport function joinValues(array, separator = \"|\") {\n return array.map((val) => stringifyPrimitive(val)).join(separator);\n}\nexport function jsonStringifyReplacer(_, value) {\n if (typeof value === \"bigint\")\n return value.toString();\n return value;\n}\nexport function cached(getter) {\n const set = false;\n return {\n get value() {\n if (!set) {\n const value = getter();\n Object.defineProperty(this, \"value\", { value });\n return value;\n }\n throw new Error(\"cached value already set\");\n },\n };\n}\nexport function nullish(input) {\n return input === null || input === undefined;\n}\nexport function cleanRegex(source) {\n const start = source.startsWith(\"^\") ? 1 : 0;\n const end = source.endsWith(\"$\") ? source.length - 1 : source.length;\n return source.slice(start, end);\n}\nexport function floatSafeRemainder(val, step) {\n const valDecCount = (val.toString().split(\".\")[1] || \"\").length;\n const stepString = step.toString();\n let stepDecCount = (stepString.split(\".\")[1] || \"\").length;\n if (stepDecCount === 0 && /\\d?e-\\d?/.test(stepString)) {\n const match = stepString.match(/\\d?e-(\\d?)/);\n if (match?.[1]) {\n stepDecCount = Number.parseInt(match[1]);\n }\n }\n const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;\n const valInt = Number.parseInt(val.toFixed(decCount).replace(\".\", \"\"));\n const stepInt = Number.parseInt(step.toFixed(decCount).replace(\".\", \"\"));\n return (valInt % stepInt) / 10 ** decCount;\n}\nconst EVALUATING = Symbol(\"evaluating\");\nexport function defineLazy(object, key, getter) {\n let value = undefined;\n Object.defineProperty(object, key, {\n get() {\n if (value === EVALUATING) {\n // Circular reference detected, return undefined to break the cycle\n return undefined;\n }\n if (value === undefined) {\n value = EVALUATING;\n value = getter();\n }\n return value;\n },\n set(v) {\n Object.defineProperty(object, key, {\n value: v,\n // configurable: true,\n });\n // object[key] = v;\n },\n configurable: true,\n });\n}\nexport function objectClone(obj) {\n return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj));\n}\nexport function assignProp(target, prop, value) {\n Object.defineProperty(target, prop, {\n value,\n writable: true,\n enumerable: true,\n configurable: true,\n });\n}\nexport function mergeDefs(...defs) {\n const mergedDescriptors = {};\n for (const def of defs) {\n const descriptors = Object.getOwnPropertyDescriptors(def);\n Object.assign(mergedDescriptors, descriptors);\n }\n return Object.defineProperties({}, mergedDescriptors);\n}\nexport function cloneDef(schema) {\n return mergeDefs(schema._zod.def);\n}\nexport function getElementAtPath(obj, path) {\n if (!path)\n return obj;\n return path.reduce((acc, key) => acc?.[key], obj);\n}\nexport function promiseAllObject(promisesObj) {\n const keys = Object.keys(promisesObj);\n const promises = keys.map((key) => promisesObj[key]);\n return Promise.all(promises).then((results) => {\n const resolvedObj = {};\n for (let i = 0; i < keys.length; i++) {\n resolvedObj[keys[i]] = results[i];\n }\n return resolvedObj;\n });\n}\nexport function randomString(length = 10) {\n const chars = \"abcdefghijklmnopqrstuvwxyz\";\n let str = \"\";\n for (let i = 0; i < length; i++) {\n str += chars[Math.floor(Math.random() * chars.length)];\n }\n return str;\n}\nexport function esc(str) {\n return JSON.stringify(str);\n}\nexport function slugify(input) {\n return input\n .toLowerCase()\n .trim()\n .replace(/[^\\w\\s-]/g, \"\")\n .replace(/[\\s_-]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\");\n}\nexport const captureStackTrace = (\"captureStackTrace\" in Error ? Error.captureStackTrace : (..._args) => { });\nexport function isObject(data) {\n return typeof data === \"object\" && data !== null && !Array.isArray(data);\n}\nexport const allowsEval = cached(() => {\n // @ts-ignore\n if (typeof navigator !== \"undefined\" && navigator?.userAgent?.includes(\"Cloudflare\")) {\n return false;\n }\n try {\n const F = Function;\n new F(\"\");\n return true;\n }\n catch (_) {\n return false;\n }\n});\nexport function isPlainObject(o) {\n if (isObject(o) === false)\n return false;\n // modified constructor\n const ctor = o.constructor;\n if (ctor === undefined)\n return true;\n if (typeof ctor !== \"function\")\n return true;\n // modified prototype\n const prot = ctor.prototype;\n if (isObject(prot) === false)\n return false;\n // ctor doesn't have static `isPrototypeOf`\n if (Object.prototype.hasOwnProperty.call(prot, \"isPrototypeOf\") === false) {\n return false;\n }\n return true;\n}\nexport function shallowClone(o) {\n if (isPlainObject(o))\n return { ...o };\n if (Array.isArray(o))\n return [...o];\n return o;\n}\nexport function numKeys(data) {\n let keyCount = 0;\n for (const key in data) {\n if (Object.prototype.hasOwnProperty.call(data, key)) {\n keyCount++;\n }\n }\n return keyCount;\n}\nexport const getParsedType = (data) => {\n const t = typeof data;\n switch (t) {\n case \"undefined\":\n return \"undefined\";\n case \"string\":\n return \"string\";\n case \"number\":\n return Number.isNaN(data) ? \"nan\" : \"number\";\n case \"boolean\":\n return \"boolean\";\n case \"function\":\n return \"function\";\n case \"bigint\":\n return \"bigint\";\n case \"symbol\":\n return \"symbol\";\n case \"object\":\n if (Array.isArray(data)) {\n return \"array\";\n }\n if (data === null) {\n return \"null\";\n }\n if (data.then && typeof data.then === \"function\" && data.catch && typeof data.catch === \"function\") {\n return \"promise\";\n }\n if (typeof Map !== \"undefined\" && data instanceof Map) {\n return \"map\";\n }\n if (typeof Set !== \"undefined\" && data instanceof Set) {\n return \"set\";\n }\n if (typeof Date !== \"undefined\" && data instanceof Date) {\n return \"date\";\n }\n // @ts-ignore\n if (typeof File !== \"undefined\" && data instanceof File) {\n return \"file\";\n }\n return \"object\";\n default:\n throw new Error(`Unknown data type: ${t}`);\n }\n};\nexport const propertyKeyTypes = new Set([\"string\", \"number\", \"symbol\"]);\nexport const primitiveTypes = new Set([\"string\", \"number\", \"bigint\", \"boolean\", \"symbol\", \"undefined\"]);\nexport function escapeRegex(str) {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n}\n// zod-specific utils\nexport function clone(inst, def, params) {\n const cl = new inst._zod.constr(def ?? inst._zod.def);\n if (!def || params?.parent)\n cl._zod.parent = inst;\n return cl;\n}\nexport function normalizeParams(_params) {\n const params = _params;\n if (!params)\n return {};\n if (typeof params === \"string\")\n return { error: () => params };\n if (params?.message !== undefined) {\n if (params?.error !== undefined)\n throw new Error(\"Cannot specify both `message` and `error` params\");\n params.error = params.message;\n }\n delete params.message;\n if (typeof params.error === \"string\")\n return { ...params, error: () => params.error };\n return params;\n}\nexport function createTransparentProxy(getter) {\n let target;\n return new Proxy({}, {\n get(_, prop, receiver) {\n target ?? (target = getter());\n return Reflect.get(target, prop, receiver);\n },\n set(_, prop, value, receiver) {\n target ?? (target = getter());\n return Reflect.set(target, prop, value, receiver);\n },\n has(_, prop) {\n target ?? (target = getter());\n return Reflect.has(target, prop);\n },\n deleteProperty(_, prop) {\n target ?? (target = getter());\n return Reflect.deleteProperty(target, prop);\n },\n ownKeys(_) {\n target ?? (target = getter());\n return Reflect.ownKeys(target);\n },\n getOwnPropertyDescriptor(_, prop) {\n target ?? (target = getter());\n return Reflect.getOwnPropertyDescriptor(target, prop);\n },\n defineProperty(_, prop, descriptor) {\n target ?? (target = getter());\n return Reflect.defineProperty(target, prop, descriptor);\n },\n });\n}\nexport function stringifyPrimitive(value) {\n if (typeof value === \"bigint\")\n return value.toString() + \"n\";\n if (typeof value === \"string\")\n return `\"${value}\"`;\n return `${value}`;\n}\nexport function optionalKeys(shape) {\n return Object.keys(shape).filter((k) => {\n return shape[k]._zod.optin === \"optional\" && shape[k]._zod.optout === \"optional\";\n });\n}\nexport const NUMBER_FORMAT_RANGES = {\n safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],\n int32: [-2147483648, 2147483647],\n uint32: [0, 4294967295],\n float32: [-3.4028234663852886e38, 3.4028234663852886e38],\n float64: [-Number.MAX_VALUE, Number.MAX_VALUE],\n};\nexport const BIGINT_FORMAT_RANGES = {\n int64: [/* @__PURE__*/ BigInt(\"-9223372036854775808\"), /* @__PURE__*/ BigInt(\"9223372036854775807\")],\n uint64: [/* @__PURE__*/ BigInt(0), /* @__PURE__*/ BigInt(\"18446744073709551615\")],\n};\nexport function pick(schema, mask) {\n const currDef = schema._zod.def;\n const checks = currDef.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n throw new Error(\".pick() cannot be used on object schemas containing refinements\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const newShape = {};\n for (const key in mask) {\n if (!(key in currDef.shape)) {\n throw new Error(`Unrecognized key: \"${key}\"`);\n }\n if (!mask[key])\n continue;\n newShape[key] = currDef.shape[key];\n }\n assignProp(this, \"shape\", newShape); // self-caching\n return newShape;\n },\n checks: [],\n });\n return clone(schema, def);\n}\nexport function omit(schema, mask) {\n const currDef = schema._zod.def;\n const checks = currDef.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n throw new Error(\".omit() cannot be used on object schemas containing refinements\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const newShape = { ...schema._zod.def.shape };\n for (const key in mask) {\n if (!(key in currDef.shape)) {\n throw new Error(`Unrecognized key: \"${key}\"`);\n }\n if (!mask[key])\n continue;\n delete newShape[key];\n }\n assignProp(this, \"shape\", newShape); // self-caching\n return newShape;\n },\n checks: [],\n });\n return clone(schema, def);\n}\nexport function extend(schema, shape) {\n if (!isPlainObject(shape)) {\n throw new Error(\"Invalid input to extend: expected a plain object\");\n }\n const checks = schema._zod.def.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n // Only throw if new shape overlaps with existing shape\n // Use getOwnPropertyDescriptor to check key existence without accessing values\n const existingShape = schema._zod.def.shape;\n for (const key in shape) {\n if (Object.getOwnPropertyDescriptor(existingShape, key) !== undefined) {\n throw new Error(\"Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.\");\n }\n }\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const _shape = { ...schema._zod.def.shape, ...shape };\n assignProp(this, \"shape\", _shape); // self-caching\n return _shape;\n },\n });\n return clone(schema, def);\n}\nexport function safeExtend(schema, shape) {\n if (!isPlainObject(shape)) {\n throw new Error(\"Invalid input to safeExtend: expected a plain object\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const _shape = { ...schema._zod.def.shape, ...shape };\n assignProp(this, \"shape\", _shape); // self-caching\n return _shape;\n },\n });\n return clone(schema, def);\n}\nexport function merge(a, b) {\n const def = mergeDefs(a._zod.def, {\n get shape() {\n const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };\n assignProp(this, \"shape\", _shape); // self-caching\n return _shape;\n },\n get catchall() {\n return b._zod.def.catchall;\n },\n checks: [], // delete existing checks\n });\n return clone(a, def);\n}\nexport function partial(Class, schema, mask) {\n const currDef = schema._zod.def;\n const checks = currDef.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n throw new Error(\".partial() cannot be used on object schemas containing refinements\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const oldShape = schema._zod.def.shape;\n const shape = { ...oldShape };\n if (mask) {\n for (const key in mask) {\n if (!(key in oldShape)) {\n throw new Error(`Unrecognized key: \"${key}\"`);\n }\n if (!mask[key])\n continue;\n // if (oldShape[key]!._zod.optin === \"optional\") continue;\n shape[key] = Class\n ? new Class({\n type: \"optional\",\n innerType: oldShape[key],\n })\n : oldShape[key];\n }\n }\n else {\n for (const key in oldShape) {\n // if (oldShape[key]!._zod.optin === \"optional\") continue;\n shape[key] = Class\n ? new Class({\n type: \"optional\",\n innerType: oldShape[key],\n })\n : oldShape[key];\n }\n }\n assignProp(this, \"shape\", shape); // self-caching\n return shape;\n },\n checks: [],\n });\n return clone(schema, def);\n}\nexport function required(Class, schema, mask) {\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const oldShape = schema._zod.def.shape;\n const shape = { ...oldShape };\n if (mask) {\n for (const key in mask) {\n if (!(key in shape)) {\n throw new Error(`Unrecognized key: \"${key}\"`);\n }\n if (!mask[key])\n continue;\n // overwrite with non-optional\n shape[key] = new Class({\n type: \"nonoptional\",\n innerType: oldShape[key],\n });\n }\n }\n else {\n for (const key in oldShape) {\n // overwrite with non-optional\n shape[key] = new Class({\n type: \"nonoptional\",\n innerType: oldShape[key],\n });\n }\n }\n assignProp(this, \"shape\", shape); // self-caching\n return shape;\n },\n });\n return clone(schema, def);\n}\n// invalid_type | too_big | too_small | invalid_format | not_multiple_of | unrecognized_keys | invalid_union | invalid_key | invalid_element | invalid_value | custom\nexport function aborted(x, startIndex = 0) {\n if (x.aborted === true)\n return true;\n for (let i = startIndex; i < x.issues.length; i++) {\n if (x.issues[i]?.continue !== true) {\n return true;\n }\n }\n return false;\n}\nexport function prefixIssues(path, issues) {\n return issues.map((iss) => {\n var _a;\n (_a = iss).path ?? (_a.path = []);\n iss.path.unshift(path);\n return iss;\n });\n}\nexport function unwrapMessage(message) {\n return typeof message === \"string\" ? message : message?.message;\n}\nexport function finalizeIssue(iss, ctx, config) {\n const full = { ...iss, path: iss.path ?? [] };\n // for backwards compatibility\n if (!iss.message) {\n const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ??\n unwrapMessage(ctx?.error?.(iss)) ??\n unwrapMessage(config.customError?.(iss)) ??\n unwrapMessage(config.localeError?.(iss)) ??\n \"Invalid input\";\n full.message = message;\n }\n // delete (full as any).def;\n delete full.inst;\n delete full.continue;\n if (!ctx?.reportInput) {\n delete full.input;\n }\n return full;\n}\nexport function getSizableOrigin(input) {\n if (input instanceof Set)\n return \"set\";\n if (input instanceof Map)\n return \"map\";\n // @ts-ignore\n if (input instanceof File)\n return \"file\";\n return \"unknown\";\n}\nexport function getLengthableOrigin(input) {\n if (Array.isArray(input))\n return \"array\";\n if (typeof input === \"string\")\n return \"string\";\n return \"unknown\";\n}\nexport function parsedType(data) {\n const t = typeof data;\n switch (t) {\n case \"number\": {\n return Number.isNaN(data) ? \"nan\" : \"number\";\n }\n case \"object\": {\n if (data === null) {\n return \"null\";\n }\n if (Array.isArray(data)) {\n return \"array\";\n }\n const obj = data;\n if (obj && Object.getPrototypeOf(obj) !== Object.prototype && \"constructor\" in obj && obj.constructor) {\n return obj.constructor.name;\n }\n }\n }\n return t;\n}\nexport function issue(...args) {\n const [iss, input, inst] = args;\n if (typeof iss === \"string\") {\n return {\n message: iss,\n code: \"custom\",\n input,\n inst,\n };\n }\n return { ...iss };\n}\nexport function cleanEnum(obj) {\n return Object.entries(obj)\n .filter(([k, _]) => {\n // return true if NaN, meaning it's not a number, thus a string key\n return Number.isNaN(Number.parseInt(k, 10));\n })\n .map((el) => el[1]);\n}\n// Codec utility functions\nexport function base64ToUint8Array(base64) {\n const binaryString = atob(base64);\n const bytes = new Uint8Array(binaryString.length);\n for (let i = 0; i < binaryString.length; i++) {\n bytes[i] = binaryString.charCodeAt(i);\n }\n return bytes;\n}\nexport function uint8ArrayToBase64(bytes) {\n let binaryString = \"\";\n for (let i = 0; i < bytes.length; i++) {\n binaryString += String.fromCharCode(bytes[i]);\n }\n return btoa(binaryString);\n}\nexport function base64urlToUint8Array(base64url) {\n const base64 = base64url.replace(/-/g, \"+\").replace(/_/g, \"/\");\n const padding = \"=\".repeat((4 - (base64.length % 4)) % 4);\n return base64ToUint8Array(base64 + padding);\n}\nexport function uint8ArrayToBase64url(bytes) {\n return uint8ArrayToBase64(bytes).replace(/\\+/g, \"-\").replace(/\\//g, \"_\").replace(/=/g, \"\");\n}\nexport function hexToUint8Array(hex) {\n const cleanHex = hex.replace(/^0x/, \"\");\n if (cleanHex.length % 2 !== 0) {\n throw new Error(\"Invalid hex string length\");\n }\n const bytes = new Uint8Array(cleanHex.length / 2);\n for (let i = 0; i < cleanHex.length; i += 2) {\n bytes[i / 2] = Number.parseInt(cleanHex.slice(i, i + 2), 16);\n }\n return bytes;\n}\nexport function uint8ArrayToHex(bytes) {\n return Array.from(bytes)\n .map((b) => b.toString(16).padStart(2, \"0\"))\n .join(\"\");\n}\n// instanceof\nexport class Class {\n constructor(..._args) { }\n}\n","import { $constructor } from \"./core.js\";\nimport * as util from \"./util.js\";\nconst initializer = (inst, def) => {\n inst.name = \"$ZodError\";\n Object.defineProperty(inst, \"_zod\", {\n value: inst._zod,\n enumerable: false,\n });\n Object.defineProperty(inst, \"issues\", {\n value: def,\n enumerable: false,\n });\n inst.message = JSON.stringify(def, util.jsonStringifyReplacer, 2);\n Object.defineProperty(inst, \"toString\", {\n value: () => inst.message,\n enumerable: false,\n });\n};\nexport const $ZodError = $constructor(\"$ZodError\", initializer);\nexport const $ZodRealError = $constructor(\"$ZodError\", initializer, { Parent: Error });\nexport function flattenError(error, mapper = (issue) => issue.message) {\n const fieldErrors = {};\n const formErrors = [];\n for (const sub of error.issues) {\n if (sub.path.length > 0) {\n fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];\n fieldErrors[sub.path[0]].push(mapper(sub));\n }\n else {\n formErrors.push(mapper(sub));\n }\n }\n return { formErrors, fieldErrors };\n}\nexport function formatError(error, mapper = (issue) => issue.message) {\n const fieldErrors = { _errors: [] };\n const processError = (error) => {\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\" && issue.errors.length) {\n issue.errors.map((issues) => processError({ issues }));\n }\n else if (issue.code === \"invalid_key\") {\n processError({ issues: issue.issues });\n }\n else if (issue.code === \"invalid_element\") {\n processError({ issues: issue.issues });\n }\n else if (issue.path.length === 0) {\n fieldErrors._errors.push(mapper(issue));\n }\n else {\n let curr = fieldErrors;\n let i = 0;\n while (i < issue.path.length) {\n const el = issue.path[i];\n const terminal = i === issue.path.length - 1;\n if (!terminal) {\n curr[el] = curr[el] || { _errors: [] };\n }\n else {\n curr[el] = curr[el] || { _errors: [] };\n curr[el]._errors.push(mapper(issue));\n }\n curr = curr[el];\n i++;\n }\n }\n }\n };\n processError(error);\n return fieldErrors;\n}\nexport function treeifyError(error, mapper = (issue) => issue.message) {\n const result = { errors: [] };\n const processError = (error, path = []) => {\n var _a, _b;\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\" && issue.errors.length) {\n // regular union error\n issue.errors.map((issues) => processError({ issues }, issue.path));\n }\n else if (issue.code === \"invalid_key\") {\n processError({ issues: issue.issues }, issue.path);\n }\n else if (issue.code === \"invalid_element\") {\n processError({ issues: issue.issues }, issue.path);\n }\n else {\n const fullpath = [...path, ...issue.path];\n if (fullpath.length === 0) {\n result.errors.push(mapper(issue));\n continue;\n }\n let curr = result;\n let i = 0;\n while (i < fullpath.length) {\n const el = fullpath[i];\n const terminal = i === fullpath.length - 1;\n if (typeof el === \"string\") {\n curr.properties ?? (curr.properties = {});\n (_a = curr.properties)[el] ?? (_a[el] = { errors: [] });\n curr = curr.properties[el];\n }\n else {\n curr.items ?? (curr.items = []);\n (_b = curr.items)[el] ?? (_b[el] = { errors: [] });\n curr = curr.items[el];\n }\n if (terminal) {\n curr.errors.push(mapper(issue));\n }\n i++;\n }\n }\n }\n };\n processError(error);\n return result;\n}\n/** Format a ZodError as a human-readable string in the following form.\n *\n * From\n *\n * ```ts\n * ZodError {\n * issues: [\n * {\n * expected: 'string',\n * code: 'invalid_type',\n * path: [ 'username' ],\n * message: 'Invalid input: expected string'\n * },\n * {\n * expected: 'number',\n * code: 'invalid_type',\n * path: [ 'favoriteNumbers', 1 ],\n * message: 'Invalid input: expected number'\n * }\n * ];\n * }\n * ```\n *\n * to\n *\n * ```\n * username\n * ✖ Expected number, received string at \"username\n * favoriteNumbers[0]\n * ✖ Invalid input: expected number\n * ```\n */\nexport function toDotPath(_path) {\n const segs = [];\n const path = _path.map((seg) => (typeof seg === \"object\" ? seg.key : seg));\n for (const seg of path) {\n if (typeof seg === \"number\")\n segs.push(`[${seg}]`);\n else if (typeof seg === \"symbol\")\n segs.push(`[${JSON.stringify(String(seg))}]`);\n else if (/[^\\w$]/.test(seg))\n segs.push(`[${JSON.stringify(seg)}]`);\n else {\n if (segs.length)\n segs.push(\".\");\n segs.push(seg);\n }\n }\n return segs.join(\"\");\n}\nexport function prettifyError(error) {\n const lines = [];\n // sort by path length\n const issues = [...error.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);\n // Process each issue\n for (const issue of issues) {\n lines.push(`✖ ${issue.message}`);\n if (issue.path?.length)\n lines.push(` → at ${toDotPath(issue.path)}`);\n }\n // Convert Map to formatted string\n return lines.join(\"\\n\");\n}\n","import * as core from \"./core.js\";\nimport * as errors from \"./errors.js\";\nimport * as util from \"./util.js\";\nexport const _parse = (_Err) => (schema, value, _ctx, _params) => {\n const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };\n const result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise) {\n throw new core.$ZodAsyncError();\n }\n if (result.issues.length) {\n const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())));\n util.captureStackTrace(e, _params?.callee);\n throw e;\n }\n return result.value;\n};\nexport const parse = /* @__PURE__*/ _parse(errors.$ZodRealError);\nexport const _parseAsync = (_Err) => async (schema, value, _ctx, params) => {\n const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };\n let result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise)\n result = await result;\n if (result.issues.length) {\n const e = new (params?.Err ?? _Err)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())));\n util.captureStackTrace(e, params?.callee);\n throw e;\n }\n return result.value;\n};\nexport const parseAsync = /* @__PURE__*/ _parseAsync(errors.$ZodRealError);\nexport const _safeParse = (_Err) => (schema, value, _ctx) => {\n const ctx = _ctx ? { ..._ctx, async: false } : { async: false };\n const result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise) {\n throw new core.$ZodAsyncError();\n }\n return result.issues.length\n ? {\n success: false,\n error: new (_Err ?? errors.$ZodError)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n }\n : { success: true, data: result.value };\n};\nexport const safeParse = /* @__PURE__*/ _safeParse(errors.$ZodRealError);\nexport const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {\n const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };\n let result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise)\n result = await result;\n return result.issues.length\n ? {\n success: false,\n error: new _Err(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n }\n : { success: true, data: result.value };\n};\nexport const safeParseAsync = /* @__PURE__*/ _safeParseAsync(errors.$ZodRealError);\nexport const _encode = (_Err) => (schema, value, _ctx) => {\n const ctx = _ctx ? Object.assign(_ctx, { direction: \"backward\" }) : { direction: \"backward\" };\n return _parse(_Err)(schema, value, ctx);\n};\nexport const encode = /* @__PURE__*/ _encode(errors.$ZodRealError);\nexport const _decode = (_Err) => (schema, value, _ctx) => {\n return _parse(_Err)(schema, value, _ctx);\n};\nexport const decode = /* @__PURE__*/ _decode(errors.$ZodRealError);\nexport const _encodeAsync = (_Err) => async (schema, value, _ctx) => {\n const ctx = _ctx ? Object.assign(_ctx, { direction: \"backward\" }) : { direction: \"backward\" };\n return _parseAsync(_Err)(schema, value, ctx);\n};\nexport const encodeAsync = /* @__PURE__*/ _encodeAsync(errors.$ZodRealError);\nexport const _decodeAsync = (_Err) => async (schema, value, _ctx) => {\n return _parseAsync(_Err)(schema, value, _ctx);\n};\nexport const decodeAsync = /* @__PURE__*/ _decodeAsync(errors.$ZodRealError);\nexport const _safeEncode = (_Err) => (schema, value, _ctx) => {\n const ctx = _ctx ? Object.assign(_ctx, { direction: \"backward\" }) : { direction: \"backward\" };\n return _safeParse(_Err)(schema, value, ctx);\n};\nexport const safeEncode = /* @__PURE__*/ _safeEncode(errors.$ZodRealError);\nexport const _safeDecode = (_Err) => (schema, value, _ctx) => {\n return _safeParse(_Err)(schema, value, _ctx);\n};\nexport const safeDecode = /* @__PURE__*/ _safeDecode(errors.$ZodRealError);\nexport const _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {\n const ctx = _ctx ? Object.assign(_ctx, { direction: \"backward\" }) : { direction: \"backward\" };\n return _safeParseAsync(_Err)(schema, value, ctx);\n};\nexport const safeEncodeAsync = /* @__PURE__*/ _safeEncodeAsync(errors.$ZodRealError);\nexport const _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {\n return _safeParseAsync(_Err)(schema, value, _ctx);\n};\nexport const safeDecodeAsync = /* @__PURE__*/ _safeDecodeAsync(errors.$ZodRealError);\n","import * as util from \"./util.js\";\nexport const cuid = /^[cC][^\\s-]{8,}$/;\nexport const cuid2 = /^[0-9a-z]+$/;\nexport const ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;\nexport const xid = /^[0-9a-vA-V]{20}$/;\nexport const ksuid = /^[A-Za-z0-9]{27}$/;\nexport const nanoid = /^[a-zA-Z0-9_-]{21}$/;\n/** ISO 8601-1 duration regex. Does not support the 8601-2 extensions like negative durations or fractional/negative components. */\nexport const duration = /^P(?:(\\d+W)|(?!.*W)(?=\\d|T\\d)(\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+([.,]\\d+)?S)?)?)$/;\n/** Implements ISO 8601-2 extensions like explicit +- prefixes, mixing weeks with other units, and fractional/negative components. */\nexport const extendedDuration = /^[-+]?P(?!$)(?:(?:[-+]?\\d+Y)|(?:[-+]?\\d+[.,]\\d+Y$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:(?:[-+]?\\d+W)|(?:[-+]?\\d+[.,]\\d+W$))?(?:(?:[-+]?\\d+D)|(?:[-+]?\\d+[.,]\\d+D$))?(?:T(?=[\\d+-])(?:(?:[-+]?\\d+H)|(?:[-+]?\\d+[.,]\\d+H$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:[-+]?\\d+(?:[.,]\\d+)?S)?)??$/;\n/** A regex for any UUID-like identifier: 8-4-4-4-12 hex pattern */\nexport const guid = /^([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})$/;\n/** Returns a regex for validating an RFC 9562/4122 UUID.\n *\n * @param version Optionally specify a version 1-8. If no version is specified, all versions are supported. */\nexport const uuid = (version) => {\n if (!version)\n return /^([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)$/;\n return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);\n};\nexport const uuid4 = /*@__PURE__*/ uuid(4);\nexport const uuid6 = /*@__PURE__*/ uuid(6);\nexport const uuid7 = /*@__PURE__*/ uuid(7);\n/** Practical email validation */\nexport const email = /^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$/;\n/** Equivalent to the HTML5 input[type=email] validation implemented by browsers. Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/email */\nexport const html5Email = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n/** The classic emailregex.com regex for RFC 5322-compliant emails */\nexport const rfc5322Email = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n/** A loose regex that allows Unicode characters, enforces length limits, and that's about it. */\nexport const unicodeEmail = /^[^\\s@\"]{1,64}@[^\\s@]{1,255}$/u;\nexport const idnEmail = unicodeEmail;\nexport const browserEmail = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n// from https://thekevinscott.com/emojis-in-javascript/#writing-a-regular-expression\nconst _emoji = `^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$`;\nexport function emoji() {\n return new RegExp(_emoji, \"u\");\n}\nexport const ipv4 = /^(?:(?: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])$/;\nexport const ipv6 = /^(([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}|:))$/;\nexport const mac = (delimiter) => {\n const escapedDelim = util.escapeRegex(delimiter ?? \":\");\n return new RegExp(`^(?:[0-9A-F]{2}${escapedDelim}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${escapedDelim}){5}[0-9a-f]{2}$`);\n};\nexport const cidrv4 = /^((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])$/;\nexport const cidrv6 = /^(([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])$/;\n// https://stackoverflow.com/questions/7860392/determine-if-string-is-in-base64-using-javascript\nexport const base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;\nexport const base64url = /^[A-Za-z0-9_-]*$/;\n// based on https://stackoverflow.com/questions/106179/regular-expression-to-match-dns-hostname-or-ip-address\n// export const hostname: RegExp = /^([a-zA-Z0-9-]+\\.)*[a-zA-Z0-9-]+$/;\nexport const hostname = /^(?=.{1,253}\\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\\.?$/;\nexport const domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,}$/;\n// https://blog.stevenlevithan.com/archives/validate-phone-number#r4-3 (regex sans spaces)\n// E.164: leading digit must be 1-9; total digits (excluding '+') between 7-15\nexport const e164 = /^\\+[1-9]\\d{6,14}$/;\n// const dateSource = `((\\\\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])))`;\nconst dateSource = `(?:(?:\\\\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])))`;\nexport const date = /*@__PURE__*/ new RegExp(`^${dateSource}$`);\nfunction timeSource(args) {\n const hhmm = `(?:[01]\\\\d|2[0-3]):[0-5]\\\\d`;\n const regex = typeof args.precision === \"number\"\n ? args.precision === -1\n ? `${hhmm}`\n : args.precision === 0\n ? `${hhmm}:[0-5]\\\\d`\n : `${hhmm}:[0-5]\\\\d\\\\.\\\\d{${args.precision}}`\n : `${hhmm}(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?`;\n return regex;\n}\nexport function time(args) {\n return new RegExp(`^${timeSource(args)}$`);\n}\n// Adapted from https://stackoverflow.com/a/3143231\nexport function datetime(args) {\n const time = timeSource({ precision: args.precision });\n const opts = [\"Z\"];\n if (args.local)\n opts.push(\"\");\n // if (args.offset) opts.push(`([+-]\\\\d{2}:\\\\d{2})`);\n if (args.offset)\n opts.push(`([+-](?:[01]\\\\d|2[0-3]):[0-5]\\\\d)`);\n const timeRegex = `${time}(?:${opts.join(\"|\")})`;\n return new RegExp(`^${dateSource}T(?:${timeRegex})$`);\n}\nexport const string = (params) => {\n const regex = params ? `[\\\\s\\\\S]{${params?.minimum ?? 0},${params?.maximum ?? \"\"}}` : `[\\\\s\\\\S]*`;\n return new RegExp(`^${regex}$`);\n};\nexport const bigint = /^-?\\d+n?$/;\nexport const integer = /^-?\\d+$/;\nexport const number = /^-?\\d+(?:\\.\\d+)?$/;\nexport const boolean = /^(?:true|false)$/i;\nconst _null = /^null$/i;\nexport { _null as null };\nconst _undefined = /^undefined$/i;\nexport { _undefined as undefined };\n// regex for string with no uppercase letters\nexport const lowercase = /^[^A-Z]*$/;\n// regex for string with no lowercase letters\nexport const uppercase = /^[^a-z]*$/;\n// regex for hexadecimal strings (any length)\nexport const hex = /^[0-9a-fA-F]*$/;\n// Hash regexes for different algorithms and encodings\n// Helper function to create base64 regex with exact length and padding\nfunction fixedBase64(bodyLength, padding) {\n return new RegExp(`^[A-Za-z0-9+/]{${bodyLength}}${padding}$`);\n}\n// Helper function to create base64url regex with exact length (no padding)\nfunction fixedBase64url(length) {\n return new RegExp(`^[A-Za-z0-9_-]{${length}}$`);\n}\n// MD5 (16 bytes): base64 = 24 chars total (22 + \"==\")\nexport const md5_hex = /^[0-9a-fA-F]{32}$/;\nexport const md5_base64 = /*@__PURE__*/ fixedBase64(22, \"==\");\nexport const md5_base64url = /*@__PURE__*/ fixedBase64url(22);\n// SHA1 (20 bytes): base64 = 28 chars total (27 + \"=\")\nexport const sha1_hex = /^[0-9a-fA-F]{40}$/;\nexport const sha1_base64 = /*@__PURE__*/ fixedBase64(27, \"=\");\nexport const sha1_base64url = /*@__PURE__*/ fixedBase64url(27);\n// SHA256 (32 bytes): base64 = 44 chars total (43 + \"=\")\nexport const sha256_hex = /^[0-9a-fA-F]{64}$/;\nexport const sha256_base64 = /*@__PURE__*/ fixedBase64(43, \"=\");\nexport const sha256_base64url = /*@__PURE__*/ fixedBase64url(43);\n// SHA384 (48 bytes): base64 = 64 chars total (no padding)\nexport const sha384_hex = /^[0-9a-fA-F]{96}$/;\nexport const sha384_base64 = /*@__PURE__*/ fixedBase64(64, \"\");\nexport const sha384_base64url = /*@__PURE__*/ fixedBase64url(64);\n// SHA512 (64 bytes): base64 = 88 chars total (86 + \"==\")\nexport const sha512_hex = /^[0-9a-fA-F]{128}$/;\nexport const sha512_base64 = /*@__PURE__*/ fixedBase64(86, \"==\");\nexport const sha512_base64url = /*@__PURE__*/ fixedBase64url(86);\n","// import { $ZodType } from \"./schemas.js\";\nimport * as core from \"./core.js\";\nimport * as regexes from \"./regexes.js\";\nimport * as util from \"./util.js\";\nexport const $ZodCheck = /*@__PURE__*/ core.$constructor(\"$ZodCheck\", (inst, def) => {\n var _a;\n inst._zod ?? (inst._zod = {});\n inst._zod.def = def;\n (_a = inst._zod).onattach ?? (_a.onattach = []);\n});\nconst numericOriginMap = {\n number: \"number\",\n bigint: \"bigint\",\n object: \"date\",\n};\nexport const $ZodCheckLessThan = /*@__PURE__*/ core.$constructor(\"$ZodCheckLessThan\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const origin = numericOriginMap[typeof def.value];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;\n if (def.value < curr) {\n if (def.inclusive)\n bag.maximum = def.value;\n else\n bag.exclusiveMaximum = def.value;\n }\n });\n inst._zod.check = (payload) => {\n if (def.inclusive ? payload.value <= def.value : payload.value < def.value) {\n return;\n }\n payload.issues.push({\n origin,\n code: \"too_big\",\n maximum: typeof def.value === \"object\" ? def.value.getTime() : def.value,\n input: payload.value,\n inclusive: def.inclusive,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckGreaterThan = /*@__PURE__*/ core.$constructor(\"$ZodCheckGreaterThan\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const origin = numericOriginMap[typeof def.value];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;\n if (def.value > curr) {\n if (def.inclusive)\n bag.minimum = def.value;\n else\n bag.exclusiveMinimum = def.value;\n }\n });\n inst._zod.check = (payload) => {\n if (def.inclusive ? payload.value >= def.value : payload.value > def.value) {\n return;\n }\n payload.issues.push({\n origin,\n code: \"too_small\",\n minimum: typeof def.value === \"object\" ? def.value.getTime() : def.value,\n input: payload.value,\n inclusive: def.inclusive,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMultipleOf = \n/*@__PURE__*/ core.$constructor(\"$ZodCheckMultipleOf\", (inst, def) => {\n $ZodCheck.init(inst, def);\n inst._zod.onattach.push((inst) => {\n var _a;\n (_a = inst._zod.bag).multipleOf ?? (_a.multipleOf = def.value);\n });\n inst._zod.check = (payload) => {\n if (typeof payload.value !== typeof def.value)\n throw new Error(\"Cannot mix number and bigint in multiple_of check.\");\n const isMultiple = typeof payload.value === \"bigint\"\n ? payload.value % def.value === BigInt(0)\n : util.floatSafeRemainder(payload.value, def.value) === 0;\n if (isMultiple)\n return;\n payload.issues.push({\n origin: typeof payload.value,\n code: \"not_multiple_of\",\n divisor: def.value,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckNumberFormat = /*@__PURE__*/ core.$constructor(\"$ZodCheckNumberFormat\", (inst, def) => {\n $ZodCheck.init(inst, def); // no format checks\n def.format = def.format || \"float64\";\n const isInt = def.format?.includes(\"int\");\n const origin = isInt ? \"int\" : \"number\";\n const [minimum, maximum] = util.NUMBER_FORMAT_RANGES[def.format];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.format = def.format;\n bag.minimum = minimum;\n bag.maximum = maximum;\n if (isInt)\n bag.pattern = regexes.integer;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n if (isInt) {\n if (!Number.isInteger(input)) {\n // invalid_format issue\n // payload.issues.push({\n // expected: def.format,\n // format: def.format,\n // code: \"invalid_format\",\n // input,\n // inst,\n // });\n // invalid_type issue\n payload.issues.push({\n expected: origin,\n format: def.format,\n code: \"invalid_type\",\n continue: false,\n input,\n inst,\n });\n return;\n // not_multiple_of issue\n // payload.issues.push({\n // code: \"not_multiple_of\",\n // origin: \"number\",\n // input,\n // inst,\n // divisor: 1,\n // });\n }\n if (!Number.isSafeInteger(input)) {\n if (input > 0) {\n // too_big\n payload.issues.push({\n input,\n code: \"too_big\",\n maximum: Number.MAX_SAFE_INTEGER,\n note: \"Integers must be within the safe integer range.\",\n inst,\n origin,\n inclusive: true,\n continue: !def.abort,\n });\n }\n else {\n // too_small\n payload.issues.push({\n input,\n code: \"too_small\",\n minimum: Number.MIN_SAFE_INTEGER,\n note: \"Integers must be within the safe integer range.\",\n inst,\n origin,\n inclusive: true,\n continue: !def.abort,\n });\n }\n return;\n }\n }\n if (input < minimum) {\n payload.issues.push({\n origin: \"number\",\n input,\n code: \"too_small\",\n minimum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n if (input > maximum) {\n payload.issues.push({\n origin: \"number\",\n input,\n code: \"too_big\",\n maximum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodCheckBigIntFormat = /*@__PURE__*/ core.$constructor(\"$ZodCheckBigIntFormat\", (inst, def) => {\n $ZodCheck.init(inst, def); // no format checks\n const [minimum, maximum] = util.BIGINT_FORMAT_RANGES[def.format];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.format = def.format;\n bag.minimum = minimum;\n bag.maximum = maximum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n if (input < minimum) {\n payload.issues.push({\n origin: \"bigint\",\n input,\n code: \"too_small\",\n minimum: minimum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n if (input > maximum) {\n payload.issues.push({\n origin: \"bigint\",\n input,\n code: \"too_big\",\n maximum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodCheckMaxSize = /*@__PURE__*/ core.$constructor(\"$ZodCheckMaxSize\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.size !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.maximum ?? Number.POSITIVE_INFINITY);\n if (def.maximum < curr)\n inst._zod.bag.maximum = def.maximum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const size = input.size;\n if (size <= def.maximum)\n return;\n payload.issues.push({\n origin: util.getSizableOrigin(input),\n code: \"too_big\",\n maximum: def.maximum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMinSize = /*@__PURE__*/ core.$constructor(\"$ZodCheckMinSize\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.size !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.minimum ?? Number.NEGATIVE_INFINITY);\n if (def.minimum > curr)\n inst._zod.bag.minimum = def.minimum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const size = input.size;\n if (size >= def.minimum)\n return;\n payload.issues.push({\n origin: util.getSizableOrigin(input),\n code: \"too_small\",\n minimum: def.minimum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckSizeEquals = /*@__PURE__*/ core.$constructor(\"$ZodCheckSizeEquals\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.size !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.minimum = def.size;\n bag.maximum = def.size;\n bag.size = def.size;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const size = input.size;\n if (size === def.size)\n return;\n const tooBig = size > def.size;\n payload.issues.push({\n origin: util.getSizableOrigin(input),\n ...(tooBig ? { code: \"too_big\", maximum: def.size } : { code: \"too_small\", minimum: def.size }),\n inclusive: true,\n exact: true,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMaxLength = /*@__PURE__*/ core.$constructor(\"$ZodCheckMaxLength\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.length !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.maximum ?? Number.POSITIVE_INFINITY);\n if (def.maximum < curr)\n inst._zod.bag.maximum = def.maximum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const length = input.length;\n if (length <= def.maximum)\n return;\n const origin = util.getLengthableOrigin(input);\n payload.issues.push({\n origin,\n code: \"too_big\",\n maximum: def.maximum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMinLength = /*@__PURE__*/ core.$constructor(\"$ZodCheckMinLength\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.length !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.minimum ?? Number.NEGATIVE_INFINITY);\n if (def.minimum > curr)\n inst._zod.bag.minimum = def.minimum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const length = input.length;\n if (length >= def.minimum)\n return;\n const origin = util.getLengthableOrigin(input);\n payload.issues.push({\n origin,\n code: \"too_small\",\n minimum: def.minimum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckLengthEquals = /*@__PURE__*/ core.$constructor(\"$ZodCheckLengthEquals\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.length !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.minimum = def.length;\n bag.maximum = def.length;\n bag.length = def.length;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const length = input.length;\n if (length === def.length)\n return;\n const origin = util.getLengthableOrigin(input);\n const tooBig = length > def.length;\n payload.issues.push({\n origin,\n ...(tooBig ? { code: \"too_big\", maximum: def.length } : { code: \"too_small\", minimum: def.length }),\n inclusive: true,\n exact: true,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckStringFormat = /*@__PURE__*/ core.$constructor(\"$ZodCheckStringFormat\", (inst, def) => {\n var _a, _b;\n $ZodCheck.init(inst, def);\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.format = def.format;\n if (def.pattern) {\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(def.pattern);\n }\n });\n if (def.pattern)\n (_a = inst._zod).check ?? (_a.check = (payload) => {\n def.pattern.lastIndex = 0;\n if (def.pattern.test(payload.value))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: def.format,\n input: payload.value,\n ...(def.pattern ? { pattern: def.pattern.toString() } : {}),\n inst,\n continue: !def.abort,\n });\n });\n else\n (_b = inst._zod).check ?? (_b.check = () => { });\n});\nexport const $ZodCheckRegex = /*@__PURE__*/ core.$constructor(\"$ZodCheckRegex\", (inst, def) => {\n $ZodCheckStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n def.pattern.lastIndex = 0;\n if (def.pattern.test(payload.value))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"regex\",\n input: payload.value,\n pattern: def.pattern.toString(),\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckLowerCase = /*@__PURE__*/ core.$constructor(\"$ZodCheckLowerCase\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.lowercase);\n $ZodCheckStringFormat.init(inst, def);\n});\nexport const $ZodCheckUpperCase = /*@__PURE__*/ core.$constructor(\"$ZodCheckUpperCase\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.uppercase);\n $ZodCheckStringFormat.init(inst, def);\n});\nexport const $ZodCheckIncludes = /*@__PURE__*/ core.$constructor(\"$ZodCheckIncludes\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const escapedRegex = util.escapeRegex(def.includes);\n const pattern = new RegExp(typeof def.position === \"number\" ? `^.{${def.position}}${escapedRegex}` : escapedRegex);\n def.pattern = pattern;\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(pattern);\n });\n inst._zod.check = (payload) => {\n if (payload.value.includes(def.includes, def.position))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"includes\",\n includes: def.includes,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckStartsWith = /*@__PURE__*/ core.$constructor(\"$ZodCheckStartsWith\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const pattern = new RegExp(`^${util.escapeRegex(def.prefix)}.*`);\n def.pattern ?? (def.pattern = pattern);\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(pattern);\n });\n inst._zod.check = (payload) => {\n if (payload.value.startsWith(def.prefix))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"starts_with\",\n prefix: def.prefix,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckEndsWith = /*@__PURE__*/ core.$constructor(\"$ZodCheckEndsWith\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const pattern = new RegExp(`.*${util.escapeRegex(def.suffix)}$`);\n def.pattern ?? (def.pattern = pattern);\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(pattern);\n });\n inst._zod.check = (payload) => {\n if (payload.value.endsWith(def.suffix))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"ends_with\",\n suffix: def.suffix,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\n///////////////////////////////////\n///// $ZodCheckProperty /////\n///////////////////////////////////\nfunction handleCheckPropertyResult(result, payload, property) {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(property, result.issues));\n }\n}\nexport const $ZodCheckProperty = /*@__PURE__*/ core.$constructor(\"$ZodCheckProperty\", (inst, def) => {\n $ZodCheck.init(inst, def);\n inst._zod.check = (payload) => {\n const result = def.schema._zod.run({\n value: payload.value[def.property],\n issues: [],\n }, {});\n if (result instanceof Promise) {\n return result.then((result) => handleCheckPropertyResult(result, payload, def.property));\n }\n handleCheckPropertyResult(result, payload, def.property);\n return;\n };\n});\nexport const $ZodCheckMimeType = /*@__PURE__*/ core.$constructor(\"$ZodCheckMimeType\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const mimeSet = new Set(def.mime);\n inst._zod.onattach.push((inst) => {\n inst._zod.bag.mime = def.mime;\n });\n inst._zod.check = (payload) => {\n if (mimeSet.has(payload.value.type))\n return;\n payload.issues.push({\n code: \"invalid_value\",\n values: def.mime,\n input: payload.value.type,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckOverwrite = /*@__PURE__*/ core.$constructor(\"$ZodCheckOverwrite\", (inst, def) => {\n $ZodCheck.init(inst, def);\n inst._zod.check = (payload) => {\n payload.value = def.tx(payload.value);\n };\n});\n","export class Doc {\n constructor(args = []) {\n this.content = [];\n this.indent = 0;\n if (this)\n this.args = args;\n }\n indented(fn) {\n this.indent += 1;\n fn(this);\n this.indent -= 1;\n }\n write(arg) {\n if (typeof arg === \"function\") {\n arg(this, { execution: \"sync\" });\n arg(this, { execution: \"async\" });\n return;\n }\n const content = arg;\n const lines = content.split(\"\\n\").filter((x) => x);\n const minIndent = Math.min(...lines.map((x) => x.length - x.trimStart().length));\n const dedented = lines.map((x) => x.slice(minIndent)).map((x) => \" \".repeat(this.indent * 2) + x);\n for (const line of dedented) {\n this.content.push(line);\n }\n }\n compile() {\n const F = Function;\n const args = this?.args;\n const content = this?.content ?? [``];\n const lines = [...content.map((x) => ` ${x}`)];\n // console.log(lines.join(\"\\n\"));\n return new F(...args, lines.join(\"\\n\"));\n }\n}\n","export const version = {\n major: 4,\n minor: 3,\n patch: 6,\n};\n","import * as checks from \"./checks.js\";\nimport * as core from \"./core.js\";\nimport { Doc } from \"./doc.js\";\nimport { parse, parseAsync, safeParse, safeParseAsync } from \"./parse.js\";\nimport * as regexes from \"./regexes.js\";\nimport * as util from \"./util.js\";\nimport { version } from \"./versions.js\";\nexport const $ZodType = /*@__PURE__*/ core.$constructor(\"$ZodType\", (inst, def) => {\n var _a;\n inst ?? (inst = {});\n inst._zod.def = def; // set _def property\n inst._zod.bag = inst._zod.bag || {}; // initialize _bag object\n inst._zod.version = version;\n const checks = [...(inst._zod.def.checks ?? [])];\n // if inst is itself a checks.$ZodCheck, run it as a check\n if (inst._zod.traits.has(\"$ZodCheck\")) {\n checks.unshift(inst);\n }\n for (const ch of checks) {\n for (const fn of ch._zod.onattach) {\n fn(inst);\n }\n }\n if (checks.length === 0) {\n // deferred initializer\n // inst._zod.parse is not yet defined\n (_a = inst._zod).deferred ?? (_a.deferred = []);\n inst._zod.deferred?.push(() => {\n inst._zod.run = inst._zod.parse;\n });\n }\n else {\n const runChecks = (payload, checks, ctx) => {\n let isAborted = util.aborted(payload);\n let asyncResult;\n for (const ch of checks) {\n if (ch._zod.def.when) {\n const shouldRun = ch._zod.def.when(payload);\n if (!shouldRun)\n continue;\n }\n else if (isAborted) {\n continue;\n }\n const currLen = payload.issues.length;\n const _ = ch._zod.check(payload);\n if (_ instanceof Promise && ctx?.async === false) {\n throw new core.$ZodAsyncError();\n }\n if (asyncResult || _ instanceof Promise) {\n asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {\n await _;\n const nextLen = payload.issues.length;\n if (nextLen === currLen)\n return;\n if (!isAborted)\n isAborted = util.aborted(payload, currLen);\n });\n }\n else {\n const nextLen = payload.issues.length;\n if (nextLen === currLen)\n continue;\n if (!isAborted)\n isAborted = util.aborted(payload, currLen);\n }\n }\n if (asyncResult) {\n return asyncResult.then(() => {\n return payload;\n });\n }\n return payload;\n };\n const handleCanaryResult = (canary, payload, ctx) => {\n // abort if the canary is aborted\n if (util.aborted(canary)) {\n canary.aborted = true;\n return canary;\n }\n // run checks first, then\n const checkResult = runChecks(payload, checks, ctx);\n if (checkResult instanceof Promise) {\n if (ctx.async === false)\n throw new core.$ZodAsyncError();\n return checkResult.then((checkResult) => inst._zod.parse(checkResult, ctx));\n }\n return inst._zod.parse(checkResult, ctx);\n };\n inst._zod.run = (payload, ctx) => {\n if (ctx.skipChecks) {\n return inst._zod.parse(payload, ctx);\n }\n if (ctx.direction === \"backward\") {\n // run canary\n // initial pass (no checks)\n const canary = inst._zod.parse({ value: payload.value, issues: [] }, { ...ctx, skipChecks: true });\n if (canary instanceof Promise) {\n return canary.then((canary) => {\n return handleCanaryResult(canary, payload, ctx);\n });\n }\n return handleCanaryResult(canary, payload, ctx);\n }\n // forward\n const result = inst._zod.parse(payload, ctx);\n if (result instanceof Promise) {\n if (ctx.async === false)\n throw new core.$ZodAsyncError();\n return result.then((result) => runChecks(result, checks, ctx));\n }\n return runChecks(result, checks, ctx);\n };\n }\n // Lazy initialize ~standard to avoid creating objects for every schema\n util.defineLazy(inst, \"~standard\", () => ({\n validate: (value) => {\n try {\n const r = safeParse(inst, value);\n return r.success ? { value: r.data } : { issues: r.error?.issues };\n }\n catch (_) {\n return safeParseAsync(inst, value).then((r) => (r.success ? { value: r.data } : { issues: r.error?.issues }));\n }\n },\n vendor: \"zod\",\n version: 1,\n }));\n});\nexport { clone } from \"./util.js\";\nexport const $ZodString = /*@__PURE__*/ core.$constructor(\"$ZodString\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = [...(inst?._zod.bag?.patterns ?? [])].pop() ?? regexes.string(inst._zod.bag);\n inst._zod.parse = (payload, _) => {\n if (def.coerce)\n try {\n payload.value = String(payload.value);\n }\n catch (_) { }\n if (typeof payload.value === \"string\")\n return payload;\n payload.issues.push({\n expected: \"string\",\n code: \"invalid_type\",\n input: payload.value,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodStringFormat = /*@__PURE__*/ core.$constructor(\"$ZodStringFormat\", (inst, def) => {\n // check initialization must come first\n checks.$ZodCheckStringFormat.init(inst, def);\n $ZodString.init(inst, def);\n});\nexport const $ZodGUID = /*@__PURE__*/ core.$constructor(\"$ZodGUID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.guid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodUUID = /*@__PURE__*/ core.$constructor(\"$ZodUUID\", (inst, def) => {\n if (def.version) {\n const versionMap = {\n v1: 1,\n v2: 2,\n v3: 3,\n v4: 4,\n v5: 5,\n v6: 6,\n v7: 7,\n v8: 8,\n };\n const v = versionMap[def.version];\n if (v === undefined)\n throw new Error(`Invalid UUID version: \"${def.version}\"`);\n def.pattern ?? (def.pattern = regexes.uuid(v));\n }\n else\n def.pattern ?? (def.pattern = regexes.uuid());\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodEmail = /*@__PURE__*/ core.$constructor(\"$ZodEmail\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.email);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodURL = /*@__PURE__*/ core.$constructor(\"$ZodURL\", (inst, def) => {\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n try {\n // Trim whitespace from input\n const trimmed = payload.value.trim();\n // @ts-ignore\n const url = new URL(trimmed);\n if (def.hostname) {\n def.hostname.lastIndex = 0;\n if (!def.hostname.test(url.hostname)) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"url\",\n note: \"Invalid hostname\",\n pattern: def.hostname.source,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n }\n if (def.protocol) {\n def.protocol.lastIndex = 0;\n if (!def.protocol.test(url.protocol.endsWith(\":\") ? url.protocol.slice(0, -1) : url.protocol)) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"url\",\n note: \"Invalid protocol\",\n pattern: def.protocol.source,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n }\n // Set the output value based on normalize flag\n if (def.normalize) {\n // Use normalized URL\n payload.value = url.href;\n }\n else {\n // Preserve the original input (trimmed)\n payload.value = trimmed;\n }\n return;\n }\n catch (_) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"url\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodEmoji = /*@__PURE__*/ core.$constructor(\"$ZodEmoji\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.emoji());\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodNanoID = /*@__PURE__*/ core.$constructor(\"$ZodNanoID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.nanoid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodCUID = /*@__PURE__*/ core.$constructor(\"$ZodCUID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cuid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodCUID2 = /*@__PURE__*/ core.$constructor(\"$ZodCUID2\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cuid2);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodULID = /*@__PURE__*/ core.$constructor(\"$ZodULID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ulid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodXID = /*@__PURE__*/ core.$constructor(\"$ZodXID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.xid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodKSUID = /*@__PURE__*/ core.$constructor(\"$ZodKSUID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ksuid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISODateTime = /*@__PURE__*/ core.$constructor(\"$ZodISODateTime\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.datetime(def));\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISODate = /*@__PURE__*/ core.$constructor(\"$ZodISODate\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.date);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISOTime = /*@__PURE__*/ core.$constructor(\"$ZodISOTime\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.time(def));\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISODuration = /*@__PURE__*/ core.$constructor(\"$ZodISODuration\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.duration);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodIPv4 = /*@__PURE__*/ core.$constructor(\"$ZodIPv4\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ipv4);\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.format = `ipv4`;\n});\nexport const $ZodIPv6 = /*@__PURE__*/ core.$constructor(\"$ZodIPv6\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ipv6);\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.format = `ipv6`;\n inst._zod.check = (payload) => {\n try {\n // @ts-ignore\n new URL(`http://[${payload.value}]`);\n // return;\n }\n catch {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"ipv6\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodMAC = /*@__PURE__*/ core.$constructor(\"$ZodMAC\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.mac(def.delimiter));\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.format = `mac`;\n});\nexport const $ZodCIDRv4 = /*@__PURE__*/ core.$constructor(\"$ZodCIDRv4\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cidrv4);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodCIDRv6 = /*@__PURE__*/ core.$constructor(\"$ZodCIDRv6\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cidrv6); // not used for validation\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n const parts = payload.value.split(\"/\");\n try {\n if (parts.length !== 2)\n throw new Error();\n const [address, prefix] = parts;\n if (!prefix)\n throw new Error();\n const prefixNum = Number(prefix);\n if (`${prefixNum}` !== prefix)\n throw new Error();\n if (prefixNum < 0 || prefixNum > 128)\n throw new Error();\n // @ts-ignore\n new URL(`http://[${address}]`);\n }\n catch {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"cidrv6\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\n////////////////////////////// ZodBase64 //////////////////////////////\nexport function isValidBase64(data) {\n if (data === \"\")\n return true;\n if (data.length % 4 !== 0)\n return false;\n try {\n // @ts-ignore\n atob(data);\n return true;\n }\n catch {\n return false;\n }\n}\nexport const $ZodBase64 = /*@__PURE__*/ core.$constructor(\"$ZodBase64\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.base64);\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.contentEncoding = \"base64\";\n inst._zod.check = (payload) => {\n if (isValidBase64(payload.value))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: \"base64\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\n////////////////////////////// ZodBase64 //////////////////////////////\nexport function isValidBase64URL(data) {\n if (!regexes.base64url.test(data))\n return false;\n const base64 = data.replace(/[-_]/g, (c) => (c === \"-\" ? \"+\" : \"/\"));\n const padded = base64.padEnd(Math.ceil(base64.length / 4) * 4, \"=\");\n return isValidBase64(padded);\n}\nexport const $ZodBase64URL = /*@__PURE__*/ core.$constructor(\"$ZodBase64URL\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.base64url);\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.contentEncoding = \"base64url\";\n inst._zod.check = (payload) => {\n if (isValidBase64URL(payload.value))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: \"base64url\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodE164 = /*@__PURE__*/ core.$constructor(\"$ZodE164\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.e164);\n $ZodStringFormat.init(inst, def);\n});\n////////////////////////////// ZodJWT //////////////////////////////\nexport function isValidJWT(token, algorithm = null) {\n try {\n const tokensParts = token.split(\".\");\n if (tokensParts.length !== 3)\n return false;\n const [header] = tokensParts;\n if (!header)\n return false;\n // @ts-ignore\n const parsedHeader = JSON.parse(atob(header));\n if (\"typ\" in parsedHeader && parsedHeader?.typ !== \"JWT\")\n return false;\n if (!parsedHeader.alg)\n return false;\n if (algorithm && (!(\"alg\" in parsedHeader) || parsedHeader.alg !== algorithm))\n return false;\n return true;\n }\n catch {\n return false;\n }\n}\nexport const $ZodJWT = /*@__PURE__*/ core.$constructor(\"$ZodJWT\", (inst, def) => {\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n if (isValidJWT(payload.value, def.alg))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: \"jwt\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCustomStringFormat = /*@__PURE__*/ core.$constructor(\"$ZodCustomStringFormat\", (inst, def) => {\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n if (def.fn(payload.value))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: def.format,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodNumber = /*@__PURE__*/ core.$constructor(\"$ZodNumber\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = inst._zod.bag.pattern ?? regexes.number;\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce)\n try {\n payload.value = Number(payload.value);\n }\n catch (_) { }\n const input = payload.value;\n if (typeof input === \"number\" && !Number.isNaN(input) && Number.isFinite(input)) {\n return payload;\n }\n const received = typeof input === \"number\"\n ? Number.isNaN(input)\n ? \"NaN\"\n : !Number.isFinite(input)\n ? \"Infinity\"\n : undefined\n : undefined;\n payload.issues.push({\n expected: \"number\",\n code: \"invalid_type\",\n input,\n inst,\n ...(received ? { received } : {}),\n });\n return payload;\n };\n});\nexport const $ZodNumberFormat = /*@__PURE__*/ core.$constructor(\"$ZodNumberFormat\", (inst, def) => {\n checks.$ZodCheckNumberFormat.init(inst, def);\n $ZodNumber.init(inst, def); // no format checks\n});\nexport const $ZodBoolean = /*@__PURE__*/ core.$constructor(\"$ZodBoolean\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.boolean;\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce)\n try {\n payload.value = Boolean(payload.value);\n }\n catch (_) { }\n const input = payload.value;\n if (typeof input === \"boolean\")\n return payload;\n payload.issues.push({\n expected: \"boolean\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodBigInt = /*@__PURE__*/ core.$constructor(\"$ZodBigInt\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.bigint;\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce)\n try {\n payload.value = BigInt(payload.value);\n }\n catch (_) { }\n if (typeof payload.value === \"bigint\")\n return payload;\n payload.issues.push({\n expected: \"bigint\",\n code: \"invalid_type\",\n input: payload.value,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodBigIntFormat = /*@__PURE__*/ core.$constructor(\"$ZodBigIntFormat\", (inst, def) => {\n checks.$ZodCheckBigIntFormat.init(inst, def);\n $ZodBigInt.init(inst, def); // no format checks\n});\nexport const $ZodSymbol = /*@__PURE__*/ core.$constructor(\"$ZodSymbol\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (typeof input === \"symbol\")\n return payload;\n payload.issues.push({\n expected: \"symbol\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodUndefined = /*@__PURE__*/ core.$constructor(\"$ZodUndefined\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.undefined;\n inst._zod.values = new Set([undefined]);\n inst._zod.optin = \"optional\";\n inst._zod.optout = \"optional\";\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (typeof input === \"undefined\")\n return payload;\n payload.issues.push({\n expected: \"undefined\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodNull = /*@__PURE__*/ core.$constructor(\"$ZodNull\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.null;\n inst._zod.values = new Set([null]);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (input === null)\n return payload;\n payload.issues.push({\n expected: \"null\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodAny = /*@__PURE__*/ core.$constructor(\"$ZodAny\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload) => payload;\n});\nexport const $ZodUnknown = /*@__PURE__*/ core.$constructor(\"$ZodUnknown\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload) => payload;\n});\nexport const $ZodNever = /*@__PURE__*/ core.$constructor(\"$ZodNever\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n payload.issues.push({\n expected: \"never\",\n code: \"invalid_type\",\n input: payload.value,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodVoid = /*@__PURE__*/ core.$constructor(\"$ZodVoid\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (typeof input === \"undefined\")\n return payload;\n payload.issues.push({\n expected: \"void\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodDate = /*@__PURE__*/ core.$constructor(\"$ZodDate\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce) {\n try {\n payload.value = new Date(payload.value);\n }\n catch (_err) { }\n }\n const input = payload.value;\n const isDate = input instanceof Date;\n const isValidDate = isDate && !Number.isNaN(input.getTime());\n if (isValidDate)\n return payload;\n payload.issues.push({\n expected: \"date\",\n code: \"invalid_type\",\n input,\n ...(isDate ? { received: \"Invalid Date\" } : {}),\n inst,\n });\n return payload;\n };\n});\nfunction handleArrayResult(result, final, index) {\n if (result.issues.length) {\n final.issues.push(...util.prefixIssues(index, result.issues));\n }\n final.value[index] = result.value;\n}\nexport const $ZodArray = /*@__PURE__*/ core.$constructor(\"$ZodArray\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!Array.isArray(input)) {\n payload.issues.push({\n expected: \"array\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n payload.value = Array(input.length);\n const proms = [];\n for (let i = 0; i < input.length; i++) {\n const item = input[i];\n const result = def.element._zod.run({\n value: item,\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => handleArrayResult(result, payload, i)));\n }\n else {\n handleArrayResult(result, payload, i);\n }\n }\n if (proms.length) {\n return Promise.all(proms).then(() => payload);\n }\n return payload; //handleArrayResultsAsync(parseResults, final);\n };\n});\nfunction handlePropertyResult(result, final, key, input, isOptionalOut) {\n if (result.issues.length) {\n // For optional-out schemas, ignore errors on absent keys\n if (isOptionalOut && !(key in input)) {\n return;\n }\n final.issues.push(...util.prefixIssues(key, result.issues));\n }\n if (result.value === undefined) {\n if (key in input) {\n final.value[key] = undefined;\n }\n }\n else {\n final.value[key] = result.value;\n }\n}\nfunction normalizeDef(def) {\n const keys = Object.keys(def.shape);\n for (const k of keys) {\n if (!def.shape?.[k]?._zod?.traits?.has(\"$ZodType\")) {\n throw new Error(`Invalid element at key \"${k}\": expected a Zod schema`);\n }\n }\n const okeys = util.optionalKeys(def.shape);\n return {\n ...def,\n keys,\n keySet: new Set(keys),\n numKeys: keys.length,\n optionalKeys: new Set(okeys),\n };\n}\nfunction handleCatchall(proms, input, payload, ctx, def, inst) {\n const unrecognized = [];\n // iterate over input keys\n const keySet = def.keySet;\n const _catchall = def.catchall._zod;\n const t = _catchall.def.type;\n const isOptionalOut = _catchall.optout === \"optional\";\n for (const key in input) {\n if (keySet.has(key))\n continue;\n if (t === \"never\") {\n unrecognized.push(key);\n continue;\n }\n const r = _catchall.run({ value: input[key], issues: [] }, ctx);\n if (r instanceof Promise) {\n proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, isOptionalOut)));\n }\n else {\n handlePropertyResult(r, payload, key, input, isOptionalOut);\n }\n }\n if (unrecognized.length) {\n payload.issues.push({\n code: \"unrecognized_keys\",\n keys: unrecognized,\n input,\n inst,\n });\n }\n if (!proms.length)\n return payload;\n return Promise.all(proms).then(() => {\n return payload;\n });\n}\nexport const $ZodObject = /*@__PURE__*/ core.$constructor(\"$ZodObject\", (inst, def) => {\n // requires cast because technically $ZodObject doesn't extend\n $ZodType.init(inst, def);\n // const sh = def.shape;\n const desc = Object.getOwnPropertyDescriptor(def, \"shape\");\n if (!desc?.get) {\n const sh = def.shape;\n Object.defineProperty(def, \"shape\", {\n get: () => {\n const newSh = { ...sh };\n Object.defineProperty(def, \"shape\", {\n value: newSh,\n });\n return newSh;\n },\n });\n }\n const _normalized = util.cached(() => normalizeDef(def));\n util.defineLazy(inst._zod, \"propValues\", () => {\n const shape = def.shape;\n const propValues = {};\n for (const key in shape) {\n const field = shape[key]._zod;\n if (field.values) {\n propValues[key] ?? (propValues[key] = new Set());\n for (const v of field.values)\n propValues[key].add(v);\n }\n }\n return propValues;\n });\n const isObject = util.isObject;\n const catchall = def.catchall;\n let value;\n inst._zod.parse = (payload, ctx) => {\n value ?? (value = _normalized.value);\n const input = payload.value;\n if (!isObject(input)) {\n payload.issues.push({\n expected: \"object\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n payload.value = {};\n const proms = [];\n const shape = value.shape;\n for (const key of value.keys) {\n const el = shape[key];\n const isOptionalOut = el._zod.optout === \"optional\";\n const r = el._zod.run({ value: input[key], issues: [] }, ctx);\n if (r instanceof Promise) {\n proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, isOptionalOut)));\n }\n else {\n handlePropertyResult(r, payload, key, input, isOptionalOut);\n }\n }\n if (!catchall) {\n return proms.length ? Promise.all(proms).then(() => payload) : payload;\n }\n return handleCatchall(proms, input, payload, ctx, _normalized.value, inst);\n };\n});\nexport const $ZodObjectJIT = /*@__PURE__*/ core.$constructor(\"$ZodObjectJIT\", (inst, def) => {\n // requires cast because technically $ZodObject doesn't extend\n $ZodObject.init(inst, def);\n const superParse = inst._zod.parse;\n const _normalized = util.cached(() => normalizeDef(def));\n const generateFastpass = (shape) => {\n const doc = new Doc([\"shape\", \"payload\", \"ctx\"]);\n const normalized = _normalized.value;\n const parseStr = (key) => {\n const k = util.esc(key);\n return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;\n };\n doc.write(`const input = payload.value;`);\n const ids = Object.create(null);\n let counter = 0;\n for (const key of normalized.keys) {\n ids[key] = `key_${counter++}`;\n }\n // A: preserve key order {\n doc.write(`const newResult = {};`);\n for (const key of normalized.keys) {\n const id = ids[key];\n const k = util.esc(key);\n const schema = shape[key];\n const isOptionalOut = schema?._zod?.optout === \"optional\";\n doc.write(`const ${id} = ${parseStr(key)};`);\n if (isOptionalOut) {\n // For optional-out schemas, ignore errors on absent keys\n doc.write(`\n if (${id}.issues.length) {\n if (${k} in input) {\n payload.issues = payload.issues.concat(${id}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${k}, ...iss.path] : [${k}]\n })));\n }\n }\n \n if (${id}.value === undefined) {\n if (${k} in input) {\n newResult[${k}] = undefined;\n }\n } else {\n newResult[${k}] = ${id}.value;\n }\n \n `);\n }\n else {\n doc.write(`\n if (${id}.issues.length) {\n payload.issues = payload.issues.concat(${id}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${k}, ...iss.path] : [${k}]\n })));\n }\n \n if (${id}.value === undefined) {\n if (${k} in input) {\n newResult[${k}] = undefined;\n }\n } else {\n newResult[${k}] = ${id}.value;\n }\n \n `);\n }\n }\n doc.write(`payload.value = newResult;`);\n doc.write(`return payload;`);\n const fn = doc.compile();\n return (payload, ctx) => fn(shape, payload, ctx);\n };\n let fastpass;\n const isObject = util.isObject;\n const jit = !core.globalConfig.jitless;\n const allowsEval = util.allowsEval;\n const fastEnabled = jit && allowsEval.value; // && !def.catchall;\n const catchall = def.catchall;\n let value;\n inst._zod.parse = (payload, ctx) => {\n value ?? (value = _normalized.value);\n const input = payload.value;\n if (!isObject(input)) {\n payload.issues.push({\n expected: \"object\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) {\n // always synchronous\n if (!fastpass)\n fastpass = generateFastpass(def.shape);\n payload = fastpass(payload, ctx);\n if (!catchall)\n return payload;\n return handleCatchall([], input, payload, ctx, value, inst);\n }\n return superParse(payload, ctx);\n };\n});\nfunction handleUnionResults(results, final, inst, ctx) {\n for (const result of results) {\n if (result.issues.length === 0) {\n final.value = result.value;\n return final;\n }\n }\n const nonaborted = results.filter((r) => !util.aborted(r));\n if (nonaborted.length === 1) {\n final.value = nonaborted[0].value;\n return nonaborted[0];\n }\n final.issues.push({\n code: \"invalid_union\",\n input: final.value,\n inst,\n errors: results.map((result) => result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n });\n return final;\n}\nexport const $ZodUnion = /*@__PURE__*/ core.$constructor(\"$ZodUnion\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"optin\", () => def.options.some((o) => o._zod.optin === \"optional\") ? \"optional\" : undefined);\n util.defineLazy(inst._zod, \"optout\", () => def.options.some((o) => o._zod.optout === \"optional\") ? \"optional\" : undefined);\n util.defineLazy(inst._zod, \"values\", () => {\n if (def.options.every((o) => o._zod.values)) {\n return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));\n }\n return undefined;\n });\n util.defineLazy(inst._zod, \"pattern\", () => {\n if (def.options.every((o) => o._zod.pattern)) {\n const patterns = def.options.map((o) => o._zod.pattern);\n return new RegExp(`^(${patterns.map((p) => util.cleanRegex(p.source)).join(\"|\")})$`);\n }\n return undefined;\n });\n const single = def.options.length === 1;\n const first = def.options[0]._zod.run;\n inst._zod.parse = (payload, ctx) => {\n if (single) {\n return first(payload, ctx);\n }\n let async = false;\n const results = [];\n for (const option of def.options) {\n const result = option._zod.run({\n value: payload.value,\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n results.push(result);\n async = true;\n }\n else {\n if (result.issues.length === 0)\n return result;\n results.push(result);\n }\n }\n if (!async)\n return handleUnionResults(results, payload, inst, ctx);\n return Promise.all(results).then((results) => {\n return handleUnionResults(results, payload, inst, ctx);\n });\n };\n});\nfunction handleExclusiveUnionResults(results, final, inst, ctx) {\n const successes = results.filter((r) => r.issues.length === 0);\n if (successes.length === 1) {\n final.value = successes[0].value;\n return final;\n }\n if (successes.length === 0) {\n // No matches - same as regular union\n final.issues.push({\n code: \"invalid_union\",\n input: final.value,\n inst,\n errors: results.map((result) => result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n });\n }\n else {\n // Multiple matches - exclusive union failure\n final.issues.push({\n code: \"invalid_union\",\n input: final.value,\n inst,\n errors: [],\n inclusive: false,\n });\n }\n return final;\n}\nexport const $ZodXor = /*@__PURE__*/ core.$constructor(\"$ZodXor\", (inst, def) => {\n $ZodUnion.init(inst, def);\n def.inclusive = false;\n const single = def.options.length === 1;\n const first = def.options[0]._zod.run;\n inst._zod.parse = (payload, ctx) => {\n if (single) {\n return first(payload, ctx);\n }\n let async = false;\n const results = [];\n for (const option of def.options) {\n const result = option._zod.run({\n value: payload.value,\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n results.push(result);\n async = true;\n }\n else {\n results.push(result);\n }\n }\n if (!async)\n return handleExclusiveUnionResults(results, payload, inst, ctx);\n return Promise.all(results).then((results) => {\n return handleExclusiveUnionResults(results, payload, inst, ctx);\n });\n };\n});\nexport const $ZodDiscriminatedUnion = \n/*@__PURE__*/\ncore.$constructor(\"$ZodDiscriminatedUnion\", (inst, def) => {\n def.inclusive = false;\n $ZodUnion.init(inst, def);\n const _super = inst._zod.parse;\n util.defineLazy(inst._zod, \"propValues\", () => {\n const propValues = {};\n for (const option of def.options) {\n const pv = option._zod.propValues;\n if (!pv || Object.keys(pv).length === 0)\n throw new Error(`Invalid discriminated union option at index \"${def.options.indexOf(option)}\"`);\n for (const [k, v] of Object.entries(pv)) {\n if (!propValues[k])\n propValues[k] = new Set();\n for (const val of v) {\n propValues[k].add(val);\n }\n }\n }\n return propValues;\n });\n const disc = util.cached(() => {\n const opts = def.options;\n const map = new Map();\n for (const o of opts) {\n const values = o._zod.propValues?.[def.discriminator];\n if (!values || values.size === 0)\n throw new Error(`Invalid discriminated union option at index \"${def.options.indexOf(o)}\"`);\n for (const v of values) {\n if (map.has(v)) {\n throw new Error(`Duplicate discriminator value \"${String(v)}\"`);\n }\n map.set(v, o);\n }\n }\n return map;\n });\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!util.isObject(input)) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"object\",\n input,\n inst,\n });\n return payload;\n }\n const opt = disc.value.get(input?.[def.discriminator]);\n if (opt) {\n return opt._zod.run(payload, ctx);\n }\n if (def.unionFallback) {\n return _super(payload, ctx);\n }\n // no matching discriminator\n payload.issues.push({\n code: \"invalid_union\",\n errors: [],\n note: \"No matching discriminator\",\n discriminator: def.discriminator,\n input,\n path: [def.discriminator],\n inst,\n });\n return payload;\n };\n});\nexport const $ZodIntersection = /*@__PURE__*/ core.$constructor(\"$ZodIntersection\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n const left = def.left._zod.run({ value: input, issues: [] }, ctx);\n const right = def.right._zod.run({ value: input, issues: [] }, ctx);\n const async = left instanceof Promise || right instanceof Promise;\n if (async) {\n return Promise.all([left, right]).then(([left, right]) => {\n return handleIntersectionResults(payload, left, right);\n });\n }\n return handleIntersectionResults(payload, left, right);\n };\n});\nfunction mergeValues(a, b) {\n // const aType = parse.t(a);\n // const bType = parse.t(b);\n if (a === b) {\n return { valid: true, data: a };\n }\n if (a instanceof Date && b instanceof Date && +a === +b) {\n return { valid: true, data: a };\n }\n if (util.isPlainObject(a) && util.isPlainObject(b)) {\n const bKeys = Object.keys(b);\n const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);\n const newObj = { ...a, ...b };\n for (const key of sharedKeys) {\n const sharedValue = mergeValues(a[key], b[key]);\n if (!sharedValue.valid) {\n return {\n valid: false,\n mergeErrorPath: [key, ...sharedValue.mergeErrorPath],\n };\n }\n newObj[key] = sharedValue.data;\n }\n return { valid: true, data: newObj };\n }\n if (Array.isArray(a) && Array.isArray(b)) {\n if (a.length !== b.length) {\n return { valid: false, mergeErrorPath: [] };\n }\n const newArray = [];\n for (let index = 0; index < a.length; index++) {\n const itemA = a[index];\n const itemB = b[index];\n const sharedValue = mergeValues(itemA, itemB);\n if (!sharedValue.valid) {\n return {\n valid: false,\n mergeErrorPath: [index, ...sharedValue.mergeErrorPath],\n };\n }\n newArray.push(sharedValue.data);\n }\n return { valid: true, data: newArray };\n }\n return { valid: false, mergeErrorPath: [] };\n}\nfunction handleIntersectionResults(result, left, right) {\n // Track which side(s) report each key as unrecognized\n const unrecKeys = new Map();\n let unrecIssue;\n for (const iss of left.issues) {\n if (iss.code === \"unrecognized_keys\") {\n unrecIssue ?? (unrecIssue = iss);\n for (const k of iss.keys) {\n if (!unrecKeys.has(k))\n unrecKeys.set(k, {});\n unrecKeys.get(k).l = true;\n }\n }\n else {\n result.issues.push(iss);\n }\n }\n for (const iss of right.issues) {\n if (iss.code === \"unrecognized_keys\") {\n for (const k of iss.keys) {\n if (!unrecKeys.has(k))\n unrecKeys.set(k, {});\n unrecKeys.get(k).r = true;\n }\n }\n else {\n result.issues.push(iss);\n }\n }\n // Report only keys unrecognized by BOTH sides\n const bothKeys = [...unrecKeys].filter(([, f]) => f.l && f.r).map(([k]) => k);\n if (bothKeys.length && unrecIssue) {\n result.issues.push({ ...unrecIssue, keys: bothKeys });\n }\n if (util.aborted(result))\n return result;\n const merged = mergeValues(left.value, right.value);\n if (!merged.valid) {\n throw new Error(`Unmergable intersection. Error path: ` + `${JSON.stringify(merged.mergeErrorPath)}`);\n }\n result.value = merged.data;\n return result;\n}\nexport const $ZodTuple = /*@__PURE__*/ core.$constructor(\"$ZodTuple\", (inst, def) => {\n $ZodType.init(inst, def);\n const items = def.items;\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!Array.isArray(input)) {\n payload.issues.push({\n input,\n inst,\n expected: \"tuple\",\n code: \"invalid_type\",\n });\n return payload;\n }\n payload.value = [];\n const proms = [];\n const reversedIndex = [...items].reverse().findIndex((item) => item._zod.optin !== \"optional\");\n const optStart = reversedIndex === -1 ? 0 : items.length - reversedIndex;\n if (!def.rest) {\n const tooBig = input.length > items.length;\n const tooSmall = input.length < optStart - 1;\n if (tooBig || tooSmall) {\n payload.issues.push({\n ...(tooBig\n ? { code: \"too_big\", maximum: items.length, inclusive: true }\n : { code: \"too_small\", minimum: items.length }),\n input,\n inst,\n origin: \"array\",\n });\n return payload;\n }\n }\n let i = -1;\n for (const item of items) {\n i++;\n if (i >= input.length)\n if (i >= optStart)\n continue;\n const result = item._zod.run({\n value: input[i],\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => handleTupleResult(result, payload, i)));\n }\n else {\n handleTupleResult(result, payload, i);\n }\n }\n if (def.rest) {\n const rest = input.slice(items.length);\n for (const el of rest) {\n i++;\n const result = def.rest._zod.run({\n value: el,\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => handleTupleResult(result, payload, i)));\n }\n else {\n handleTupleResult(result, payload, i);\n }\n }\n }\n if (proms.length)\n return Promise.all(proms).then(() => payload);\n return payload;\n };\n});\nfunction handleTupleResult(result, final, index) {\n if (result.issues.length) {\n final.issues.push(...util.prefixIssues(index, result.issues));\n }\n final.value[index] = result.value;\n}\nexport const $ZodRecord = /*@__PURE__*/ core.$constructor(\"$ZodRecord\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!util.isPlainObject(input)) {\n payload.issues.push({\n expected: \"record\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n const proms = [];\n const values = def.keyType._zod.values;\n if (values) {\n payload.value = {};\n const recordKeys = new Set();\n for (const key of values) {\n if (typeof key === \"string\" || typeof key === \"number\" || typeof key === \"symbol\") {\n recordKeys.add(typeof key === \"number\" ? key.toString() : key);\n const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[key] = result.value;\n }));\n }\n else {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[key] = result.value;\n }\n }\n }\n let unrecognized;\n for (const key in input) {\n if (!recordKeys.has(key)) {\n unrecognized = unrecognized ?? [];\n unrecognized.push(key);\n }\n }\n if (unrecognized && unrecognized.length > 0) {\n payload.issues.push({\n code: \"unrecognized_keys\",\n input,\n inst,\n keys: unrecognized,\n });\n }\n }\n else {\n payload.value = {};\n for (const key of Reflect.ownKeys(input)) {\n if (key === \"__proto__\")\n continue;\n let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);\n if (keyResult instanceof Promise) {\n throw new Error(\"Async schemas not supported in object keys currently\");\n }\n // Numeric string fallback: if key is a numeric string and failed, retry with Number(key)\n // This handles z.number(), z.literal([1, 2, 3]), and unions containing numeric literals\n const checkNumericKey = typeof key === \"string\" && regexes.number.test(key) && keyResult.issues.length;\n if (checkNumericKey) {\n const retryResult = def.keyType._zod.run({ value: Number(key), issues: [] }, ctx);\n if (retryResult instanceof Promise) {\n throw new Error(\"Async schemas not supported in object keys currently\");\n }\n if (retryResult.issues.length === 0) {\n keyResult = retryResult;\n }\n }\n if (keyResult.issues.length) {\n if (def.mode === \"loose\") {\n // Pass through unchanged\n payload.value[key] = input[key];\n }\n else {\n // Default \"strict\" behavior: error on invalid key\n payload.issues.push({\n code: \"invalid_key\",\n origin: \"record\",\n issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n input: key,\n path: [key],\n inst,\n });\n }\n continue;\n }\n const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[keyResult.value] = result.value;\n }));\n }\n else {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[keyResult.value] = result.value;\n }\n }\n }\n if (proms.length) {\n return Promise.all(proms).then(() => payload);\n }\n return payload;\n };\n});\nexport const $ZodMap = /*@__PURE__*/ core.$constructor(\"$ZodMap\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!(input instanceof Map)) {\n payload.issues.push({\n expected: \"map\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n const proms = [];\n payload.value = new Map();\n for (const [key, value] of input) {\n const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);\n const valueResult = def.valueType._zod.run({ value: value, issues: [] }, ctx);\n if (keyResult instanceof Promise || valueResult instanceof Promise) {\n proms.push(Promise.all([keyResult, valueResult]).then(([keyResult, valueResult]) => {\n handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);\n }));\n }\n else {\n handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);\n }\n }\n if (proms.length)\n return Promise.all(proms).then(() => payload);\n return payload;\n };\n});\nfunction handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {\n if (keyResult.issues.length) {\n if (util.propertyKeyTypes.has(typeof key)) {\n final.issues.push(...util.prefixIssues(key, keyResult.issues));\n }\n else {\n final.issues.push({\n code: \"invalid_key\",\n origin: \"map\",\n input,\n inst,\n issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n });\n }\n }\n if (valueResult.issues.length) {\n if (util.propertyKeyTypes.has(typeof key)) {\n final.issues.push(...util.prefixIssues(key, valueResult.issues));\n }\n else {\n final.issues.push({\n origin: \"map\",\n code: \"invalid_element\",\n input,\n inst,\n key: key,\n issues: valueResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n });\n }\n }\n final.value.set(keyResult.value, valueResult.value);\n}\nexport const $ZodSet = /*@__PURE__*/ core.$constructor(\"$ZodSet\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!(input instanceof Set)) {\n payload.issues.push({\n input,\n inst,\n expected: \"set\",\n code: \"invalid_type\",\n });\n return payload;\n }\n const proms = [];\n payload.value = new Set();\n for (const item of input) {\n const result = def.valueType._zod.run({ value: item, issues: [] }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => handleSetResult(result, payload)));\n }\n else\n handleSetResult(result, payload);\n }\n if (proms.length)\n return Promise.all(proms).then(() => payload);\n return payload;\n };\n});\nfunction handleSetResult(result, final) {\n if (result.issues.length) {\n final.issues.push(...result.issues);\n }\n final.value.add(result.value);\n}\nexport const $ZodEnum = /*@__PURE__*/ core.$constructor(\"$ZodEnum\", (inst, def) => {\n $ZodType.init(inst, def);\n const values = util.getEnumValues(def.entries);\n const valuesSet = new Set(values);\n inst._zod.values = valuesSet;\n inst._zod.pattern = new RegExp(`^(${values\n .filter((k) => util.propertyKeyTypes.has(typeof k))\n .map((o) => (typeof o === \"string\" ? util.escapeRegex(o) : o.toString()))\n .join(\"|\")})$`);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (valuesSet.has(input)) {\n return payload;\n }\n payload.issues.push({\n code: \"invalid_value\",\n values,\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodLiteral = /*@__PURE__*/ core.$constructor(\"$ZodLiteral\", (inst, def) => {\n $ZodType.init(inst, def);\n if (def.values.length === 0) {\n throw new Error(\"Cannot create literal schema with no valid values\");\n }\n const values = new Set(def.values);\n inst._zod.values = values;\n inst._zod.pattern = new RegExp(`^(${def.values\n .map((o) => (typeof o === \"string\" ? util.escapeRegex(o) : o ? util.escapeRegex(o.toString()) : String(o)))\n .join(\"|\")})$`);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (values.has(input)) {\n return payload;\n }\n payload.issues.push({\n code: \"invalid_value\",\n values: def.values,\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodFile = /*@__PURE__*/ core.$constructor(\"$ZodFile\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n // @ts-ignore\n if (input instanceof File)\n return payload;\n payload.issues.push({\n expected: \"file\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodTransform = /*@__PURE__*/ core.$constructor(\"$ZodTransform\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n throw new core.$ZodEncodeError(inst.constructor.name);\n }\n const _out = def.transform(payload.value, payload);\n if (ctx.async) {\n const output = _out instanceof Promise ? _out : Promise.resolve(_out);\n return output.then((output) => {\n payload.value = output;\n return payload;\n });\n }\n if (_out instanceof Promise) {\n throw new core.$ZodAsyncError();\n }\n payload.value = _out;\n return payload;\n };\n});\nfunction handleOptionalResult(result, input) {\n if (result.issues.length && input === undefined) {\n return { issues: [], value: undefined };\n }\n return result;\n}\nexport const $ZodOptional = /*@__PURE__*/ core.$constructor(\"$ZodOptional\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.optin = \"optional\";\n inst._zod.optout = \"optional\";\n util.defineLazy(inst._zod, \"values\", () => {\n return def.innerType._zod.values ? new Set([...def.innerType._zod.values, undefined]) : undefined;\n });\n util.defineLazy(inst._zod, \"pattern\", () => {\n const pattern = def.innerType._zod.pattern;\n return pattern ? new RegExp(`^(${util.cleanRegex(pattern.source)})?$`) : undefined;\n });\n inst._zod.parse = (payload, ctx) => {\n if (def.innerType._zod.optin === \"optional\") {\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise)\n return result.then((r) => handleOptionalResult(r, payload.value));\n return handleOptionalResult(result, payload.value);\n }\n if (payload.value === undefined) {\n return payload;\n }\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodExactOptional = /*@__PURE__*/ core.$constructor(\"$ZodExactOptional\", (inst, def) => {\n // Call parent init - inherits optin/optout = \"optional\"\n $ZodOptional.init(inst, def);\n // Override values/pattern to NOT add undefined\n util.defineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n util.defineLazy(inst._zod, \"pattern\", () => def.innerType._zod.pattern);\n // Override parse to just delegate (no undefined handling)\n inst._zod.parse = (payload, ctx) => {\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodNullable = /*@__PURE__*/ core.$constructor(\"$ZodNullable\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"optin\", () => def.innerType._zod.optin);\n util.defineLazy(inst._zod, \"optout\", () => def.innerType._zod.optout);\n util.defineLazy(inst._zod, \"pattern\", () => {\n const pattern = def.innerType._zod.pattern;\n return pattern ? new RegExp(`^(${util.cleanRegex(pattern.source)}|null)$`) : undefined;\n });\n util.defineLazy(inst._zod, \"values\", () => {\n return def.innerType._zod.values ? new Set([...def.innerType._zod.values, null]) : undefined;\n });\n inst._zod.parse = (payload, ctx) => {\n // Forward direction (decode): allow null to pass through\n if (payload.value === null)\n return payload;\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodDefault = /*@__PURE__*/ core.$constructor(\"$ZodDefault\", (inst, def) => {\n $ZodType.init(inst, def);\n // inst._zod.qin = \"true\";\n inst._zod.optin = \"optional\";\n util.defineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n // Forward direction (decode): apply defaults for undefined input\n if (payload.value === undefined) {\n payload.value = def.defaultValue;\n /**\n * $ZodDefault returns the default value immediately in forward direction.\n * It doesn't pass the default value into the validator (\"prefault\"). There's no reason to pass the default value through validation. The validity of the default is enforced by TypeScript statically. Otherwise, it's the responsibility of the user to ensure the default is valid. In the case of pipes with divergent in/out types, you can specify the default on the `in` schema of your ZodPipe to set a \"prefault\" for the pipe. */\n return payload;\n }\n // Forward direction: continue with default handling\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then((result) => handleDefaultResult(result, def));\n }\n return handleDefaultResult(result, def);\n };\n});\nfunction handleDefaultResult(payload, def) {\n if (payload.value === undefined) {\n payload.value = def.defaultValue;\n }\n return payload;\n}\nexport const $ZodPrefault = /*@__PURE__*/ core.$constructor(\"$ZodPrefault\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.optin = \"optional\";\n util.defineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n // Forward direction (decode): apply prefault for undefined input\n if (payload.value === undefined) {\n payload.value = def.defaultValue;\n }\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodNonOptional = /*@__PURE__*/ core.$constructor(\"$ZodNonOptional\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"values\", () => {\n const v = def.innerType._zod.values;\n return v ? new Set([...v].filter((x) => x !== undefined)) : undefined;\n });\n inst._zod.parse = (payload, ctx) => {\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then((result) => handleNonOptionalResult(result, inst));\n }\n return handleNonOptionalResult(result, inst);\n };\n});\nfunction handleNonOptionalResult(payload, inst) {\n if (!payload.issues.length && payload.value === undefined) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"nonoptional\",\n input: payload.value,\n inst,\n });\n }\n return payload;\n}\nexport const $ZodSuccess = /*@__PURE__*/ core.$constructor(\"$ZodSuccess\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n throw new core.$ZodEncodeError(\"ZodSuccess\");\n }\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then((result) => {\n payload.value = result.issues.length === 0;\n return payload;\n });\n }\n payload.value = result.issues.length === 0;\n return payload;\n };\n});\nexport const $ZodCatch = /*@__PURE__*/ core.$constructor(\"$ZodCatch\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"optin\", () => def.innerType._zod.optin);\n util.defineLazy(inst._zod, \"optout\", () => def.innerType._zod.optout);\n util.defineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n // Forward direction (decode): apply catch logic\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then((result) => {\n payload.value = result.value;\n if (result.issues.length) {\n payload.value = def.catchValue({\n ...payload,\n error: {\n issues: result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n },\n input: payload.value,\n });\n payload.issues = [];\n }\n return payload;\n });\n }\n payload.value = result.value;\n if (result.issues.length) {\n payload.value = def.catchValue({\n ...payload,\n error: {\n issues: result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n },\n input: payload.value,\n });\n payload.issues = [];\n }\n return payload;\n };\n});\nexport const $ZodNaN = /*@__PURE__*/ core.$constructor(\"$ZodNaN\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n if (typeof payload.value !== \"number\" || !Number.isNaN(payload.value)) {\n payload.issues.push({\n input: payload.value,\n inst,\n expected: \"nan\",\n code: \"invalid_type\",\n });\n return payload;\n }\n return payload;\n };\n});\nexport const $ZodPipe = /*@__PURE__*/ core.$constructor(\"$ZodPipe\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"values\", () => def.in._zod.values);\n util.defineLazy(inst._zod, \"optin\", () => def.in._zod.optin);\n util.defineLazy(inst._zod, \"optout\", () => def.out._zod.optout);\n util.defineLazy(inst._zod, \"propValues\", () => def.in._zod.propValues);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n const right = def.out._zod.run(payload, ctx);\n if (right instanceof Promise) {\n return right.then((right) => handlePipeResult(right, def.in, ctx));\n }\n return handlePipeResult(right, def.in, ctx);\n }\n const left = def.in._zod.run(payload, ctx);\n if (left instanceof Promise) {\n return left.then((left) => handlePipeResult(left, def.out, ctx));\n }\n return handlePipeResult(left, def.out, ctx);\n };\n});\nfunction handlePipeResult(left, next, ctx) {\n if (left.issues.length) {\n // prevent further checks\n left.aborted = true;\n return left;\n }\n return next._zod.run({ value: left.value, issues: left.issues }, ctx);\n}\nexport const $ZodCodec = /*@__PURE__*/ core.$constructor(\"$ZodCodec\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"values\", () => def.in._zod.values);\n util.defineLazy(inst._zod, \"optin\", () => def.in._zod.optin);\n util.defineLazy(inst._zod, \"optout\", () => def.out._zod.optout);\n util.defineLazy(inst._zod, \"propValues\", () => def.in._zod.propValues);\n inst._zod.parse = (payload, ctx) => {\n const direction = ctx.direction || \"forward\";\n if (direction === \"forward\") {\n const left = def.in._zod.run(payload, ctx);\n if (left instanceof Promise) {\n return left.then((left) => handleCodecAResult(left, def, ctx));\n }\n return handleCodecAResult(left, def, ctx);\n }\n else {\n const right = def.out._zod.run(payload, ctx);\n if (right instanceof Promise) {\n return right.then((right) => handleCodecAResult(right, def, ctx));\n }\n return handleCodecAResult(right, def, ctx);\n }\n };\n});\nfunction handleCodecAResult(result, def, ctx) {\n if (result.issues.length) {\n // prevent further checks\n result.aborted = true;\n return result;\n }\n const direction = ctx.direction || \"forward\";\n if (direction === \"forward\") {\n const transformed = def.transform(result.value, result);\n if (transformed instanceof Promise) {\n return transformed.then((value) => handleCodecTxResult(result, value, def.out, ctx));\n }\n return handleCodecTxResult(result, transformed, def.out, ctx);\n }\n else {\n const transformed = def.reverseTransform(result.value, result);\n if (transformed instanceof Promise) {\n return transformed.then((value) => handleCodecTxResult(result, value, def.in, ctx));\n }\n return handleCodecTxResult(result, transformed, def.in, ctx);\n }\n}\nfunction handleCodecTxResult(left, value, nextSchema, ctx) {\n // Check if transform added any issues\n if (left.issues.length) {\n left.aborted = true;\n return left;\n }\n return nextSchema._zod.run({ value, issues: left.issues }, ctx);\n}\nexport const $ZodReadonly = /*@__PURE__*/ core.$constructor(\"$ZodReadonly\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"propValues\", () => def.innerType._zod.propValues);\n util.defineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n util.defineLazy(inst._zod, \"optin\", () => def.innerType?._zod?.optin);\n util.defineLazy(inst._zod, \"optout\", () => def.innerType?._zod?.optout);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then(handleReadonlyResult);\n }\n return handleReadonlyResult(result);\n };\n});\nfunction handleReadonlyResult(payload) {\n payload.value = Object.freeze(payload.value);\n return payload;\n}\nexport const $ZodTemplateLiteral = /*@__PURE__*/ core.$constructor(\"$ZodTemplateLiteral\", (inst, def) => {\n $ZodType.init(inst, def);\n const regexParts = [];\n for (const part of def.parts) {\n if (typeof part === \"object\" && part !== null) {\n // is Zod schema\n if (!part._zod.pattern) {\n // if (!source)\n throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`);\n }\n const source = part._zod.pattern instanceof RegExp ? part._zod.pattern.source : part._zod.pattern;\n if (!source)\n throw new Error(`Invalid template literal part: ${part._zod.traits}`);\n const start = source.startsWith(\"^\") ? 1 : 0;\n const end = source.endsWith(\"$\") ? source.length - 1 : source.length;\n regexParts.push(source.slice(start, end));\n }\n else if (part === null || util.primitiveTypes.has(typeof part)) {\n regexParts.push(util.escapeRegex(`${part}`));\n }\n else {\n throw new Error(`Invalid template literal part: ${part}`);\n }\n }\n inst._zod.pattern = new RegExp(`^${regexParts.join(\"\")}$`);\n inst._zod.parse = (payload, _ctx) => {\n if (typeof payload.value !== \"string\") {\n payload.issues.push({\n input: payload.value,\n inst,\n expected: \"string\",\n code: \"invalid_type\",\n });\n return payload;\n }\n inst._zod.pattern.lastIndex = 0;\n if (!inst._zod.pattern.test(payload.value)) {\n payload.issues.push({\n input: payload.value,\n inst,\n code: \"invalid_format\",\n format: def.format ?? \"template_literal\",\n pattern: inst._zod.pattern.source,\n });\n return payload;\n }\n return payload;\n };\n});\nexport const $ZodFunction = /*@__PURE__*/ core.$constructor(\"$ZodFunction\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._def = def;\n inst._zod.def = def;\n inst.implement = (func) => {\n if (typeof func !== \"function\") {\n throw new Error(\"implement() must be called with a function\");\n }\n return function (...args) {\n const parsedArgs = inst._def.input ? parse(inst._def.input, args) : args;\n const result = Reflect.apply(func, this, parsedArgs);\n if (inst._def.output) {\n return parse(inst._def.output, result);\n }\n return result;\n };\n };\n inst.implementAsync = (func) => {\n if (typeof func !== \"function\") {\n throw new Error(\"implementAsync() must be called with a function\");\n }\n return async function (...args) {\n const parsedArgs = inst._def.input ? await parseAsync(inst._def.input, args) : args;\n const result = await Reflect.apply(func, this, parsedArgs);\n if (inst._def.output) {\n return await parseAsync(inst._def.output, result);\n }\n return result;\n };\n };\n inst._zod.parse = (payload, _ctx) => {\n if (typeof payload.value !== \"function\") {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"function\",\n input: payload.value,\n inst,\n });\n return payload;\n }\n // Check if output is a promise type to determine if we should use async implementation\n const hasPromiseOutput = inst._def.output && inst._def.output._zod.def.type === \"promise\";\n if (hasPromiseOutput) {\n payload.value = inst.implementAsync(payload.value);\n }\n else {\n payload.value = inst.implement(payload.value);\n }\n return payload;\n };\n inst.input = (...args) => {\n const F = inst.constructor;\n if (Array.isArray(args[0])) {\n return new F({\n type: \"function\",\n input: new $ZodTuple({\n type: \"tuple\",\n items: args[0],\n rest: args[1],\n }),\n output: inst._def.output,\n });\n }\n return new F({\n type: \"function\",\n input: args[0],\n output: inst._def.output,\n });\n };\n inst.output = (output) => {\n const F = inst.constructor;\n return new F({\n type: \"function\",\n input: inst._def.input,\n output,\n });\n };\n return inst;\n});\nexport const $ZodPromise = /*@__PURE__*/ core.$constructor(\"$ZodPromise\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n return Promise.resolve(payload.value).then((inner) => def.innerType._zod.run({ value: inner, issues: [] }, ctx));\n };\n});\nexport const $ZodLazy = /*@__PURE__*/ core.$constructor(\"$ZodLazy\", (inst, def) => {\n $ZodType.init(inst, def);\n // let _innerType!: any;\n // util.defineLazy(def, \"getter\", () => {\n // if (!_innerType) {\n // _innerType = def.getter();\n // }\n // return () => _innerType;\n // });\n util.defineLazy(inst._zod, \"innerType\", () => def.getter());\n util.defineLazy(inst._zod, \"pattern\", () => inst._zod.innerType?._zod?.pattern);\n util.defineLazy(inst._zod, \"propValues\", () => inst._zod.innerType?._zod?.propValues);\n util.defineLazy(inst._zod, \"optin\", () => inst._zod.innerType?._zod?.optin ?? undefined);\n util.defineLazy(inst._zod, \"optout\", () => inst._zod.innerType?._zod?.optout ?? undefined);\n inst._zod.parse = (payload, ctx) => {\n const inner = inst._zod.innerType;\n return inner._zod.run(payload, ctx);\n };\n});\nexport const $ZodCustom = /*@__PURE__*/ core.$constructor(\"$ZodCustom\", (inst, def) => {\n checks.$ZodCheck.init(inst, def);\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _) => {\n return payload;\n };\n inst._zod.check = (payload) => {\n const input = payload.value;\n const r = def.fn(input);\n if (r instanceof Promise) {\n return r.then((r) => handleRefineResult(r, payload, input, inst));\n }\n handleRefineResult(r, payload, input, inst);\n return;\n };\n});\nfunction handleRefineResult(result, payload, input, inst) {\n if (!result) {\n const _iss = {\n code: \"custom\",\n input,\n inst, // incorporates params.error into issue reporting\n path: [...(inst._zod.def.path ?? [])], // incorporates params.error into issue reporting\n continue: !inst._zod.def.abort,\n // params: inst._zod.def.params,\n };\n if (inst._zod.def.params)\n _iss.params = inst._zod.def.params;\n payload.issues.push(util.issue(_iss));\n }\n}\n","var _a;\nexport const $output = Symbol(\"ZodOutput\");\nexport const $input = Symbol(\"ZodInput\");\nexport class $ZodRegistry {\n constructor() {\n this._map = new WeakMap();\n this._idmap = new Map();\n }\n add(schema, ..._meta) {\n const meta = _meta[0];\n this._map.set(schema, meta);\n if (meta && typeof meta === \"object\" && \"id\" in meta) {\n this._idmap.set(meta.id, schema);\n }\n return this;\n }\n clear() {\n this._map = new WeakMap();\n this._idmap = new Map();\n return this;\n }\n remove(schema) {\n const meta = this._map.get(schema);\n if (meta && typeof meta === \"object\" && \"id\" in meta) {\n this._idmap.delete(meta.id);\n }\n this._map.delete(schema);\n return this;\n }\n get(schema) {\n // return this._map.get(schema) as any;\n // inherit metadata\n const p = schema._zod.parent;\n if (p) {\n const pm = { ...(this.get(p) ?? {}) };\n delete pm.id; // do not inherit id\n const f = { ...pm, ...this._map.get(schema) };\n return Object.keys(f).length ? f : undefined;\n }\n return this._map.get(schema);\n }\n has(schema) {\n return this._map.has(schema);\n }\n}\n// registries\nexport function registry() {\n return new $ZodRegistry();\n}\n(_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());\nexport const globalRegistry = globalThis.__zod_globalRegistry;\n","import * as checks from \"./checks.js\";\nimport * as registries from \"./registries.js\";\nimport * as schemas from \"./schemas.js\";\nimport * as util from \"./util.js\";\n// @__NO_SIDE_EFFECTS__\nexport function _string(Class, params) {\n return new Class({\n type: \"string\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedString(Class, params) {\n return new Class({\n type: \"string\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _email(Class, params) {\n return new Class({\n type: \"string\",\n format: \"email\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _guid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"guid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuidv4(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n version: \"v4\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuidv6(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n version: \"v6\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuidv7(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n version: \"v7\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _url(Class, params) {\n return new Class({\n type: \"string\",\n format: \"url\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _emoji(Class, params) {\n return new Class({\n type: \"string\",\n format: \"emoji\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nanoid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"nanoid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cuid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cuid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cuid2(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cuid2\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ulid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ulid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _xid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"xid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ksuid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ksuid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ipv4(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ipv4\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ipv6(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ipv6\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _mac(Class, params) {\n return new Class({\n type: \"string\",\n format: \"mac\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cidrv4(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cidrv4\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cidrv6(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cidrv6\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _base64(Class, params) {\n return new Class({\n type: \"string\",\n format: \"base64\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _base64url(Class, params) {\n return new Class({\n type: \"string\",\n format: \"base64url\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _e164(Class, params) {\n return new Class({\n type: \"string\",\n format: \"e164\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _jwt(Class, params) {\n return new Class({\n type: \"string\",\n format: \"jwt\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\nexport const TimePrecision = {\n Any: null,\n Minute: -1,\n Second: 0,\n Millisecond: 3,\n Microsecond: 6,\n};\n// @__NO_SIDE_EFFECTS__\nexport function _isoDateTime(Class, params) {\n return new Class({\n type: \"string\",\n format: \"datetime\",\n check: \"string_format\",\n offset: false,\n local: false,\n precision: null,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _isoDate(Class, params) {\n return new Class({\n type: \"string\",\n format: \"date\",\n check: \"string_format\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _isoTime(Class, params) {\n return new Class({\n type: \"string\",\n format: \"time\",\n check: \"string_format\",\n precision: null,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _isoDuration(Class, params) {\n return new Class({\n type: \"string\",\n format: \"duration\",\n check: \"string_format\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _number(Class, params) {\n return new Class({\n type: \"number\",\n checks: [],\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedNumber(Class, params) {\n return new Class({\n type: \"number\",\n coerce: true,\n checks: [],\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _int(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"safeint\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _float32(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"float32\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _float64(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"float64\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _int32(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"int32\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uint32(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"uint32\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _boolean(Class, params) {\n return new Class({\n type: \"boolean\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedBoolean(Class, params) {\n return new Class({\n type: \"boolean\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _bigint(Class, params) {\n return new Class({\n type: \"bigint\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedBigint(Class, params) {\n return new Class({\n type: \"bigint\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _int64(Class, params) {\n return new Class({\n type: \"bigint\",\n check: \"bigint_format\",\n abort: false,\n format: \"int64\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uint64(Class, params) {\n return new Class({\n type: \"bigint\",\n check: \"bigint_format\",\n abort: false,\n format: \"uint64\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _symbol(Class, params) {\n return new Class({\n type: \"symbol\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _undefined(Class, params) {\n return new Class({\n type: \"undefined\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _null(Class, params) {\n return new Class({\n type: \"null\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _any(Class) {\n return new Class({\n type: \"any\",\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _unknown(Class) {\n return new Class({\n type: \"unknown\",\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _never(Class, params) {\n return new Class({\n type: \"never\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _void(Class, params) {\n return new Class({\n type: \"void\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _date(Class, params) {\n return new Class({\n type: \"date\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedDate(Class, params) {\n return new Class({\n type: \"date\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nan(Class, params) {\n return new Class({\n type: \"nan\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lt(value, params) {\n return new checks.$ZodCheckLessThan({\n check: \"less_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: false,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lte(value, params) {\n return new checks.$ZodCheckLessThan({\n check: \"less_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: true,\n });\n}\nexport { \n/** @deprecated Use `z.lte()` instead. */\n_lte as _max, };\n// @__NO_SIDE_EFFECTS__\nexport function _gt(value, params) {\n return new checks.$ZodCheckGreaterThan({\n check: \"greater_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: false,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _gte(value, params) {\n return new checks.$ZodCheckGreaterThan({\n check: \"greater_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: true,\n });\n}\nexport { \n/** @deprecated Use `z.gte()` instead. */\n_gte as _min, };\n// @__NO_SIDE_EFFECTS__\nexport function _positive(params) {\n return _gt(0, params);\n}\n// negative\n// @__NO_SIDE_EFFECTS__\nexport function _negative(params) {\n return _lt(0, params);\n}\n// nonpositive\n// @__NO_SIDE_EFFECTS__\nexport function _nonpositive(params) {\n return _lte(0, params);\n}\n// nonnegative\n// @__NO_SIDE_EFFECTS__\nexport function _nonnegative(params) {\n return _gte(0, params);\n}\n// @__NO_SIDE_EFFECTS__\nexport function _multipleOf(value, params) {\n return new checks.$ZodCheckMultipleOf({\n check: \"multiple_of\",\n ...util.normalizeParams(params),\n value,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _maxSize(maximum, params) {\n return new checks.$ZodCheckMaxSize({\n check: \"max_size\",\n ...util.normalizeParams(params),\n maximum,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _minSize(minimum, params) {\n return new checks.$ZodCheckMinSize({\n check: \"min_size\",\n ...util.normalizeParams(params),\n minimum,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _size(size, params) {\n return new checks.$ZodCheckSizeEquals({\n check: \"size_equals\",\n ...util.normalizeParams(params),\n size,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _maxLength(maximum, params) {\n const ch = new checks.$ZodCheckMaxLength({\n check: \"max_length\",\n ...util.normalizeParams(params),\n maximum,\n });\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _minLength(minimum, params) {\n return new checks.$ZodCheckMinLength({\n check: \"min_length\",\n ...util.normalizeParams(params),\n minimum,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _length(length, params) {\n return new checks.$ZodCheckLengthEquals({\n check: \"length_equals\",\n ...util.normalizeParams(params),\n length,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _regex(pattern, params) {\n return new checks.$ZodCheckRegex({\n check: \"string_format\",\n format: \"regex\",\n ...util.normalizeParams(params),\n pattern,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lowercase(params) {\n return new checks.$ZodCheckLowerCase({\n check: \"string_format\",\n format: \"lowercase\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uppercase(params) {\n return new checks.$ZodCheckUpperCase({\n check: \"string_format\",\n format: \"uppercase\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _includes(includes, params) {\n return new checks.$ZodCheckIncludes({\n check: \"string_format\",\n format: \"includes\",\n ...util.normalizeParams(params),\n includes,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _startsWith(prefix, params) {\n return new checks.$ZodCheckStartsWith({\n check: \"string_format\",\n format: \"starts_with\",\n ...util.normalizeParams(params),\n prefix,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _endsWith(suffix, params) {\n return new checks.$ZodCheckEndsWith({\n check: \"string_format\",\n format: \"ends_with\",\n ...util.normalizeParams(params),\n suffix,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _property(property, schema, params) {\n return new checks.$ZodCheckProperty({\n check: \"property\",\n property,\n schema,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _mime(types, params) {\n return new checks.$ZodCheckMimeType({\n check: \"mime_type\",\n mime: types,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _overwrite(tx) {\n return new checks.$ZodCheckOverwrite({\n check: \"overwrite\",\n tx,\n });\n}\n// normalize\n// @__NO_SIDE_EFFECTS__\nexport function _normalize(form) {\n return _overwrite((input) => input.normalize(form));\n}\n// trim\n// @__NO_SIDE_EFFECTS__\nexport function _trim() {\n return _overwrite((input) => input.trim());\n}\n// toLowerCase\n// @__NO_SIDE_EFFECTS__\nexport function _toLowerCase() {\n return _overwrite((input) => input.toLowerCase());\n}\n// toUpperCase\n// @__NO_SIDE_EFFECTS__\nexport function _toUpperCase() {\n return _overwrite((input) => input.toUpperCase());\n}\n// slugify\n// @__NO_SIDE_EFFECTS__\nexport function _slugify() {\n return _overwrite((input) => util.slugify(input));\n}\n// @__NO_SIDE_EFFECTS__\nexport function _array(Class, element, params) {\n return new Class({\n type: \"array\",\n element,\n // get element() {\n // return element;\n // },\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _union(Class, options, params) {\n return new Class({\n type: \"union\",\n options,\n ...util.normalizeParams(params),\n });\n}\nexport function _xor(Class, options, params) {\n return new Class({\n type: \"union\",\n options,\n inclusive: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _discriminatedUnion(Class, discriminator, options, params) {\n return new Class({\n type: \"union\",\n options,\n discriminator,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _intersection(Class, left, right) {\n return new Class({\n type: \"intersection\",\n left,\n right,\n });\n}\n// export function _tuple(\n// Class: util.SchemaClass<schemas.$ZodTuple>,\n// items: [],\n// params?: string | $ZodTupleParams\n// ): schemas.$ZodTuple<[], null>;\n// @__NO_SIDE_EFFECTS__\nexport function _tuple(Class, items, _paramsOrRest, _params) {\n const hasRest = _paramsOrRest instanceof schemas.$ZodType;\n const params = hasRest ? _params : _paramsOrRest;\n const rest = hasRest ? _paramsOrRest : null;\n return new Class({\n type: \"tuple\",\n items,\n rest,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _record(Class, keyType, valueType, params) {\n return new Class({\n type: \"record\",\n keyType,\n valueType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _map(Class, keyType, valueType, params) {\n return new Class({\n type: \"map\",\n keyType,\n valueType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _set(Class, valueType, params) {\n return new Class({\n type: \"set\",\n valueType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _enum(Class, values, params) {\n const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;\n // if (Array.isArray(values)) {\n // for (const value of values) {\n // entries[value] = value;\n // }\n // } else {\n // Object.assign(entries, values);\n // }\n // const entries: util.EnumLike = {};\n // for (const val of values) {\n // entries[val] = val;\n // }\n return new Class({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\n/** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.\n *\n * ```ts\n * enum Colors { red, green, blue }\n * z.enum(Colors);\n * ```\n */\nexport function _nativeEnum(Class, entries, params) {\n return new Class({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _literal(Class, value, params) {\n return new Class({\n type: \"literal\",\n values: Array.isArray(value) ? value : [value],\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _file(Class, params) {\n return new Class({\n type: \"file\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _transform(Class, fn) {\n return new Class({\n type: \"transform\",\n transform: fn,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _optional(Class, innerType) {\n return new Class({\n type: \"optional\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nullable(Class, innerType) {\n return new Class({\n type: \"nullable\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _default(Class, innerType, defaultValue) {\n return new Class({\n type: \"default\",\n innerType,\n get defaultValue() {\n return typeof defaultValue === \"function\" ? defaultValue() : util.shallowClone(defaultValue);\n },\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nonoptional(Class, innerType, params) {\n return new Class({\n type: \"nonoptional\",\n innerType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _success(Class, innerType) {\n return new Class({\n type: \"success\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _catch(Class, innerType, catchValue) {\n return new Class({\n type: \"catch\",\n innerType,\n catchValue: (typeof catchValue === \"function\" ? catchValue : () => catchValue),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _pipe(Class, in_, out) {\n return new Class({\n type: \"pipe\",\n in: in_,\n out,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _readonly(Class, innerType) {\n return new Class({\n type: \"readonly\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _templateLiteral(Class, parts, params) {\n return new Class({\n type: \"template_literal\",\n parts,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lazy(Class, getter) {\n return new Class({\n type: \"lazy\",\n getter,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _promise(Class, innerType) {\n return new Class({\n type: \"promise\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _custom(Class, fn, _params) {\n const norm = util.normalizeParams(_params);\n norm.abort ?? (norm.abort = true); // default to abort:false\n const schema = new Class({\n type: \"custom\",\n check: \"custom\",\n fn: fn,\n ...norm,\n });\n return schema;\n}\n// same as _custom but defaults to abort:false\n// @__NO_SIDE_EFFECTS__\nexport function _refine(Class, fn, _params) {\n const schema = new Class({\n type: \"custom\",\n check: \"custom\",\n fn: fn,\n ...util.normalizeParams(_params),\n });\n return schema;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _superRefine(fn) {\n const ch = _check((payload) => {\n payload.addIssue = (issue) => {\n if (typeof issue === \"string\") {\n payload.issues.push(util.issue(issue, payload.value, ch._zod.def));\n }\n else {\n // for Zod 3 backwards compatibility\n const _issue = issue;\n if (_issue.fatal)\n _issue.continue = false;\n _issue.code ?? (_issue.code = \"custom\");\n _issue.input ?? (_issue.input = payload.value);\n _issue.inst ?? (_issue.inst = ch);\n _issue.continue ?? (_issue.continue = !ch._zod.def.abort); // abort is always undefined, so this is always true...\n payload.issues.push(util.issue(_issue));\n }\n };\n return fn(payload.value, payload);\n });\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _check(fn, params) {\n const ch = new checks.$ZodCheck({\n check: \"custom\",\n ...util.normalizeParams(params),\n });\n ch._zod.check = fn;\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function describe(description) {\n const ch = new checks.$ZodCheck({ check: \"describe\" });\n ch._zod.onattach = [\n (inst) => {\n const existing = registries.globalRegistry.get(inst) ?? {};\n registries.globalRegistry.add(inst, { ...existing, description });\n },\n ];\n ch._zod.check = () => { }; // no-op check\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function meta(metadata) {\n const ch = new checks.$ZodCheck({ check: \"meta\" });\n ch._zod.onattach = [\n (inst) => {\n const existing = registries.globalRegistry.get(inst) ?? {};\n registries.globalRegistry.add(inst, { ...existing, ...metadata });\n },\n ];\n ch._zod.check = () => { }; // no-op check\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _stringbool(Classes, _params) {\n const params = util.normalizeParams(_params);\n let truthyArray = params.truthy ?? [\"true\", \"1\", \"yes\", \"on\", \"y\", \"enabled\"];\n let falsyArray = params.falsy ?? [\"false\", \"0\", \"no\", \"off\", \"n\", \"disabled\"];\n if (params.case !== \"sensitive\") {\n truthyArray = truthyArray.map((v) => (typeof v === \"string\" ? v.toLowerCase() : v));\n falsyArray = falsyArray.map((v) => (typeof v === \"string\" ? v.toLowerCase() : v));\n }\n const truthySet = new Set(truthyArray);\n const falsySet = new Set(falsyArray);\n const _Codec = Classes.Codec ?? schemas.$ZodCodec;\n const _Boolean = Classes.Boolean ?? schemas.$ZodBoolean;\n const _String = Classes.String ?? schemas.$ZodString;\n const stringSchema = new _String({ type: \"string\", error: params.error });\n const booleanSchema = new _Boolean({ type: \"boolean\", error: params.error });\n const codec = new _Codec({\n type: \"pipe\",\n in: stringSchema,\n out: booleanSchema,\n transform: ((input, payload) => {\n let data = input;\n if (params.case !== \"sensitive\")\n data = data.toLowerCase();\n if (truthySet.has(data)) {\n return true;\n }\n else if (falsySet.has(data)) {\n return false;\n }\n else {\n payload.issues.push({\n code: \"invalid_value\",\n expected: \"stringbool\",\n values: [...truthySet, ...falsySet],\n input: payload.value,\n inst: codec,\n continue: false,\n });\n return {};\n }\n }),\n reverseTransform: ((input, _payload) => {\n if (input === true) {\n return truthyArray[0] || \"true\";\n }\n else {\n return falsyArray[0] || \"false\";\n }\n }),\n error: params.error,\n });\n return codec;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _stringFormat(Class, format, fnOrRegex, _params = {}) {\n const params = util.normalizeParams(_params);\n const def = {\n ...util.normalizeParams(_params),\n check: \"string_format\",\n type: \"string\",\n format,\n fn: typeof fnOrRegex === \"function\" ? fnOrRegex : (val) => fnOrRegex.test(val),\n ...params,\n };\n if (fnOrRegex instanceof RegExp) {\n def.pattern = fnOrRegex;\n }\n const inst = new Class(def);\n return inst;\n}\n","import { globalRegistry } from \"./registries.js\";\n// function initializeContext<T extends schemas.$ZodType>(inputs: JSONSchemaGeneratorParams<T>): ToJSONSchemaContext<T> {\n// return {\n// processor: inputs.processor,\n// metadataRegistry: inputs.metadata ?? globalRegistry,\n// target: inputs.target ?? \"draft-2020-12\",\n// unrepresentable: inputs.unrepresentable ?? \"throw\",\n// };\n// }\nexport function initializeContext(params) {\n // Normalize target: convert old non-hyphenated versions to hyphenated versions\n let target = params?.target ?? \"draft-2020-12\";\n if (target === \"draft-4\")\n target = \"draft-04\";\n if (target === \"draft-7\")\n target = \"draft-07\";\n return {\n processors: params.processors ?? {},\n metadataRegistry: params?.metadata ?? globalRegistry,\n target,\n unrepresentable: params?.unrepresentable ?? \"throw\",\n override: params?.override ?? (() => { }),\n io: params?.io ?? \"output\",\n counter: 0,\n seen: new Map(),\n cycles: params?.cycles ?? \"ref\",\n reused: params?.reused ?? \"inline\",\n external: params?.external ?? undefined,\n };\n}\nexport function process(schema, ctx, _params = { path: [], schemaPath: [] }) {\n var _a;\n const def = schema._zod.def;\n // check for schema in seens\n const seen = ctx.seen.get(schema);\n if (seen) {\n seen.count++;\n // check if cycle\n const isCycle = _params.schemaPath.includes(schema);\n if (isCycle) {\n seen.cycle = _params.path;\n }\n return seen.schema;\n }\n // initialize\n const result = { schema: {}, count: 1, cycle: undefined, path: _params.path };\n ctx.seen.set(schema, result);\n // custom method overrides default behavior\n const overrideSchema = schema._zod.toJSONSchema?.();\n if (overrideSchema) {\n result.schema = overrideSchema;\n }\n else {\n const params = {\n ..._params,\n schemaPath: [..._params.schemaPath, schema],\n path: _params.path,\n };\n if (schema._zod.processJSONSchema) {\n schema._zod.processJSONSchema(ctx, result.schema, params);\n }\n else {\n const _json = result.schema;\n const processor = ctx.processors[def.type];\n if (!processor) {\n throw new Error(`[toJSONSchema]: Non-representable type encountered: ${def.type}`);\n }\n processor(schema, ctx, _json, params);\n }\n const parent = schema._zod.parent;\n if (parent) {\n // Also set ref if processor didn't (for inheritance)\n if (!result.ref)\n result.ref = parent;\n process(parent, ctx, params);\n ctx.seen.get(parent).isParent = true;\n }\n }\n // metadata\n const meta = ctx.metadataRegistry.get(schema);\n if (meta)\n Object.assign(result.schema, meta);\n if (ctx.io === \"input\" && isTransforming(schema)) {\n // examples/defaults only apply to output type of pipe\n delete result.schema.examples;\n delete result.schema.default;\n }\n // set prefault as default\n if (ctx.io === \"input\" && result.schema._prefault)\n (_a = result.schema).default ?? (_a.default = result.schema._prefault);\n delete result.schema._prefault;\n // pulling fresh from ctx.seen in case it was overwritten\n const _result = ctx.seen.get(schema);\n return _result.schema;\n}\nexport function extractDefs(ctx, schema\n// params: EmitParams\n) {\n // iterate over seen map;\n const root = ctx.seen.get(schema);\n if (!root)\n throw new Error(\"Unprocessed schema. This is a bug in Zod.\");\n // Track ids to detect duplicates across different schemas\n const idToSchema = new Map();\n for (const entry of ctx.seen.entries()) {\n const id = ctx.metadataRegistry.get(entry[0])?.id;\n if (id) {\n const existing = idToSchema.get(id);\n if (existing && existing !== entry[0]) {\n throw new Error(`Duplicate schema id \"${id}\" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);\n }\n idToSchema.set(id, entry[0]);\n }\n }\n // returns a ref to the schema\n // defId will be empty if the ref points to an external schema (or #)\n const makeURI = (entry) => {\n // comparing the seen objects because sometimes\n // multiple schemas map to the same seen object.\n // e.g. lazy\n // external is configured\n const defsSegment = ctx.target === \"draft-2020-12\" ? \"$defs\" : \"definitions\";\n if (ctx.external) {\n const externalId = ctx.external.registry.get(entry[0])?.id; // ?? \"__shared\";// `__schema${ctx.counter++}`;\n // check if schema is in the external registry\n const uriGenerator = ctx.external.uri ?? ((id) => id);\n if (externalId) {\n return { ref: uriGenerator(externalId) };\n }\n // otherwise, add to __shared\n const id = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx.counter++}`;\n entry[1].defId = id; // set defId so it will be reused if needed\n return { defId: id, ref: `${uriGenerator(\"__shared\")}#/${defsSegment}/${id}` };\n }\n if (entry[1] === root) {\n return { ref: \"#\" };\n }\n // self-contained schema\n const uriPrefix = `#`;\n const defUriPrefix = `${uriPrefix}/${defsSegment}/`;\n const defId = entry[1].schema.id ?? `__schema${ctx.counter++}`;\n return { defId, ref: defUriPrefix + defId };\n };\n // stored cached version in `def` property\n // remove all properties, set $ref\n const extractToDef = (entry) => {\n // if the schema is already a reference, do not extract it\n if (entry[1].schema.$ref) {\n return;\n }\n const seen = entry[1];\n const { ref, defId } = makeURI(entry);\n seen.def = { ...seen.schema };\n // defId won't be set if the schema is a reference to an external schema\n // or if the schema is the root schema\n if (defId)\n seen.defId = defId;\n // wipe away all properties except $ref\n const schema = seen.schema;\n for (const key in schema) {\n delete schema[key];\n }\n schema.$ref = ref;\n };\n // throw on cycles\n // break cycles\n if (ctx.cycles === \"throw\") {\n for (const entry of ctx.seen.entries()) {\n const seen = entry[1];\n if (seen.cycle) {\n throw new Error(\"Cycle detected: \" +\n `#/${seen.cycle?.join(\"/\")}/<root>` +\n '\\n\\nSet the `cycles` parameter to `\"ref\"` to resolve cyclical schemas with defs.');\n }\n }\n }\n // extract schemas into $defs\n for (const entry of ctx.seen.entries()) {\n const seen = entry[1];\n // convert root schema to # $ref\n if (schema === entry[0]) {\n extractToDef(entry); // this has special handling for the root schema\n continue;\n }\n // extract schemas that are in the external registry\n if (ctx.external) {\n const ext = ctx.external.registry.get(entry[0])?.id;\n if (schema !== entry[0] && ext) {\n extractToDef(entry);\n continue;\n }\n }\n // extract schemas with `id` meta\n const id = ctx.metadataRegistry.get(entry[0])?.id;\n if (id) {\n extractToDef(entry);\n continue;\n }\n // break cycles\n if (seen.cycle) {\n // any\n extractToDef(entry);\n continue;\n }\n // extract reused schemas\n if (seen.count > 1) {\n if (ctx.reused === \"ref\") {\n extractToDef(entry);\n // biome-ignore lint:\n continue;\n }\n }\n }\n}\nexport function finalize(ctx, schema) {\n const root = ctx.seen.get(schema);\n if (!root)\n throw new Error(\"Unprocessed schema. This is a bug in Zod.\");\n // flatten refs - inherit properties from parent schemas\n const flattenRef = (zodSchema) => {\n const seen = ctx.seen.get(zodSchema);\n // already processed\n if (seen.ref === null)\n return;\n const schema = seen.def ?? seen.schema;\n const _cached = { ...schema };\n const ref = seen.ref;\n seen.ref = null; // prevent infinite recursion\n if (ref) {\n flattenRef(ref);\n const refSeen = ctx.seen.get(ref);\n const refSchema = refSeen.schema;\n // merge referenced schema into current\n if (refSchema.$ref && (ctx.target === \"draft-07\" || ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\")) {\n // older drafts can't combine $ref with other properties\n schema.allOf = schema.allOf ?? [];\n schema.allOf.push(refSchema);\n }\n else {\n Object.assign(schema, refSchema);\n }\n // restore child's own properties (child wins)\n Object.assign(schema, _cached);\n const isParentRef = zodSchema._zod.parent === ref;\n // For parent chain, child is a refinement - remove parent-only properties\n if (isParentRef) {\n for (const key in schema) {\n if (key === \"$ref\" || key === \"allOf\")\n continue;\n if (!(key in _cached)) {\n delete schema[key];\n }\n }\n }\n // When ref was extracted to $defs, remove properties that match the definition\n if (refSchema.$ref && refSeen.def) {\n for (const key in schema) {\n if (key === \"$ref\" || key === \"allOf\")\n continue;\n if (key in refSeen.def && JSON.stringify(schema[key]) === JSON.stringify(refSeen.def[key])) {\n delete schema[key];\n }\n }\n }\n }\n // If parent was extracted (has $ref), propagate $ref to this schema\n // This handles cases like: readonly().meta({id}).describe()\n // where processor sets ref to innerType but parent should be referenced\n const parent = zodSchema._zod.parent;\n if (parent && parent !== ref) {\n // Ensure parent is processed first so its def has inherited properties\n flattenRef(parent);\n const parentSeen = ctx.seen.get(parent);\n if (parentSeen?.schema.$ref) {\n schema.$ref = parentSeen.schema.$ref;\n // De-duplicate with parent's definition\n if (parentSeen.def) {\n for (const key in schema) {\n if (key === \"$ref\" || key === \"allOf\")\n continue;\n if (key in parentSeen.def && JSON.stringify(schema[key]) === JSON.stringify(parentSeen.def[key])) {\n delete schema[key];\n }\n }\n }\n }\n }\n // execute overrides\n ctx.override({\n zodSchema: zodSchema,\n jsonSchema: schema,\n path: seen.path ?? [],\n });\n };\n for (const entry of [...ctx.seen.entries()].reverse()) {\n flattenRef(entry[0]);\n }\n const result = {};\n if (ctx.target === \"draft-2020-12\") {\n result.$schema = \"https://json-schema.org/draft/2020-12/schema\";\n }\n else if (ctx.target === \"draft-07\") {\n result.$schema = \"http://json-schema.org/draft-07/schema#\";\n }\n else if (ctx.target === \"draft-04\") {\n result.$schema = \"http://json-schema.org/draft-04/schema#\";\n }\n else if (ctx.target === \"openapi-3.0\") {\n // OpenAPI 3.0 schema objects should not include a $schema property\n }\n else {\n // Arbitrary string values are allowed but won't have a $schema property set\n }\n if (ctx.external?.uri) {\n const id = ctx.external.registry.get(schema)?.id;\n if (!id)\n throw new Error(\"Schema is missing an `id` property\");\n result.$id = ctx.external.uri(id);\n }\n Object.assign(result, root.def ?? root.schema);\n // build defs object\n const defs = ctx.external?.defs ?? {};\n for (const entry of ctx.seen.entries()) {\n const seen = entry[1];\n if (seen.def && seen.defId) {\n defs[seen.defId] = seen.def;\n }\n }\n // set definitions in result\n if (ctx.external) {\n }\n else {\n if (Object.keys(defs).length > 0) {\n if (ctx.target === \"draft-2020-12\") {\n result.$defs = defs;\n }\n else {\n result.definitions = defs;\n }\n }\n }\n try {\n // this \"finalizes\" this schema and ensures all cycles are removed\n // each call to finalize() is functionally independent\n // though the seen map is shared\n const finalized = JSON.parse(JSON.stringify(result));\n Object.defineProperty(finalized, \"~standard\", {\n value: {\n ...schema[\"~standard\"],\n jsonSchema: {\n input: createStandardJSONSchemaMethod(schema, \"input\", ctx.processors),\n output: createStandardJSONSchemaMethod(schema, \"output\", ctx.processors),\n },\n },\n enumerable: false,\n writable: false,\n });\n return finalized;\n }\n catch (_err) {\n throw new Error(\"Error converting schema to JSON.\");\n }\n}\nfunction isTransforming(_schema, _ctx) {\n const ctx = _ctx ?? { seen: new Set() };\n if (ctx.seen.has(_schema))\n return false;\n ctx.seen.add(_schema);\n const def = _schema._zod.def;\n if (def.type === \"transform\")\n return true;\n if (def.type === \"array\")\n return isTransforming(def.element, ctx);\n if (def.type === \"set\")\n return isTransforming(def.valueType, ctx);\n if (def.type === \"lazy\")\n return isTransforming(def.getter(), ctx);\n if (def.type === \"promise\" ||\n def.type === \"optional\" ||\n def.type === \"nonoptional\" ||\n def.type === \"nullable\" ||\n def.type === \"readonly\" ||\n def.type === \"default\" ||\n def.type === \"prefault\") {\n return isTransforming(def.innerType, ctx);\n }\n if (def.type === \"intersection\") {\n return isTransforming(def.left, ctx) || isTransforming(def.right, ctx);\n }\n if (def.type === \"record\" || def.type === \"map\") {\n return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);\n }\n if (def.type === \"pipe\") {\n return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);\n }\n if (def.type === \"object\") {\n for (const key in def.shape) {\n if (isTransforming(def.shape[key], ctx))\n return true;\n }\n return false;\n }\n if (def.type === \"union\") {\n for (const option of def.options) {\n if (isTransforming(option, ctx))\n return true;\n }\n return false;\n }\n if (def.type === \"tuple\") {\n for (const item of def.items) {\n if (isTransforming(item, ctx))\n return true;\n }\n if (def.rest && isTransforming(def.rest, ctx))\n return true;\n return false;\n }\n return false;\n}\n/**\n * Creates a toJSONSchema method for a schema instance.\n * This encapsulates the logic of initializing context, processing, extracting defs, and finalizing.\n */\nexport const createToJSONSchemaMethod = (schema, processors = {}) => (params) => {\n const ctx = initializeContext({ ...params, processors });\n process(schema, ctx);\n extractDefs(ctx, schema);\n return finalize(ctx, schema);\n};\nexport const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {\n const { libraryOptions, target } = params ?? {};\n const ctx = initializeContext({ ...(libraryOptions ?? {}), target, io, processors });\n process(schema, ctx);\n extractDefs(ctx, schema);\n return finalize(ctx, schema);\n};\n","import { extractDefs, finalize, initializeContext, process, } from \"./to-json-schema.js\";\nimport { getEnumValues } from \"./util.js\";\nconst formatMap = {\n guid: \"uuid\",\n url: \"uri\",\n datetime: \"date-time\",\n json_string: \"json-string\",\n regex: \"\", // do not set\n};\n// ==================== SIMPLE TYPE PROCESSORS ====================\nexport const stringProcessor = (schema, ctx, _json, _params) => {\n const json = _json;\n json.type = \"string\";\n const { minimum, maximum, format, patterns, contentEncoding } = schema._zod\n .bag;\n if (typeof minimum === \"number\")\n json.minLength = minimum;\n if (typeof maximum === \"number\")\n json.maxLength = maximum;\n // custom pattern overrides format\n if (format) {\n json.format = formatMap[format] ?? format;\n if (json.format === \"\")\n delete json.format; // empty format is not valid\n // JSON Schema format: \"time\" requires a full time with offset or Z\n // z.iso.time() does not include timezone information, so format: \"time\" should never be used\n if (format === \"time\") {\n delete json.format;\n }\n }\n if (contentEncoding)\n json.contentEncoding = contentEncoding;\n if (patterns && patterns.size > 0) {\n const regexes = [...patterns];\n if (regexes.length === 1)\n json.pattern = regexes[0].source;\n else if (regexes.length > 1) {\n json.allOf = [\n ...regexes.map((regex) => ({\n ...(ctx.target === \"draft-07\" || ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\"\n ? { type: \"string\" }\n : {}),\n pattern: regex.source,\n })),\n ];\n }\n }\n};\nexport const numberProcessor = (schema, ctx, _json, _params) => {\n const json = _json;\n const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;\n if (typeof format === \"string\" && format.includes(\"int\"))\n json.type = \"integer\";\n else\n json.type = \"number\";\n if (typeof exclusiveMinimum === \"number\") {\n if (ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\") {\n json.minimum = exclusiveMinimum;\n json.exclusiveMinimum = true;\n }\n else {\n json.exclusiveMinimum = exclusiveMinimum;\n }\n }\n if (typeof minimum === \"number\") {\n json.minimum = minimum;\n if (typeof exclusiveMinimum === \"number\" && ctx.target !== \"draft-04\") {\n if (exclusiveMinimum >= minimum)\n delete json.minimum;\n else\n delete json.exclusiveMinimum;\n }\n }\n if (typeof exclusiveMaximum === \"number\") {\n if (ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\") {\n json.maximum = exclusiveMaximum;\n json.exclusiveMaximum = true;\n }\n else {\n json.exclusiveMaximum = exclusiveMaximum;\n }\n }\n if (typeof maximum === \"number\") {\n json.maximum = maximum;\n if (typeof exclusiveMaximum === \"number\" && ctx.target !== \"draft-04\") {\n if (exclusiveMaximum <= maximum)\n delete json.maximum;\n else\n delete json.exclusiveMaximum;\n }\n }\n if (typeof multipleOf === \"number\")\n json.multipleOf = multipleOf;\n};\nexport const booleanProcessor = (_schema, _ctx, json, _params) => {\n json.type = \"boolean\";\n};\nexport const bigintProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"BigInt cannot be represented in JSON Schema\");\n }\n};\nexport const symbolProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Symbols cannot be represented in JSON Schema\");\n }\n};\nexport const nullProcessor = (_schema, ctx, json, _params) => {\n if (ctx.target === \"openapi-3.0\") {\n json.type = \"string\";\n json.nullable = true;\n json.enum = [null];\n }\n else {\n json.type = \"null\";\n }\n};\nexport const undefinedProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Undefined cannot be represented in JSON Schema\");\n }\n};\nexport const voidProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Void cannot be represented in JSON Schema\");\n }\n};\nexport const neverProcessor = (_schema, _ctx, json, _params) => {\n json.not = {};\n};\nexport const anyProcessor = (_schema, _ctx, _json, _params) => {\n // empty schema accepts anything\n};\nexport const unknownProcessor = (_schema, _ctx, _json, _params) => {\n // empty schema accepts anything\n};\nexport const dateProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Date cannot be represented in JSON Schema\");\n }\n};\nexport const enumProcessor = (schema, _ctx, json, _params) => {\n const def = schema._zod.def;\n const values = getEnumValues(def.entries);\n // Number enums can have both string and number values\n if (values.every((v) => typeof v === \"number\"))\n json.type = \"number\";\n if (values.every((v) => typeof v === \"string\"))\n json.type = \"string\";\n json.enum = values;\n};\nexport const literalProcessor = (schema, ctx, json, _params) => {\n const def = schema._zod.def;\n const vals = [];\n for (const val of def.values) {\n if (val === undefined) {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Literal `undefined` cannot be represented in JSON Schema\");\n }\n else {\n // do not add to vals\n }\n }\n else if (typeof val === \"bigint\") {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"BigInt literals cannot be represented in JSON Schema\");\n }\n else {\n vals.push(Number(val));\n }\n }\n else {\n vals.push(val);\n }\n }\n if (vals.length === 0) {\n // do nothing (an undefined literal was stripped)\n }\n else if (vals.length === 1) {\n const val = vals[0];\n json.type = val === null ? \"null\" : typeof val;\n if (ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\") {\n json.enum = [val];\n }\n else {\n json.const = val;\n }\n }\n else {\n if (vals.every((v) => typeof v === \"number\"))\n json.type = \"number\";\n if (vals.every((v) => typeof v === \"string\"))\n json.type = \"string\";\n if (vals.every((v) => typeof v === \"boolean\"))\n json.type = \"boolean\";\n if (vals.every((v) => v === null))\n json.type = \"null\";\n json.enum = vals;\n }\n};\nexport const nanProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"NaN cannot be represented in JSON Schema\");\n }\n};\nexport const templateLiteralProcessor = (schema, _ctx, json, _params) => {\n const _json = json;\n const pattern = schema._zod.pattern;\n if (!pattern)\n throw new Error(\"Pattern not found in template literal\");\n _json.type = \"string\";\n _json.pattern = pattern.source;\n};\nexport const fileProcessor = (schema, _ctx, json, _params) => {\n const _json = json;\n const file = {\n type: \"string\",\n format: \"binary\",\n contentEncoding: \"binary\",\n };\n const { minimum, maximum, mime } = schema._zod.bag;\n if (minimum !== undefined)\n file.minLength = minimum;\n if (maximum !== undefined)\n file.maxLength = maximum;\n if (mime) {\n if (mime.length === 1) {\n file.contentMediaType = mime[0];\n Object.assign(_json, file);\n }\n else {\n Object.assign(_json, file); // shared props at root\n _json.anyOf = mime.map((m) => ({ contentMediaType: m })); // only contentMediaType differs\n }\n }\n else {\n Object.assign(_json, file);\n }\n};\nexport const successProcessor = (_schema, _ctx, json, _params) => {\n json.type = \"boolean\";\n};\nexport const customProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Custom types cannot be represented in JSON Schema\");\n }\n};\nexport const functionProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Function types cannot be represented in JSON Schema\");\n }\n};\nexport const transformProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Transforms cannot be represented in JSON Schema\");\n }\n};\nexport const mapProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Map cannot be represented in JSON Schema\");\n }\n};\nexport const setProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Set cannot be represented in JSON Schema\");\n }\n};\n// ==================== COMPOSITE TYPE PROCESSORS ====================\nexport const arrayProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n const { minimum, maximum } = schema._zod.bag;\n if (typeof minimum === \"number\")\n json.minItems = minimum;\n if (typeof maximum === \"number\")\n json.maxItems = maximum;\n json.type = \"array\";\n json.items = process(def.element, ctx, { ...params, path: [...params.path, \"items\"] });\n};\nexport const objectProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n json.type = \"object\";\n json.properties = {};\n const shape = def.shape;\n for (const key in shape) {\n json.properties[key] = process(shape[key], ctx, {\n ...params,\n path: [...params.path, \"properties\", key],\n });\n }\n // required keys\n const allKeys = new Set(Object.keys(shape));\n const requiredKeys = new Set([...allKeys].filter((key) => {\n const v = def.shape[key]._zod;\n if (ctx.io === \"input\") {\n return v.optin === undefined;\n }\n else {\n return v.optout === undefined;\n }\n }));\n if (requiredKeys.size > 0) {\n json.required = Array.from(requiredKeys);\n }\n // catchall\n if (def.catchall?._zod.def.type === \"never\") {\n // strict\n json.additionalProperties = false;\n }\n else if (!def.catchall) {\n // regular\n if (ctx.io === \"output\")\n json.additionalProperties = false;\n }\n else if (def.catchall) {\n json.additionalProperties = process(def.catchall, ctx, {\n ...params,\n path: [...params.path, \"additionalProperties\"],\n });\n }\n};\nexport const unionProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n // Exclusive unions (inclusive === false) use oneOf (exactly one match) instead of anyOf (one or more matches)\n // This includes both z.xor() and discriminated unions\n const isExclusive = def.inclusive === false;\n const options = def.options.map((x, i) => process(x, ctx, {\n ...params,\n path: [...params.path, isExclusive ? \"oneOf\" : \"anyOf\", i],\n }));\n if (isExclusive) {\n json.oneOf = options;\n }\n else {\n json.anyOf = options;\n }\n};\nexport const intersectionProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n const a = process(def.left, ctx, {\n ...params,\n path: [...params.path, \"allOf\", 0],\n });\n const b = process(def.right, ctx, {\n ...params,\n path: [...params.path, \"allOf\", 1],\n });\n const isSimpleIntersection = (val) => \"allOf\" in val && Object.keys(val).length === 1;\n const allOf = [\n ...(isSimpleIntersection(a) ? a.allOf : [a]),\n ...(isSimpleIntersection(b) ? b.allOf : [b]),\n ];\n json.allOf = allOf;\n};\nexport const tupleProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n json.type = \"array\";\n const prefixPath = ctx.target === \"draft-2020-12\" ? \"prefixItems\" : \"items\";\n const restPath = ctx.target === \"draft-2020-12\" ? \"items\" : ctx.target === \"openapi-3.0\" ? \"items\" : \"additionalItems\";\n const prefixItems = def.items.map((x, i) => process(x, ctx, {\n ...params,\n path: [...params.path, prefixPath, i],\n }));\n const rest = def.rest\n ? process(def.rest, ctx, {\n ...params,\n path: [...params.path, restPath, ...(ctx.target === \"openapi-3.0\" ? [def.items.length] : [])],\n })\n : null;\n if (ctx.target === \"draft-2020-12\") {\n json.prefixItems = prefixItems;\n if (rest) {\n json.items = rest;\n }\n }\n else if (ctx.target === \"openapi-3.0\") {\n json.items = {\n anyOf: prefixItems,\n };\n if (rest) {\n json.items.anyOf.push(rest);\n }\n json.minItems = prefixItems.length;\n if (!rest) {\n json.maxItems = prefixItems.length;\n }\n }\n else {\n json.items = prefixItems;\n if (rest) {\n json.additionalItems = rest;\n }\n }\n // length\n const { minimum, maximum } = schema._zod.bag;\n if (typeof minimum === \"number\")\n json.minItems = minimum;\n if (typeof maximum === \"number\")\n json.maxItems = maximum;\n};\nexport const recordProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n json.type = \"object\";\n // For looseRecord with regex patterns, use patternProperties\n // This correctly represents \"only validate keys matching the pattern\" semantics\n // and composes well with allOf (intersections)\n const keyType = def.keyType;\n const keyBag = keyType._zod.bag;\n const patterns = keyBag?.patterns;\n if (def.mode === \"loose\" && patterns && patterns.size > 0) {\n // Use patternProperties for looseRecord with regex patterns\n const valueSchema = process(def.valueType, ctx, {\n ...params,\n path: [...params.path, \"patternProperties\", \"*\"],\n });\n json.patternProperties = {};\n for (const pattern of patterns) {\n json.patternProperties[pattern.source] = valueSchema;\n }\n }\n else {\n // Default behavior: use propertyNames + additionalProperties\n if (ctx.target === \"draft-07\" || ctx.target === \"draft-2020-12\") {\n json.propertyNames = process(def.keyType, ctx, {\n ...params,\n path: [...params.path, \"propertyNames\"],\n });\n }\n json.additionalProperties = process(def.valueType, ctx, {\n ...params,\n path: [...params.path, \"additionalProperties\"],\n });\n }\n // Add required for keys with discrete values (enum, literal, etc.)\n const keyValues = keyType._zod.values;\n if (keyValues) {\n const validKeyValues = [...keyValues].filter((v) => typeof v === \"string\" || typeof v === \"number\");\n if (validKeyValues.length > 0) {\n json.required = validKeyValues;\n }\n }\n};\nexport const nullableProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n const inner = process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n if (ctx.target === \"openapi-3.0\") {\n seen.ref = def.innerType;\n json.nullable = true;\n }\n else {\n json.anyOf = [inner, { type: \"null\" }];\n }\n};\nexport const nonoptionalProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n};\nexport const defaultProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n json.default = JSON.parse(JSON.stringify(def.defaultValue));\n};\nexport const prefaultProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n if (ctx.io === \"input\")\n json._prefault = JSON.parse(JSON.stringify(def.defaultValue));\n};\nexport const catchProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n let catchValue;\n try {\n catchValue = def.catchValue(undefined);\n }\n catch {\n throw new Error(\"Dynamic catch values are not supported in JSON Schema\");\n }\n json.default = catchValue;\n};\nexport const pipeProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n const innerType = ctx.io === \"input\" ? (def.in._zod.def.type === \"transform\" ? def.out : def.in) : def.out;\n process(innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = innerType;\n};\nexport const readonlyProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n json.readOnly = true;\n};\nexport const promiseProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n};\nexport const optionalProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n};\nexport const lazyProcessor = (schema, ctx, _json, params) => {\n const innerType = schema._zod.innerType;\n process(innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = innerType;\n};\n// ==================== ALL PROCESSORS ====================\nexport const allProcessors = {\n string: stringProcessor,\n number: numberProcessor,\n boolean: booleanProcessor,\n bigint: bigintProcessor,\n symbol: symbolProcessor,\n null: nullProcessor,\n undefined: undefinedProcessor,\n void: voidProcessor,\n never: neverProcessor,\n any: anyProcessor,\n unknown: unknownProcessor,\n date: dateProcessor,\n enum: enumProcessor,\n literal: literalProcessor,\n nan: nanProcessor,\n template_literal: templateLiteralProcessor,\n file: fileProcessor,\n success: successProcessor,\n custom: customProcessor,\n function: functionProcessor,\n transform: transformProcessor,\n map: mapProcessor,\n set: setProcessor,\n array: arrayProcessor,\n object: objectProcessor,\n union: unionProcessor,\n intersection: intersectionProcessor,\n tuple: tupleProcessor,\n record: recordProcessor,\n nullable: nullableProcessor,\n nonoptional: nonoptionalProcessor,\n default: defaultProcessor,\n prefault: prefaultProcessor,\n catch: catchProcessor,\n pipe: pipeProcessor,\n readonly: readonlyProcessor,\n promise: promiseProcessor,\n optional: optionalProcessor,\n lazy: lazyProcessor,\n};\nexport function toJSONSchema(input, params) {\n if (\"_idmap\" in input) {\n // Registry case\n const registry = input;\n const ctx = initializeContext({ ...params, processors: allProcessors });\n const defs = {};\n // First pass: process all schemas to build the seen map\n for (const entry of registry._idmap.entries()) {\n const [_, schema] = entry;\n process(schema, ctx);\n }\n const schemas = {};\n const external = {\n registry,\n uri: params?.uri,\n defs,\n };\n // Update the context with external configuration\n ctx.external = external;\n // Second pass: emit each schema\n for (const entry of registry._idmap.entries()) {\n const [key, schema] = entry;\n extractDefs(ctx, schema);\n schemas[key] = finalize(ctx, schema);\n }\n if (Object.keys(defs).length > 0) {\n const defsSegment = ctx.target === \"draft-2020-12\" ? \"$defs\" : \"definitions\";\n schemas.__shared = {\n [defsSegment]: defs,\n };\n }\n return { schemas };\n }\n // Single schema case\n const ctx = initializeContext({ ...params, processors: allProcessors });\n process(input, ctx);\n extractDefs(ctx, input);\n return finalize(ctx, input);\n}\n","import * as core from \"../core/index.js\";\nimport * as schemas from \"./schemas.js\";\nexport const ZodISODateTime = /*@__PURE__*/ core.$constructor(\"ZodISODateTime\", (inst, def) => {\n core.$ZodISODateTime.init(inst, def);\n schemas.ZodStringFormat.init(inst, def);\n});\nexport function datetime(params) {\n return core._isoDateTime(ZodISODateTime, params);\n}\nexport const ZodISODate = /*@__PURE__*/ core.$constructor(\"ZodISODate\", (inst, def) => {\n core.$ZodISODate.init(inst, def);\n schemas.ZodStringFormat.init(inst, def);\n});\nexport function date(params) {\n return core._isoDate(ZodISODate, params);\n}\nexport const ZodISOTime = /*@__PURE__*/ core.$constructor(\"ZodISOTime\", (inst, def) => {\n core.$ZodISOTime.init(inst, def);\n schemas.ZodStringFormat.init(inst, def);\n});\nexport function time(params) {\n return core._isoTime(ZodISOTime, params);\n}\nexport const ZodISODuration = /*@__PURE__*/ core.$constructor(\"ZodISODuration\", (inst, def) => {\n core.$ZodISODuration.init(inst, def);\n schemas.ZodStringFormat.init(inst, def);\n});\nexport function duration(params) {\n return core._isoDuration(ZodISODuration, params);\n}\n","import * as core from \"../core/index.js\";\nimport { $ZodError } from \"../core/index.js\";\nimport * as util from \"../core/util.js\";\nconst initializer = (inst, issues) => {\n $ZodError.init(inst, issues);\n inst.name = \"ZodError\";\n Object.defineProperties(inst, {\n format: {\n value: (mapper) => core.formatError(inst, mapper),\n // enumerable: false,\n },\n flatten: {\n value: (mapper) => core.flattenError(inst, mapper),\n // enumerable: false,\n },\n addIssue: {\n value: (issue) => {\n inst.issues.push(issue);\n inst.message = JSON.stringify(inst.issues, util.jsonStringifyReplacer, 2);\n },\n // enumerable: false,\n },\n addIssues: {\n value: (issues) => {\n inst.issues.push(...issues);\n inst.message = JSON.stringify(inst.issues, util.jsonStringifyReplacer, 2);\n },\n // enumerable: false,\n },\n isEmpty: {\n get() {\n return inst.issues.length === 0;\n },\n // enumerable: false,\n },\n });\n // Object.defineProperty(inst, \"isEmpty\", {\n // get() {\n // return inst.issues.length === 0;\n // },\n // });\n};\nexport const ZodError = core.$constructor(\"ZodError\", initializer);\nexport const ZodRealError = core.$constructor(\"ZodError\", initializer, {\n Parent: Error,\n});\n// /** @deprecated Use `z.core.$ZodErrorMapCtx` instead. */\n// export type ErrorMapCtx = core.$ZodErrorMapCtx;\n","import * as core from \"../core/index.js\";\nimport { ZodRealError } from \"./errors.js\";\nexport const parse = /* @__PURE__ */ core._parse(ZodRealError);\nexport const parseAsync = /* @__PURE__ */ core._parseAsync(ZodRealError);\nexport const safeParse = /* @__PURE__ */ core._safeParse(ZodRealError);\nexport const safeParseAsync = /* @__PURE__ */ core._safeParseAsync(ZodRealError);\n// Codec functions\nexport const encode = /* @__PURE__ */ core._encode(ZodRealError);\nexport const decode = /* @__PURE__ */ core._decode(ZodRealError);\nexport const encodeAsync = /* @__PURE__ */ core._encodeAsync(ZodRealError);\nexport const decodeAsync = /* @__PURE__ */ core._decodeAsync(ZodRealError);\nexport const safeEncode = /* @__PURE__ */ core._safeEncode(ZodRealError);\nexport const safeDecode = /* @__PURE__ */ core._safeDecode(ZodRealError);\nexport const safeEncodeAsync = /* @__PURE__ */ core._safeEncodeAsync(ZodRealError);\nexport const safeDecodeAsync = /* @__PURE__ */ core._safeDecodeAsync(ZodRealError);\n","import * as core from \"../core/index.js\";\nimport { util } from \"../core/index.js\";\nimport * as processors from \"../core/json-schema-processors.js\";\nimport { createStandardJSONSchemaMethod, createToJSONSchemaMethod } from \"../core/to-json-schema.js\";\nimport * as checks from \"./checks.js\";\nimport * as iso from \"./iso.js\";\nimport * as parse from \"./parse.js\";\nexport const ZodType = /*@__PURE__*/ core.$constructor(\"ZodType\", (inst, def) => {\n core.$ZodType.init(inst, def);\n Object.assign(inst[\"~standard\"], {\n jsonSchema: {\n input: createStandardJSONSchemaMethod(inst, \"input\"),\n output: createStandardJSONSchemaMethod(inst, \"output\"),\n },\n });\n inst.toJSONSchema = createToJSONSchemaMethod(inst, {});\n inst.def = def;\n inst.type = def.type;\n Object.defineProperty(inst, \"_def\", { value: def });\n // base methods\n inst.check = (...checks) => {\n return inst.clone(util.mergeDefs(def, {\n checks: [\n ...(def.checks ?? []),\n ...checks.map((ch) => typeof ch === \"function\" ? { _zod: { check: ch, def: { check: \"custom\" }, onattach: [] } } : ch),\n ],\n }), {\n parent: true,\n });\n };\n inst.with = inst.check;\n inst.clone = (def, params) => core.clone(inst, def, params);\n inst.brand = () => inst;\n inst.register = ((reg, meta) => {\n reg.add(inst, meta);\n return inst;\n });\n // parsing\n inst.parse = (data, params) => parse.parse(inst, data, params, { callee: inst.parse });\n inst.safeParse = (data, params) => parse.safeParse(inst, data, params);\n inst.parseAsync = async (data, params) => parse.parseAsync(inst, data, params, { callee: inst.parseAsync });\n inst.safeParseAsync = async (data, params) => parse.safeParseAsync(inst, data, params);\n inst.spa = inst.safeParseAsync;\n // encoding/decoding\n inst.encode = (data, params) => parse.encode(inst, data, params);\n inst.decode = (data, params) => parse.decode(inst, data, params);\n inst.encodeAsync = async (data, params) => parse.encodeAsync(inst, data, params);\n inst.decodeAsync = async (data, params) => parse.decodeAsync(inst, data, params);\n inst.safeEncode = (data, params) => parse.safeEncode(inst, data, params);\n inst.safeDecode = (data, params) => parse.safeDecode(inst, data, params);\n inst.safeEncodeAsync = async (data, params) => parse.safeEncodeAsync(inst, data, params);\n inst.safeDecodeAsync = async (data, params) => parse.safeDecodeAsync(inst, data, params);\n // refinements\n inst.refine = (check, params) => inst.check(refine(check, params));\n inst.superRefine = (refinement) => inst.check(superRefine(refinement));\n inst.overwrite = (fn) => inst.check(checks.overwrite(fn));\n // wrappers\n inst.optional = () => optional(inst);\n inst.exactOptional = () => exactOptional(inst);\n inst.nullable = () => nullable(inst);\n inst.nullish = () => optional(nullable(inst));\n inst.nonoptional = (params) => nonoptional(inst, params);\n inst.array = () => array(inst);\n inst.or = (arg) => union([inst, arg]);\n inst.and = (arg) => intersection(inst, arg);\n inst.transform = (tx) => pipe(inst, transform(tx));\n inst.default = (def) => _default(inst, def);\n inst.prefault = (def) => prefault(inst, def);\n // inst.coalesce = (def, params) => coalesce(inst, def, params);\n inst.catch = (params) => _catch(inst, params);\n inst.pipe = (target) => pipe(inst, target);\n inst.readonly = () => readonly(inst);\n // meta\n inst.describe = (description) => {\n const cl = inst.clone();\n core.globalRegistry.add(cl, { description });\n return cl;\n };\n Object.defineProperty(inst, \"description\", {\n get() {\n return core.globalRegistry.get(inst)?.description;\n },\n configurable: true,\n });\n inst.meta = (...args) => {\n if (args.length === 0) {\n return core.globalRegistry.get(inst);\n }\n const cl = inst.clone();\n core.globalRegistry.add(cl, args[0]);\n return cl;\n };\n // helpers\n inst.isOptional = () => inst.safeParse(undefined).success;\n inst.isNullable = () => inst.safeParse(null).success;\n inst.apply = (fn) => fn(inst);\n return inst;\n});\n/** @internal */\nexport const _ZodString = /*@__PURE__*/ core.$constructor(\"_ZodString\", (inst, def) => {\n core.$ZodString.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.stringProcessor(inst, ctx, json, params);\n const bag = inst._zod.bag;\n inst.format = bag.format ?? null;\n inst.minLength = bag.minimum ?? null;\n inst.maxLength = bag.maximum ?? null;\n // validations\n inst.regex = (...args) => inst.check(checks.regex(...args));\n inst.includes = (...args) => inst.check(checks.includes(...args));\n inst.startsWith = (...args) => inst.check(checks.startsWith(...args));\n inst.endsWith = (...args) => inst.check(checks.endsWith(...args));\n inst.min = (...args) => inst.check(checks.minLength(...args));\n inst.max = (...args) => inst.check(checks.maxLength(...args));\n inst.length = (...args) => inst.check(checks.length(...args));\n inst.nonempty = (...args) => inst.check(checks.minLength(1, ...args));\n inst.lowercase = (params) => inst.check(checks.lowercase(params));\n inst.uppercase = (params) => inst.check(checks.uppercase(params));\n // transforms\n inst.trim = () => inst.check(checks.trim());\n inst.normalize = (...args) => inst.check(checks.normalize(...args));\n inst.toLowerCase = () => inst.check(checks.toLowerCase());\n inst.toUpperCase = () => inst.check(checks.toUpperCase());\n inst.slugify = () => inst.check(checks.slugify());\n});\nexport const ZodString = /*@__PURE__*/ core.$constructor(\"ZodString\", (inst, def) => {\n core.$ZodString.init(inst, def);\n _ZodString.init(inst, def);\n inst.email = (params) => inst.check(core._email(ZodEmail, params));\n inst.url = (params) => inst.check(core._url(ZodURL, params));\n inst.jwt = (params) => inst.check(core._jwt(ZodJWT, params));\n inst.emoji = (params) => inst.check(core._emoji(ZodEmoji, params));\n inst.guid = (params) => inst.check(core._guid(ZodGUID, params));\n inst.uuid = (params) => inst.check(core._uuid(ZodUUID, params));\n inst.uuidv4 = (params) => inst.check(core._uuidv4(ZodUUID, params));\n inst.uuidv6 = (params) => inst.check(core._uuidv6(ZodUUID, params));\n inst.uuidv7 = (params) => inst.check(core._uuidv7(ZodUUID, params));\n inst.nanoid = (params) => inst.check(core._nanoid(ZodNanoID, params));\n inst.guid = (params) => inst.check(core._guid(ZodGUID, params));\n inst.cuid = (params) => inst.check(core._cuid(ZodCUID, params));\n inst.cuid2 = (params) => inst.check(core._cuid2(ZodCUID2, params));\n inst.ulid = (params) => inst.check(core._ulid(ZodULID, params));\n inst.base64 = (params) => inst.check(core._base64(ZodBase64, params));\n inst.base64url = (params) => inst.check(core._base64url(ZodBase64URL, params));\n inst.xid = (params) => inst.check(core._xid(ZodXID, params));\n inst.ksuid = (params) => inst.check(core._ksuid(ZodKSUID, params));\n inst.ipv4 = (params) => inst.check(core._ipv4(ZodIPv4, params));\n inst.ipv6 = (params) => inst.check(core._ipv6(ZodIPv6, params));\n inst.cidrv4 = (params) => inst.check(core._cidrv4(ZodCIDRv4, params));\n inst.cidrv6 = (params) => inst.check(core._cidrv6(ZodCIDRv6, params));\n inst.e164 = (params) => inst.check(core._e164(ZodE164, params));\n // iso\n inst.datetime = (params) => inst.check(iso.datetime(params));\n inst.date = (params) => inst.check(iso.date(params));\n inst.time = (params) => inst.check(iso.time(params));\n inst.duration = (params) => inst.check(iso.duration(params));\n});\nexport function string(params) {\n return core._string(ZodString, params);\n}\nexport const ZodStringFormat = /*@__PURE__*/ core.$constructor(\"ZodStringFormat\", (inst, def) => {\n core.$ZodStringFormat.init(inst, def);\n _ZodString.init(inst, def);\n});\nexport const ZodEmail = /*@__PURE__*/ core.$constructor(\"ZodEmail\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodEmail.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function email(params) {\n return core._email(ZodEmail, params);\n}\nexport const ZodGUID = /*@__PURE__*/ core.$constructor(\"ZodGUID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodGUID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function guid(params) {\n return core._guid(ZodGUID, params);\n}\nexport const ZodUUID = /*@__PURE__*/ core.$constructor(\"ZodUUID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodUUID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function uuid(params) {\n return core._uuid(ZodUUID, params);\n}\nexport function uuidv4(params) {\n return core._uuidv4(ZodUUID, params);\n}\n// ZodUUIDv6\nexport function uuidv6(params) {\n return core._uuidv6(ZodUUID, params);\n}\n// ZodUUIDv7\nexport function uuidv7(params) {\n return core._uuidv7(ZodUUID, params);\n}\nexport const ZodURL = /*@__PURE__*/ core.$constructor(\"ZodURL\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodURL.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function url(params) {\n return core._url(ZodURL, params);\n}\nexport function httpUrl(params) {\n return core._url(ZodURL, {\n protocol: /^https?$/,\n hostname: core.regexes.domain,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodEmoji = /*@__PURE__*/ core.$constructor(\"ZodEmoji\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodEmoji.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function emoji(params) {\n return core._emoji(ZodEmoji, params);\n}\nexport const ZodNanoID = /*@__PURE__*/ core.$constructor(\"ZodNanoID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodNanoID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function nanoid(params) {\n return core._nanoid(ZodNanoID, params);\n}\nexport const ZodCUID = /*@__PURE__*/ core.$constructor(\"ZodCUID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodCUID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function cuid(params) {\n return core._cuid(ZodCUID, params);\n}\nexport const ZodCUID2 = /*@__PURE__*/ core.$constructor(\"ZodCUID2\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodCUID2.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function cuid2(params) {\n return core._cuid2(ZodCUID2, params);\n}\nexport const ZodULID = /*@__PURE__*/ core.$constructor(\"ZodULID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodULID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function ulid(params) {\n return core._ulid(ZodULID, params);\n}\nexport const ZodXID = /*@__PURE__*/ core.$constructor(\"ZodXID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodXID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function xid(params) {\n return core._xid(ZodXID, params);\n}\nexport const ZodKSUID = /*@__PURE__*/ core.$constructor(\"ZodKSUID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodKSUID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function ksuid(params) {\n return core._ksuid(ZodKSUID, params);\n}\nexport const ZodIPv4 = /*@__PURE__*/ core.$constructor(\"ZodIPv4\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodIPv4.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function ipv4(params) {\n return core._ipv4(ZodIPv4, params);\n}\nexport const ZodMAC = /*@__PURE__*/ core.$constructor(\"ZodMAC\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodMAC.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function mac(params) {\n return core._mac(ZodMAC, params);\n}\nexport const ZodIPv6 = /*@__PURE__*/ core.$constructor(\"ZodIPv6\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodIPv6.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function ipv6(params) {\n return core._ipv6(ZodIPv6, params);\n}\nexport const ZodCIDRv4 = /*@__PURE__*/ core.$constructor(\"ZodCIDRv4\", (inst, def) => {\n core.$ZodCIDRv4.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function cidrv4(params) {\n return core._cidrv4(ZodCIDRv4, params);\n}\nexport const ZodCIDRv6 = /*@__PURE__*/ core.$constructor(\"ZodCIDRv6\", (inst, def) => {\n core.$ZodCIDRv6.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function cidrv6(params) {\n return core._cidrv6(ZodCIDRv6, params);\n}\nexport const ZodBase64 = /*@__PURE__*/ core.$constructor(\"ZodBase64\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodBase64.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function base64(params) {\n return core._base64(ZodBase64, params);\n}\nexport const ZodBase64URL = /*@__PURE__*/ core.$constructor(\"ZodBase64URL\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodBase64URL.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function base64url(params) {\n return core._base64url(ZodBase64URL, params);\n}\nexport const ZodE164 = /*@__PURE__*/ core.$constructor(\"ZodE164\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodE164.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function e164(params) {\n return core._e164(ZodE164, params);\n}\nexport const ZodJWT = /*@__PURE__*/ core.$constructor(\"ZodJWT\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodJWT.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function jwt(params) {\n return core._jwt(ZodJWT, params);\n}\nexport const ZodCustomStringFormat = /*@__PURE__*/ core.$constructor(\"ZodCustomStringFormat\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodCustomStringFormat.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function stringFormat(format, fnOrRegex, _params = {}) {\n return core._stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);\n}\nexport function hostname(_params) {\n return core._stringFormat(ZodCustomStringFormat, \"hostname\", core.regexes.hostname, _params);\n}\nexport function hex(_params) {\n return core._stringFormat(ZodCustomStringFormat, \"hex\", core.regexes.hex, _params);\n}\nexport function hash(alg, params) {\n const enc = params?.enc ?? \"hex\";\n const format = `${alg}_${enc}`;\n const regex = core.regexes[format];\n if (!regex)\n throw new Error(`Unrecognized hash format: ${format}`);\n return core._stringFormat(ZodCustomStringFormat, format, regex, params);\n}\nexport const ZodNumber = /*@__PURE__*/ core.$constructor(\"ZodNumber\", (inst, def) => {\n core.$ZodNumber.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.numberProcessor(inst, ctx, json, params);\n inst.gt = (value, params) => inst.check(checks.gt(value, params));\n inst.gte = (value, params) => inst.check(checks.gte(value, params));\n inst.min = (value, params) => inst.check(checks.gte(value, params));\n inst.lt = (value, params) => inst.check(checks.lt(value, params));\n inst.lte = (value, params) => inst.check(checks.lte(value, params));\n inst.max = (value, params) => inst.check(checks.lte(value, params));\n inst.int = (params) => inst.check(int(params));\n inst.safe = (params) => inst.check(int(params));\n inst.positive = (params) => inst.check(checks.gt(0, params));\n inst.nonnegative = (params) => inst.check(checks.gte(0, params));\n inst.negative = (params) => inst.check(checks.lt(0, params));\n inst.nonpositive = (params) => inst.check(checks.lte(0, params));\n inst.multipleOf = (value, params) => inst.check(checks.multipleOf(value, params));\n inst.step = (value, params) => inst.check(checks.multipleOf(value, params));\n // inst.finite = (params) => inst.check(core.finite(params));\n inst.finite = () => inst;\n const bag = inst._zod.bag;\n inst.minValue =\n Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;\n inst.maxValue =\n Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;\n inst.isInt = (bag.format ?? \"\").includes(\"int\") || Number.isSafeInteger(bag.multipleOf ?? 0.5);\n inst.isFinite = true;\n inst.format = bag.format ?? null;\n});\nexport function number(params) {\n return core._number(ZodNumber, params);\n}\nexport const ZodNumberFormat = /*@__PURE__*/ core.$constructor(\"ZodNumberFormat\", (inst, def) => {\n core.$ZodNumberFormat.init(inst, def);\n ZodNumber.init(inst, def);\n});\nexport function int(params) {\n return core._int(ZodNumberFormat, params);\n}\nexport function float32(params) {\n return core._float32(ZodNumberFormat, params);\n}\nexport function float64(params) {\n return core._float64(ZodNumberFormat, params);\n}\nexport function int32(params) {\n return core._int32(ZodNumberFormat, params);\n}\nexport function uint32(params) {\n return core._uint32(ZodNumberFormat, params);\n}\nexport const ZodBoolean = /*@__PURE__*/ core.$constructor(\"ZodBoolean\", (inst, def) => {\n core.$ZodBoolean.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.booleanProcessor(inst, ctx, json, params);\n});\nexport function boolean(params) {\n return core._boolean(ZodBoolean, params);\n}\nexport const ZodBigInt = /*@__PURE__*/ core.$constructor(\"ZodBigInt\", (inst, def) => {\n core.$ZodBigInt.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.bigintProcessor(inst, ctx, json, params);\n inst.gte = (value, params) => inst.check(checks.gte(value, params));\n inst.min = (value, params) => inst.check(checks.gte(value, params));\n inst.gt = (value, params) => inst.check(checks.gt(value, params));\n inst.gte = (value, params) => inst.check(checks.gte(value, params));\n inst.min = (value, params) => inst.check(checks.gte(value, params));\n inst.lt = (value, params) => inst.check(checks.lt(value, params));\n inst.lte = (value, params) => inst.check(checks.lte(value, params));\n inst.max = (value, params) => inst.check(checks.lte(value, params));\n inst.positive = (params) => inst.check(checks.gt(BigInt(0), params));\n inst.negative = (params) => inst.check(checks.lt(BigInt(0), params));\n inst.nonpositive = (params) => inst.check(checks.lte(BigInt(0), params));\n inst.nonnegative = (params) => inst.check(checks.gte(BigInt(0), params));\n inst.multipleOf = (value, params) => inst.check(checks.multipleOf(value, params));\n const bag = inst._zod.bag;\n inst.minValue = bag.minimum ?? null;\n inst.maxValue = bag.maximum ?? null;\n inst.format = bag.format ?? null;\n});\nexport function bigint(params) {\n return core._bigint(ZodBigInt, params);\n}\nexport const ZodBigIntFormat = /*@__PURE__*/ core.$constructor(\"ZodBigIntFormat\", (inst, def) => {\n core.$ZodBigIntFormat.init(inst, def);\n ZodBigInt.init(inst, def);\n});\n// int64\nexport function int64(params) {\n return core._int64(ZodBigIntFormat, params);\n}\n// uint64\nexport function uint64(params) {\n return core._uint64(ZodBigIntFormat, params);\n}\nexport const ZodSymbol = /*@__PURE__*/ core.$constructor(\"ZodSymbol\", (inst, def) => {\n core.$ZodSymbol.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.symbolProcessor(inst, ctx, json, params);\n});\nexport function symbol(params) {\n return core._symbol(ZodSymbol, params);\n}\nexport const ZodUndefined = /*@__PURE__*/ core.$constructor(\"ZodUndefined\", (inst, def) => {\n core.$ZodUndefined.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.undefinedProcessor(inst, ctx, json, params);\n});\nfunction _undefined(params) {\n return core._undefined(ZodUndefined, params);\n}\nexport { _undefined as undefined };\nexport const ZodNull = /*@__PURE__*/ core.$constructor(\"ZodNull\", (inst, def) => {\n core.$ZodNull.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.nullProcessor(inst, ctx, json, params);\n});\nfunction _null(params) {\n return core._null(ZodNull, params);\n}\nexport { _null as null };\nexport const ZodAny = /*@__PURE__*/ core.$constructor(\"ZodAny\", (inst, def) => {\n core.$ZodAny.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.anyProcessor(inst, ctx, json, params);\n});\nexport function any() {\n return core._any(ZodAny);\n}\nexport const ZodUnknown = /*@__PURE__*/ core.$constructor(\"ZodUnknown\", (inst, def) => {\n core.$ZodUnknown.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.unknownProcessor(inst, ctx, json, params);\n});\nexport function unknown() {\n return core._unknown(ZodUnknown);\n}\nexport const ZodNever = /*@__PURE__*/ core.$constructor(\"ZodNever\", (inst, def) => {\n core.$ZodNever.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.neverProcessor(inst, ctx, json, params);\n});\nexport function never(params) {\n return core._never(ZodNever, params);\n}\nexport const ZodVoid = /*@__PURE__*/ core.$constructor(\"ZodVoid\", (inst, def) => {\n core.$ZodVoid.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.voidProcessor(inst, ctx, json, params);\n});\nfunction _void(params) {\n return core._void(ZodVoid, params);\n}\nexport { _void as void };\nexport const ZodDate = /*@__PURE__*/ core.$constructor(\"ZodDate\", (inst, def) => {\n core.$ZodDate.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.dateProcessor(inst, ctx, json, params);\n inst.min = (value, params) => inst.check(checks.gte(value, params));\n inst.max = (value, params) => inst.check(checks.lte(value, params));\n const c = inst._zod.bag;\n inst.minDate = c.minimum ? new Date(c.minimum) : null;\n inst.maxDate = c.maximum ? new Date(c.maximum) : null;\n});\nexport function date(params) {\n return core._date(ZodDate, params);\n}\nexport const ZodArray = /*@__PURE__*/ core.$constructor(\"ZodArray\", (inst, def) => {\n core.$ZodArray.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.arrayProcessor(inst, ctx, json, params);\n inst.element = def.element;\n inst.min = (minLength, params) => inst.check(checks.minLength(minLength, params));\n inst.nonempty = (params) => inst.check(checks.minLength(1, params));\n inst.max = (maxLength, params) => inst.check(checks.maxLength(maxLength, params));\n inst.length = (len, params) => inst.check(checks.length(len, params));\n inst.unwrap = () => inst.element;\n});\nexport function array(element, params) {\n return core._array(ZodArray, element, params);\n}\n// .keyof\nexport function keyof(schema) {\n const shape = schema._zod.def.shape;\n return _enum(Object.keys(shape));\n}\nexport const ZodObject = /*@__PURE__*/ core.$constructor(\"ZodObject\", (inst, def) => {\n core.$ZodObjectJIT.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.objectProcessor(inst, ctx, json, params);\n util.defineLazy(inst, \"shape\", () => {\n return def.shape;\n });\n inst.keyof = () => _enum(Object.keys(inst._zod.def.shape));\n inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall: catchall });\n inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() });\n inst.loose = () => inst.clone({ ...inst._zod.def, catchall: unknown() });\n inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never() });\n inst.strip = () => inst.clone({ ...inst._zod.def, catchall: undefined });\n inst.extend = (incoming) => {\n return util.extend(inst, incoming);\n };\n inst.safeExtend = (incoming) => {\n return util.safeExtend(inst, incoming);\n };\n inst.merge = (other) => util.merge(inst, other);\n inst.pick = (mask) => util.pick(inst, mask);\n inst.omit = (mask) => util.omit(inst, mask);\n inst.partial = (...args) => util.partial(ZodOptional, inst, args[0]);\n inst.required = (...args) => util.required(ZodNonOptional, inst, args[0]);\n});\nexport function object(shape, params) {\n const def = {\n type: \"object\",\n shape: shape ?? {},\n ...util.normalizeParams(params),\n };\n return new ZodObject(def);\n}\n// strictObject\nexport function strictObject(shape, params) {\n return new ZodObject({\n type: \"object\",\n shape,\n catchall: never(),\n ...util.normalizeParams(params),\n });\n}\n// looseObject\nexport function looseObject(shape, params) {\n return new ZodObject({\n type: \"object\",\n shape,\n catchall: unknown(),\n ...util.normalizeParams(params),\n });\n}\nexport const ZodUnion = /*@__PURE__*/ core.$constructor(\"ZodUnion\", (inst, def) => {\n core.$ZodUnion.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.unionProcessor(inst, ctx, json, params);\n inst.options = def.options;\n});\nexport function union(options, params) {\n return new ZodUnion({\n type: \"union\",\n options: options,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodXor = /*@__PURE__*/ core.$constructor(\"ZodXor\", (inst, def) => {\n ZodUnion.init(inst, def);\n core.$ZodXor.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.unionProcessor(inst, ctx, json, params);\n inst.options = def.options;\n});\n/** Creates an exclusive union (XOR) where exactly one option must match.\n * Unlike regular unions that succeed when any option matches, xor fails if\n * zero or more than one option matches the input. */\nexport function xor(options, params) {\n return new ZodXor({\n type: \"union\",\n options: options,\n inclusive: false,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodDiscriminatedUnion = /*@__PURE__*/ core.$constructor(\"ZodDiscriminatedUnion\", (inst, def) => {\n ZodUnion.init(inst, def);\n core.$ZodDiscriminatedUnion.init(inst, def);\n});\nexport function discriminatedUnion(discriminator, options, params) {\n // const [options, params] = args;\n return new ZodDiscriminatedUnion({\n type: \"union\",\n options,\n discriminator,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodIntersection = /*@__PURE__*/ core.$constructor(\"ZodIntersection\", (inst, def) => {\n core.$ZodIntersection.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.intersectionProcessor(inst, ctx, json, params);\n});\nexport function intersection(left, right) {\n return new ZodIntersection({\n type: \"intersection\",\n left: left,\n right: right,\n });\n}\nexport const ZodTuple = /*@__PURE__*/ core.$constructor(\"ZodTuple\", (inst, def) => {\n core.$ZodTuple.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.tupleProcessor(inst, ctx, json, params);\n inst.rest = (rest) => inst.clone({\n ...inst._zod.def,\n rest: rest,\n });\n});\nexport function tuple(items, _paramsOrRest, _params) {\n const hasRest = _paramsOrRest instanceof core.$ZodType;\n const params = hasRest ? _params : _paramsOrRest;\n const rest = hasRest ? _paramsOrRest : null;\n return new ZodTuple({\n type: \"tuple\",\n items: items,\n rest,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodRecord = /*@__PURE__*/ core.$constructor(\"ZodRecord\", (inst, def) => {\n core.$ZodRecord.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.recordProcessor(inst, ctx, json, params);\n inst.keyType = def.keyType;\n inst.valueType = def.valueType;\n});\nexport function record(keyType, valueType, params) {\n return new ZodRecord({\n type: \"record\",\n keyType,\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\n// type alksjf = core.output<core.$ZodRecordKey>;\nexport function partialRecord(keyType, valueType, params) {\n const k = core.clone(keyType);\n k._zod.values = undefined;\n return new ZodRecord({\n type: \"record\",\n keyType: k,\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\nexport function looseRecord(keyType, valueType, params) {\n return new ZodRecord({\n type: \"record\",\n keyType,\n valueType: valueType,\n mode: \"loose\",\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMap = /*@__PURE__*/ core.$constructor(\"ZodMap\", (inst, def) => {\n core.$ZodMap.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.mapProcessor(inst, ctx, json, params);\n inst.keyType = def.keyType;\n inst.valueType = def.valueType;\n inst.min = (...args) => inst.check(core._minSize(...args));\n inst.nonempty = (params) => inst.check(core._minSize(1, params));\n inst.max = (...args) => inst.check(core._maxSize(...args));\n inst.size = (...args) => inst.check(core._size(...args));\n});\nexport function map(keyType, valueType, params) {\n return new ZodMap({\n type: \"map\",\n keyType: keyType,\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodSet = /*@__PURE__*/ core.$constructor(\"ZodSet\", (inst, def) => {\n core.$ZodSet.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.setProcessor(inst, ctx, json, params);\n inst.min = (...args) => inst.check(core._minSize(...args));\n inst.nonempty = (params) => inst.check(core._minSize(1, params));\n inst.max = (...args) => inst.check(core._maxSize(...args));\n inst.size = (...args) => inst.check(core._size(...args));\n});\nexport function set(valueType, params) {\n return new ZodSet({\n type: \"set\",\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodEnum = /*@__PURE__*/ core.$constructor(\"ZodEnum\", (inst, def) => {\n core.$ZodEnum.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.enumProcessor(inst, ctx, json, params);\n inst.enum = def.entries;\n inst.options = Object.values(def.entries);\n const keys = new Set(Object.keys(def.entries));\n inst.extract = (values, params) => {\n const newEntries = {};\n for (const value of values) {\n if (keys.has(value)) {\n newEntries[value] = def.entries[value];\n }\n else\n throw new Error(`Key ${value} not found in enum`);\n }\n return new ZodEnum({\n ...def,\n checks: [],\n ...util.normalizeParams(params),\n entries: newEntries,\n });\n };\n inst.exclude = (values, params) => {\n const newEntries = { ...def.entries };\n for (const value of values) {\n if (keys.has(value)) {\n delete newEntries[value];\n }\n else\n throw new Error(`Key ${value} not found in enum`);\n }\n return new ZodEnum({\n ...def,\n checks: [],\n ...util.normalizeParams(params),\n entries: newEntries,\n });\n };\n});\nfunction _enum(values, params) {\n const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;\n return new ZodEnum({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\nexport { _enum as enum };\n/** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.\n *\n * ```ts\n * enum Colors { red, green, blue }\n * z.enum(Colors);\n * ```\n */\nexport function nativeEnum(entries, params) {\n return new ZodEnum({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodLiteral = /*@__PURE__*/ core.$constructor(\"ZodLiteral\", (inst, def) => {\n core.$ZodLiteral.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.literalProcessor(inst, ctx, json, params);\n inst.values = new Set(def.values);\n Object.defineProperty(inst, \"value\", {\n get() {\n if (def.values.length > 1) {\n throw new Error(\"This schema contains multiple valid literal values. Use `.values` instead.\");\n }\n return def.values[0];\n },\n });\n});\nexport function literal(value, params) {\n return new ZodLiteral({\n type: \"literal\",\n values: Array.isArray(value) ? value : [value],\n ...util.normalizeParams(params),\n });\n}\nexport const ZodFile = /*@__PURE__*/ core.$constructor(\"ZodFile\", (inst, def) => {\n core.$ZodFile.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.fileProcessor(inst, ctx, json, params);\n inst.min = (size, params) => inst.check(core._minSize(size, params));\n inst.max = (size, params) => inst.check(core._maxSize(size, params));\n inst.mime = (types, params) => inst.check(core._mime(Array.isArray(types) ? types : [types], params));\n});\nexport function file(params) {\n return core._file(ZodFile, params);\n}\nexport const ZodTransform = /*@__PURE__*/ core.$constructor(\"ZodTransform\", (inst, def) => {\n core.$ZodTransform.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.transformProcessor(inst, ctx, json, params);\n inst._zod.parse = (payload, _ctx) => {\n if (_ctx.direction === \"backward\") {\n throw new core.$ZodEncodeError(inst.constructor.name);\n }\n payload.addIssue = (issue) => {\n if (typeof issue === \"string\") {\n payload.issues.push(util.issue(issue, payload.value, def));\n }\n else {\n // for Zod 3 backwards compatibility\n const _issue = issue;\n if (_issue.fatal)\n _issue.continue = false;\n _issue.code ?? (_issue.code = \"custom\");\n _issue.input ?? (_issue.input = payload.value);\n _issue.inst ?? (_issue.inst = inst);\n // _issue.continue ??= true;\n payload.issues.push(util.issue(_issue));\n }\n };\n const output = def.transform(payload.value, payload);\n if (output instanceof Promise) {\n return output.then((output) => {\n payload.value = output;\n return payload;\n });\n }\n payload.value = output;\n return payload;\n };\n});\nexport function transform(fn) {\n return new ZodTransform({\n type: \"transform\",\n transform: fn,\n });\n}\nexport const ZodOptional = /*@__PURE__*/ core.$constructor(\"ZodOptional\", (inst, def) => {\n core.$ZodOptional.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.optionalProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function optional(innerType) {\n return new ZodOptional({\n type: \"optional\",\n innerType: innerType,\n });\n}\nexport const ZodExactOptional = /*@__PURE__*/ core.$constructor(\"ZodExactOptional\", (inst, def) => {\n core.$ZodExactOptional.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.optionalProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function exactOptional(innerType) {\n return new ZodExactOptional({\n type: \"optional\",\n innerType: innerType,\n });\n}\nexport const ZodNullable = /*@__PURE__*/ core.$constructor(\"ZodNullable\", (inst, def) => {\n core.$ZodNullable.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.nullableProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function nullable(innerType) {\n return new ZodNullable({\n type: \"nullable\",\n innerType: innerType,\n });\n}\n// nullish\nexport function nullish(innerType) {\n return optional(nullable(innerType));\n}\nexport const ZodDefault = /*@__PURE__*/ core.$constructor(\"ZodDefault\", (inst, def) => {\n core.$ZodDefault.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.defaultProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n inst.removeDefault = inst.unwrap;\n});\nexport function _default(innerType, defaultValue) {\n return new ZodDefault({\n type: \"default\",\n innerType: innerType,\n get defaultValue() {\n return typeof defaultValue === \"function\" ? defaultValue() : util.shallowClone(defaultValue);\n },\n });\n}\nexport const ZodPrefault = /*@__PURE__*/ core.$constructor(\"ZodPrefault\", (inst, def) => {\n core.$ZodPrefault.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.prefaultProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function prefault(innerType, defaultValue) {\n return new ZodPrefault({\n type: \"prefault\",\n innerType: innerType,\n get defaultValue() {\n return typeof defaultValue === \"function\" ? defaultValue() : util.shallowClone(defaultValue);\n },\n });\n}\nexport const ZodNonOptional = /*@__PURE__*/ core.$constructor(\"ZodNonOptional\", (inst, def) => {\n core.$ZodNonOptional.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.nonoptionalProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function nonoptional(innerType, params) {\n return new ZodNonOptional({\n type: \"nonoptional\",\n innerType: innerType,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodSuccess = /*@__PURE__*/ core.$constructor(\"ZodSuccess\", (inst, def) => {\n core.$ZodSuccess.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.successProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function success(innerType) {\n return new ZodSuccess({\n type: \"success\",\n innerType: innerType,\n });\n}\nexport const ZodCatch = /*@__PURE__*/ core.$constructor(\"ZodCatch\", (inst, def) => {\n core.$ZodCatch.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.catchProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n inst.removeCatch = inst.unwrap;\n});\nfunction _catch(innerType, catchValue) {\n return new ZodCatch({\n type: \"catch\",\n innerType: innerType,\n catchValue: (typeof catchValue === \"function\" ? catchValue : () => catchValue),\n });\n}\nexport { _catch as catch };\nexport const ZodNaN = /*@__PURE__*/ core.$constructor(\"ZodNaN\", (inst, def) => {\n core.$ZodNaN.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.nanProcessor(inst, ctx, json, params);\n});\nexport function nan(params) {\n return core._nan(ZodNaN, params);\n}\nexport const ZodPipe = /*@__PURE__*/ core.$constructor(\"ZodPipe\", (inst, def) => {\n core.$ZodPipe.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.pipeProcessor(inst, ctx, json, params);\n inst.in = def.in;\n inst.out = def.out;\n});\nexport function pipe(in_, out) {\n return new ZodPipe({\n type: \"pipe\",\n in: in_,\n out: out,\n // ...util.normalizeParams(params),\n });\n}\nexport const ZodCodec = /*@__PURE__*/ core.$constructor(\"ZodCodec\", (inst, def) => {\n ZodPipe.init(inst, def);\n core.$ZodCodec.init(inst, def);\n});\nexport function codec(in_, out, params) {\n return new ZodCodec({\n type: \"pipe\",\n in: in_,\n out: out,\n transform: params.decode,\n reverseTransform: params.encode,\n });\n}\nexport const ZodReadonly = /*@__PURE__*/ core.$constructor(\"ZodReadonly\", (inst, def) => {\n core.$ZodReadonly.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.readonlyProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function readonly(innerType) {\n return new ZodReadonly({\n type: \"readonly\",\n innerType: innerType,\n });\n}\nexport const ZodTemplateLiteral = /*@__PURE__*/ core.$constructor(\"ZodTemplateLiteral\", (inst, def) => {\n core.$ZodTemplateLiteral.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.templateLiteralProcessor(inst, ctx, json, params);\n});\nexport function templateLiteral(parts, params) {\n return new ZodTemplateLiteral({\n type: \"template_literal\",\n parts,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodLazy = /*@__PURE__*/ core.$constructor(\"ZodLazy\", (inst, def) => {\n core.$ZodLazy.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.lazyProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.getter();\n});\nexport function lazy(getter) {\n return new ZodLazy({\n type: \"lazy\",\n getter: getter,\n });\n}\nexport const ZodPromise = /*@__PURE__*/ core.$constructor(\"ZodPromise\", (inst, def) => {\n core.$ZodPromise.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.promiseProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function promise(innerType) {\n return new ZodPromise({\n type: \"promise\",\n innerType: innerType,\n });\n}\nexport const ZodFunction = /*@__PURE__*/ core.$constructor(\"ZodFunction\", (inst, def) => {\n core.$ZodFunction.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.functionProcessor(inst, ctx, json, params);\n});\nexport function _function(params) {\n return new ZodFunction({\n type: \"function\",\n input: Array.isArray(params?.input) ? tuple(params?.input) : (params?.input ?? array(unknown())),\n output: params?.output ?? unknown(),\n });\n}\nexport { _function as function };\nexport const ZodCustom = /*@__PURE__*/ core.$constructor(\"ZodCustom\", (inst, def) => {\n core.$ZodCustom.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.customProcessor(inst, ctx, json, params);\n});\n// custom checks\nexport function check(fn) {\n const ch = new core.$ZodCheck({\n check: \"custom\",\n // ...util.normalizeParams(params),\n });\n ch._zod.check = fn;\n return ch;\n}\nexport function custom(fn, _params) {\n return core._custom(ZodCustom, fn ?? (() => true), _params);\n}\nexport function refine(fn, _params = {}) {\n return core._refine(ZodCustom, fn, _params);\n}\n// superRefine\nexport function superRefine(fn) {\n return core._superRefine(fn);\n}\n// Re-export describe and meta from core\nexport const describe = core.describe;\nexport const meta = core.meta;\nfunction _instanceof(cls, params = {}) {\n const inst = new ZodCustom({\n type: \"custom\",\n check: \"custom\",\n fn: (data) => data instanceof cls,\n abort: true,\n ...util.normalizeParams(params),\n });\n inst._zod.bag.Class = cls;\n // Override check to emit invalid_type instead of custom\n inst._zod.check = (payload) => {\n if (!(payload.value instanceof cls)) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: cls.name,\n input: payload.value,\n inst,\n path: [...(inst._zod.def.path ?? [])],\n });\n }\n };\n return inst;\n}\nexport { _instanceof as instanceof };\n// stringbool\nexport const stringbool = (...args) => core._stringbool({\n Codec: ZodCodec,\n Boolean: ZodBoolean,\n String: ZodString,\n}, ...args);\nexport function json(params) {\n const jsonSchema = lazy(() => {\n return union([string(params), number(), boolean(), _null(), array(jsonSchema), record(string(), jsonSchema)]);\n });\n return jsonSchema;\n}\n// preprocess\n// /** @deprecated Use `z.pipe()` and `z.transform()` instead. */\nexport function preprocess(fn, schema) {\n return pipe(transform(fn), schema);\n}\n","// Zod 3 compat layer\nimport * as core from \"../core/index.js\";\n/** @deprecated Use the raw string literal codes instead, e.g. \"invalid_type\". */\nexport const ZodIssueCode = {\n invalid_type: \"invalid_type\",\n too_big: \"too_big\",\n too_small: \"too_small\",\n invalid_format: \"invalid_format\",\n not_multiple_of: \"not_multiple_of\",\n unrecognized_keys: \"unrecognized_keys\",\n invalid_union: \"invalid_union\",\n invalid_key: \"invalid_key\",\n invalid_element: \"invalid_element\",\n invalid_value: \"invalid_value\",\n custom: \"custom\",\n};\nexport { $brand, config } from \"../core/index.js\";\n/** @deprecated Use `z.config(params)` instead. */\nexport function setErrorMap(map) {\n core.config({\n customError: map,\n });\n}\n/** @deprecated Use `z.config()` instead. */\nexport function getErrorMap() {\n return core.config().customError;\n}\n/** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */\nexport var ZodFirstPartyTypeKind;\n(function (ZodFirstPartyTypeKind) {\n})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));\n","import { z } from \"zod/v4\";\n\n//#region src/schemas/daemon/conversation-contract.ts\nconst upstreamConversationRefKindSchema = z.enum([\n\t\"session\",\n\t\"thread\",\n\t\"context\"\n]);\nconst trimmedNonEmptyStringSchema = z.string().trim().min(1);\nconst canonicalUpstreamConversationRefSchema = z.strictObject({\n\tproviderId: trimmedNonEmptyStringSchema,\n\trefKind: upstreamConversationRefKindSchema,\n\tconversationRefId: trimmedNonEmptyStringSchema\n});\nconst legacyUpstreamConversationRefSchema = z.strictObject({\n\tproviderId: trimmedNonEmptyStringSchema,\n\trefKind: upstreamConversationRefKindSchema,\n\trefId: trimmedNonEmptyStringSchema\n}).transform((input) => ({\n\tproviderId: input.providerId,\n\trefKind: input.refKind,\n\tconversationRefId: input.refId\n}));\nconst upstreamConversationRefSchema = z.union([canonicalUpstreamConversationRefSchema, legacyUpstreamConversationRefSchema]);\nconst conversationPolicySchema = z.strictObject({\n\tmodel: z.string().min(1).optional(),\n\treasoningLevel: z.string().min(1).optional()\n});\nconst BUILTIN_UPSTREAM_CONVERSATION_REF_KIND_BY_PROVIDER = {\n\tcodex: \"thread\",\n\t\"claude-code\": \"session\",\n\topenclaw: \"session\"\n};\nconst BUILTIN_PROVIDER_ALLOWS_DISTINCT_AGENT_CONTEXT_ID = { openclaw: true };\nconst resolveBuiltinUpstreamConversationRefKind = (providerId) => BUILTIN_UPSTREAM_CONVERSATION_REF_KIND_BY_PROVIDER[providerId] ?? null;\nconst builtinProviderAllowsDistinctAgentContextId = (providerId) => BUILTIN_PROVIDER_ALLOWS_DISTINCT_AGENT_CONTEXT_ID[providerId] === true;\nconst buildUpstreamConversationRef = (input) => ({\n\tproviderId: input.providerId,\n\trefKind: input.refKind,\n\tconversationRefId: input.conversationRefId\n});\n\n//#endregion\n//#region src/schemas/daemon/route-observation-summary.ts\nconst DAEMON_ROUTE_OBSERVATION_STATUS_VALUES = [\n\t\"online\",\n\t\"offline\",\n\t\"unavailable\"\n];\nconst DAEMON_ROUTE_OBSERVATION_UNAVAILABLE_REASON_CODE_VALUES = [\n\t\"lookup_failed\",\n\t\"not_requested\",\n\t\"profile_not_agent\",\n\t\"profile_not_selected\",\n\t\"server_unsupported\"\n];\nconst DAEMON_ROUTE_OBSERVATION_REASON_CODE_VALUES = [\n\t\"online\",\n\t\"route.not_registered\",\n\t...DAEMON_ROUTE_OBSERVATION_UNAVAILABLE_REASON_CODE_VALUES\n];\nconst daemonRouteObservationStatusSchema = z.enum(DAEMON_ROUTE_OBSERVATION_STATUS_VALUES);\nconst daemonRouteObservationUnavailableReasonCodeSchema = z.enum(DAEMON_ROUTE_OBSERVATION_UNAVAILABLE_REASON_CODE_VALUES);\nconst daemonRouteObservationReasonCodeSchema = z.enum(DAEMON_ROUTE_OBSERVATION_REASON_CODE_VALUES);\nconst CANONICAL_UNAVAILABLE_REASON_CODE_SET = new Set(DAEMON_ROUTE_OBSERVATION_UNAVAILABLE_REASON_CODE_VALUES);\nfunction isCanonicalUnavailableReasonCode(value) {\n\treturn value !== null && value !== void 0 ? CANONICAL_UNAVAILABLE_REASON_CODE_SET.has(value) : false;\n}\nfunction createDaemonRouteObservationSummary(input) {\n\tif (input.status === \"online\") return {\n\t\tobservedAt: input.observedAt,\n\t\treasonCode: \"online\",\n\t\tstatus: \"online\"\n\t};\n\tif (input.status === \"offline\") return {\n\t\tobservedAt: input.observedAt,\n\t\treasonCode: \"route.not_registered\",\n\t\tstatus: \"offline\"\n\t};\n\treturn {\n\t\tobservedAt: input.observedAt,\n\t\treasonCode: isCanonicalUnavailableReasonCode(input.reasonCode) ? input.reasonCode : \"lookup_failed\",\n\t\tstatus: \"unavailable\"\n\t};\n}\nconst daemonRouteObservationSummarySchema = z.strictObject({\n\tobservedAt: z.iso.datetime({ offset: true }),\n\treasonCode: daemonRouteObservationReasonCodeSchema,\n\tstatus: daemonRouteObservationStatusSchema\n}).superRefine((value, ctx) => {\n\tif (value.status === \"online\" && value.reasonCode !== \"online\") ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"online route observation must use online reasonCode\",\n\t\tpath: [\"reasonCode\"]\n\t});\n\tif (value.status === \"offline\" && value.reasonCode !== \"route.not_registered\") ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"offline route observation must normalize to route.not_registered\",\n\t\tpath: [\"reasonCode\"]\n\t});\n\tif (value.status === \"unavailable\" && (value.reasonCode === \"online\" || value.reasonCode === \"route.not_registered\")) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"unavailable route observation must use an unavailable reasonCode\",\n\t\tpath: [\"reasonCode\"]\n\t});\n});\n\n//#endregion\n//#region src/schemas/protocol/constants.ts\nconst MAX_PROFILE_ID_LENGTH = 64;\nconst MAX_PROFILE_NAME_LENGTH = 64;\nconst MAX_TEXT_LENGTH = 4e3;\n\n//#endregion\n//#region src/schemas/protocol/shared.ts\nconst trimmedStringFromUnknown = (value) => String(value ?? \"\").trim();\nconst nonEmptyTrimmedStringFromUnknown = z.preprocess(trimmedStringFromUnknown, z.string().min(1));\nconst finiteIntegerNumber = z.number().int().finite();\n\n//#endregion\n//#region src/schemas/protocol/profile.ts\nconst PROFILE_KIND_VALUES = [\n\t\"human\",\n\t\"agent\",\n\t\"system\"\n];\nconst PROFILE_HANDLE_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/;\nconst UUID_PROFILE_ID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;\nconst AGENT_PROFILE_ID_PATTERN = /^agt_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;\nconst MAX_PROFILE_HANDLE_LENGTH = 128;\nconst normalizeOptionalProfileLabel = (value) => {\n\tconst normalized = trimmedStringFromUnknown(value);\n\tif (normalized.length === 0) return;\n\treturn normalized.slice(0, MAX_PROFILE_NAME_LENGTH);\n};\nconst normalizeOptionalProfileHandle = (value) => {\n\tconst normalized = trimmedStringFromUnknown(value);\n\tif (normalized.length === 0) return;\n\treturn profileHandleSchema.safeParse(normalized).success ? normalized : void 0;\n};\nconst MAX_PROFILE_WORKING_DIRECTORY_LENGTH = 4096;\nconst profileWorkspaceModeSchema = z.enum([\"ats_managed\", \"custom\"]);\nconst profileWorkingDirectorySchema = z.string().min(1).max(MAX_PROFILE_WORKING_DIRECTORY_LENGTH).refine((value) => !value.includes(\"\\0\"), { message: \"workingDirectory must not contain NUL bytes\" });\nconst normalizeOptionalWorkingDirectory = (value) => {\n\tif (typeof value !== \"string\") return;\n\tconst parsed = profileWorkingDirectorySchema.safeParse(value);\n\treturn parsed.success ? parsed.data : void 0;\n};\nconst normalizeOptionalUpstreamConversation = (value) => {\n\tconst parsed = upstreamConversationRefSchema.safeParse(value);\n\treturn parsed.success ? parsed.data : void 0;\n};\n/** Unknown or invalid kinds are normalized to \"agent\" for wire compatibility. */\nconst profileKindWithFallbackSchema = z.preprocess((value) => {\n\tconst parsed = z.enum(PROFILE_KIND_VALUES).safeParse(value);\n\treturn parsed.success ? parsed.data : \"agent\";\n}, z.enum(PROFILE_KIND_VALUES));\nconst profileKindSchema = z.enum(PROFILE_KIND_VALUES);\nconst profileLabelSchema = z.string().min(1).max(MAX_PROFILE_NAME_LENGTH);\nconst profileHandleSchema = z.string().min(1).max(MAX_PROFILE_HANDLE_LENGTH).regex(PROFILE_HANDLE_PATTERN);\nconst genericProfileIdSchema = z.preprocess(trimmedStringFromUnknown, z.string().min(1).max(MAX_PROFILE_ID_LENGTH));\nconst uuidProfileIdSchema = z.preprocess(trimmedStringFromUnknown, z.string().min(1).max(MAX_PROFILE_ID_LENGTH).regex(UUID_PROFILE_ID_PATTERN));\nconst agentProfileIdSchema = z.preprocess(trimmedStringFromUnknown, z.string().min(1).max(MAX_PROFILE_ID_LENGTH).regex(AGENT_PROFILE_ID_PATTERN));\n/**\n* Runtime ATS profile IDs are auth-backed and follow these rules:\n* - human/system profiles use a UUID\n* - agent profiles use agt_<UUID>\n*\n* Generic test fixtures or legacy intermediary strings should not reuse this\n* schema unless they represent a real runtime profile identity.\n*/\nconst atsRuntimeProfileIdSchema = z.preprocess(trimmedStringFromUnknown, z.string().min(1).max(MAX_PROFILE_ID_LENGTH).refine((value) => UUID_PROFILE_ID_PATTERN.test(value) || AGENT_PROFILE_ID_PATTERN.test(value), \"Invalid ATS runtime profile ID\"));\n/**\n* Generic wire/profile normalization rules:\n* - trims and validates profileId as a non-empty string\n* - defaults missing/invalid kind to \"agent\"\n* - truncates profileName/owner labels to max length\n* - preserves agent workingDirectory verbatim when it is a valid string\n* - keeps owner only for agent profiles\n*\n* This schema intentionally stays broader than auth-backed runtime IDs because\n* protocol/system messages may still use internal synthetic profile IDs such as\n* `ats-system`.\n*/\nconst profileSchema = z.object({\n\tkind: profileKindWithFallbackSchema.optional(),\n\tprofileId: genericProfileIdSchema,\n\tprofileHandle: z.unknown().optional(),\n\tprofileName: z.unknown().optional(),\n\towner: z.unknown().optional(),\n\townerName: z.unknown().optional(),\n\tcontrollerRef: z.unknown().optional(),\n\tagentContextId: z.unknown().optional(),\n\tupstreamConversation: z.unknown().optional(),\n\tworkingDirectory: z.unknown().optional()\n}).transform((value) => {\n\tconst kind = value.kind ?? \"agent\";\n\tconst profileHandle = normalizeOptionalProfileHandle(value.profileHandle);\n\tconst profileName = normalizeOptionalProfileLabel(value.profileName);\n\tconst owner = kind === \"agent\" ? normalizeOptionalProfileLabel(value.owner) : void 0;\n\tconst ownerName = kind === \"agent\" ? normalizeOptionalProfileLabel(value.ownerName) : void 0;\n\tconst controllerRef = kind === \"agent\" ? normalizeOptionalProfileLabel(value.controllerRef) : void 0;\n\tconst agentContextId = kind === \"agent\" ? normalizeOptionalProfileLabel(value.agentContextId) : void 0;\n\tconst upstreamConversation = kind === \"agent\" ? normalizeOptionalUpstreamConversation(value.upstreamConversation) : void 0;\n\tconst workingDirectory = kind === \"agent\" ? normalizeOptionalWorkingDirectory(value.workingDirectory) : void 0;\n\treturn {\n\t\tkind,\n\t\tprofileId: value.profileId,\n\t\t...profileHandle ? { profileHandle } : {},\n\t\t...profileName ? { profileName } : {},\n\t\t...owner ? { owner } : {},\n\t\t...ownerName ? { ownerName } : {},\n\t\t...controllerRef ? { controllerRef } : {},\n\t\t...agentContextId ? { agentContextId } : {},\n\t\t...upstreamConversation ? { upstreamConversation } : {},\n\t\t...workingDirectory ? { workingDirectory } : {}\n\t};\n});\n\n//#endregion\n//#region src/schemas/http/space-mention-label.ts\nconst MULTI_SPACE_PATTERN$2 = /\\s+/g;\nconst SPACE_MENTION_LABEL_MAX_LENGTH = 128;\nconst SPACE_MENTION_LABEL_SOURCE_VALUES = [\n\t\"profile_name\",\n\t\"mention_alias\",\n\t\"profile_name_with_short_id\",\n\t\"profile_id\"\n];\nconst spaceMentionLabelSourceSchema = z.enum(SPACE_MENTION_LABEL_SOURCE_VALUES);\nconst spaceMentionLabelSchema = z.preprocess(normalizeRawMentionLabelCandidate, z.string().min(1).max(SPACE_MENTION_LABEL_MAX_LENGTH).refine((value) => !(value.includes(\"@\") || value.includes(\"(\") || value.includes(\")\")), \"Space mention labels must not contain @ or parentheses\"));\nfunction resolveSpaceMentionLabels(identities) {\n\tconst projected = [...identities].map(projectSpaceMentionLabelIdentity);\n\tconst exactLabelCounts = buildExactLabelCounts(projected);\n\treturn new Map(projected.map((identity) => {\n\t\tconst uniqueProfileName = resolveUniqueExactLabel(identity.normalizedProfileName, exactLabelCounts);\n\t\tconst uniqueMentionAlias = resolveUniqueExactLabel(identity.normalizedMentionAlias, exactLabelCounts);\n\t\tconst uniqueProfileNameWithShortId = resolveUniqueExactLabel(identity.profileNameWithShortId, exactLabelCounts);\n\t\tconst primaryLabelState = resolvePrimaryMentionLabel({\n\t\t\tmentionAlias: uniqueMentionAlias,\n\t\t\tprofileId: identity.profileId,\n\t\t\tprofileName: uniqueProfileName,\n\t\t\tprofileNameWithShortId: uniqueProfileNameWithShortId\n\t\t});\n\t\treturn [identity.profileId, {\n\t\t\texactMentionLabels: buildExactMentionLabels({\n\t\t\t\tmentionAlias: uniqueMentionAlias,\n\t\t\t\tprofileId: identity.profileId,\n\t\t\t\tprofileName: uniqueProfileName,\n\t\t\t\tprofileNameWithShortId: uniqueProfileNameWithShortId\n\t\t\t}),\n\t\t\tlabelSource: primaryLabelState.labelSource,\n\t\t\tprimaryMentionLabel: primaryLabelState.primaryMentionLabel\n\t\t}];\n\t}));\n}\nfunction resolveSingleSpaceMentionLabels(identity) {\n\tconst profileId = normalizeRequiredProfileId(identity.profileId);\n\tconst resolved = resolveSpaceMentionLabels([identity]).get(profileId);\n\tif (!resolved) throw new Error(`Missing resolved space mention labels for profile ${profileId}.`);\n\treturn resolved;\n}\nfunction projectSpaceMentionLabelIdentity(identity) {\n\tconst profileId = normalizeRequiredProfileId(identity.profileId);\n\tconst normalizedProfileName = normalizeProjectableMentionLabel(identity.profileName);\n\tconst normalizedMentionAlias = normalizeProjectableMentionLabel(identity.mentionAlias);\n\tconst profileNameWithShortId = normalizedProfileName ? `${normalizedProfileName}-${buildProfileIdShort(profileId)}` : null;\n\treturn {\n\t\tmentionAlias: normalizeOptionalText(identity.mentionAlias),\n\t\tnormalizedMentionAlias,\n\t\tnormalizedProfileName,\n\t\tprofileId,\n\t\tprofileNameWithShortId\n\t};\n}\nfunction normalizeRawMentionLabelCandidate(value) {\n\tconst normalized = trimmedStringFromUnknown(value).replace(MULTI_SPACE_PATTERN$2, \" \").trim();\n\tif (normalized.length === 0) return;\n\treturn normalized;\n}\nfunction normalizeProjectableMentionLabel(value) {\n\tconst parsed = spaceMentionLabelSchema.safeParse(value);\n\treturn parsed.success ? parsed.data : null;\n}\nfunction buildExactLabelCounts(identities) {\n\tconst counts = /* @__PURE__ */ new Map();\n\tfor (const identity of identities) {\n\t\taddExactLabelCount(counts, identity.profileId);\n\t\taddExactLabelCount(counts, identity.normalizedProfileName);\n\t\taddExactLabelCount(counts, identity.normalizedMentionAlias);\n\t\taddExactLabelCount(counts, identity.profileNameWithShortId);\n\t}\n\treturn counts;\n}\nfunction addExactLabelCount(counts, value) {\n\tif (!value) return;\n\tcounts.set(value, (counts.get(value) ?? 0) + 1);\n}\nfunction resolveUniqueExactLabel(value, counts) {\n\tif (!value) return null;\n\treturn counts.get(value) === 1 ? value : null;\n}\nfunction resolvePrimaryMentionLabel(input) {\n\tif (input.profileName) return {\n\t\tlabelSource: \"profile_name\",\n\t\tprimaryMentionLabel: input.profileName\n\t};\n\tif (input.mentionAlias) return {\n\t\tlabelSource: \"mention_alias\",\n\t\tprimaryMentionLabel: input.mentionAlias\n\t};\n\tif (input.profileNameWithShortId) return {\n\t\tlabelSource: \"profile_name_with_short_id\",\n\t\tprimaryMentionLabel: input.profileNameWithShortId\n\t};\n\treturn {\n\t\tlabelSource: \"profile_id\",\n\t\tprimaryMentionLabel: input.profileId\n\t};\n}\nfunction buildExactMentionLabels(input) {\n\tconst orderedCandidates = [\n\t\tinput.profileName,\n\t\tinput.mentionAlias,\n\t\tinput.profileNameWithShortId,\n\t\tinput.profileId\n\t];\n\tconst seen = /* @__PURE__ */ new Set();\n\tconst exactMentionLabels = [];\n\tfor (const candidate of orderedCandidates) {\n\t\tif (!(candidate && !seen.has(candidate))) continue;\n\t\tseen.add(candidate);\n\t\texactMentionLabels.push(candidate);\n\t}\n\treturn exactMentionLabels;\n}\nfunction buildProfileIdShort(profileId) {\n\tif (profileId.startsWith(\"agt_\")) return `agt_${profileId.slice(4, 9)}`;\n\treturn profileId.slice(0, 5);\n}\nfunction normalizeRequiredProfileId(profileId) {\n\tconst normalized = String(profileId ?? \"\").trim();\n\tif (normalized.length === 0) throw new Error(\"Space mention labels require a non-empty profileId.\");\n\treturn normalized;\n}\nfunction normalizeOptionalText(value) {\n\tconst normalized = trimmedStringFromUnknown(value);\n\treturn normalized.length > 0 ? normalized : null;\n}\n\n//#endregion\n//#region src/schemas/http/space-password.ts\nconst SPACE_PASSWORD_MIN_LENGTH = 6;\nfunction normalizeSpacePasswordText(password) {\n\treturn password.trim();\n}\nconst spacePasswordSchema = z.string().transform(normalizeSpacePasswordText).pipe(z.string().min(SPACE_PASSWORD_MIN_LENGTH));\nconst createSpacePasswordBodySchema = z.strictObject({ password: spacePasswordSchema.optional() });\nconst upsertSpacePasswordBodySchema = z.strictObject({ password: spacePasswordSchema });\nconst spacePasswordStateSchema = z.strictObject({ passwordProtected: z.boolean() });\n\n//#endregion\n//#region src/schemas/protocol/message-envelope.ts\nconst MULTI_SPACE_PATTERN$1 = /\\s+/g;\nconst CANONICAL_MENTION_LITERAL_PATTERN = /^@(?<name>.+)\\((?<type>wake|reference|cc)\\)$/u;\nconst RELATION_TEXT_PATTERN = /\\((wake|reference|cc)\\)/gu;\nconst WORD_CHARACTER_PATTERN = /\\w/u;\nconst SPACE_MESSAGE_ADDRESSING_RELATION_VALUES = [\n\t\"wake\",\n\t\"reference\",\n\t\"cc\"\n];\nconst MESSAGE_MENTION_TYPE_VALUES = SPACE_MESSAGE_ADDRESSING_RELATION_VALUES;\nconst MESSAGE_ENVELOPE_TARGET_FIELD_VALUES = [\n\t\"activationTargets\",\n\t\"referenceTargets\",\n\t\"ccTargets\"\n];\nconst SPACE_MESSAGE_ADDRESSING_TARGET_FIELD_VALUES = MESSAGE_ENVELOPE_TARGET_FIELD_VALUES;\nconst SPACE_MESSAGE_ADDRESSING_TARGET_KIND_VALUES = [\"human_profile\", \"agent_profile\"];\nconst spaceMessageAddressingRelationSchema = z.enum(SPACE_MESSAGE_ADDRESSING_RELATION_VALUES);\nconst messageMentionTypeSchema = spaceMessageAddressingRelationSchema;\nconst messageEnvelopeTargetFieldSchema = z.enum(MESSAGE_ENVELOPE_TARGET_FIELD_VALUES);\nconst spaceMessageAddressingTargetKindSchema = z.enum(SPACE_MESSAGE_ADDRESSING_TARGET_KIND_VALUES);\nconst MESSAGE_ENVELOPE_TARGET_FIELD_BY_MENTION_TYPE = {\n\twake: \"activationTargets\",\n\treference: \"referenceTargets\",\n\tcc: \"ccTargets\"\n};\nconst SPACE_MESSAGE_ADDRESSING_TARGET_KIND_SUPPORT_BY_RELATION = {\n\twake: [\"agent_profile\"],\n\treference: [\"human_profile\", \"agent_profile\"],\n\tcc: [\"human_profile\", \"agent_profile\"]\n};\nconst normalizeCanonicalMentionName = (value) => {\n\tconst normalized = trimmedStringFromUnknown(value).replace(MULTI_SPACE_PATTERN$1, \" \").trim();\n\tif (normalized.length === 0) return;\n\treturn normalized;\n};\nconst canonicalMentionNameSchema = z.preprocess(normalizeCanonicalMentionName, z.string().min(1).refine((value) => !(value.includes(\"(\") || value.includes(\")\")), \"Canonical mention name must not contain parentheses\"));\nconst canonicalMentionLiteralSchema = z.strictObject({\n\tname: canonicalMentionNameSchema,\n\ttype: messageMentionTypeSchema\n});\nconst canonicalMentionTextFragmentSchema = z.strictObject({\n\tstart: z.number().int().min(0),\n\tend: z.number().int().min(1),\n\ttext: z.string().min(1),\n\tparsedLiteral: canonicalMentionLiteralSchema.nullable()\n});\nconst buildTargetListSchema = (fieldName) => z.array(atsRuntimeProfileIdSchema).superRefine((targets, context) => {\n\tconst seenTargets = /* @__PURE__ */ new Set();\n\tfor (const [index, targetProfileId] of targets.entries()) {\n\t\tif (seenTargets.has(targetProfileId)) {\n\t\t\tcontext.addIssue({\n\t\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\t\tmessage: `${fieldName} must not contain duplicate profileId`,\n\t\t\t\tpath: [index]\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tseenTargets.add(targetProfileId);\n\t}\n});\nconst activationTargetsSchema = buildTargetListSchema(\"activationTargets\");\nconst referenceTargetsSchema = buildTargetListSchema(\"referenceTargets\");\nconst ccTargetsSchema = buildTargetListSchema(\"ccTargets\");\nconst replyToSignalIdSchema = z.preprocess(trimmedStringFromUnknown, z.string().min(1));\nconst validateDistinctTargetLists = (input, context) => {\n\tconst seenByTarget = /* @__PURE__ */ new Map();\n\tfor (const fieldName of MESSAGE_ENVELOPE_TARGET_FIELD_VALUES) for (const targetProfileId of input[fieldName]) {\n\t\tconst existingField = seenByTarget.get(targetProfileId);\n\t\tif (!existingField) {\n\t\t\tseenByTarget.set(targetProfileId, fieldName);\n\t\t\tcontinue;\n\t\t}\n\t\tcontext.addIssue({\n\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\tmessage: `${fieldName} must not reuse profileId from ${existingField}`,\n\t\t\tpath: [fieldName]\n\t\t});\n\t}\n};\nconst messageEnvelopeSchema = z.strictObject({\n\tactivationTargets: activationTargetsSchema,\n\treferenceTargets: referenceTargetsSchema,\n\tccTargets: ccTargetsSchema,\n\treplyToSignalId: replyToSignalIdSchema.optional(),\n\ttext: z.preprocess(trimmedStringFromUnknown, z.string().min(1).max(MAX_TEXT_LENGTH))\n}).superRefine(validateDistinctTargetLists);\nconst messageEnvelopeInputSchema = z.strictObject({\n\tactivationTargets: activationTargetsSchema.optional(),\n\treferenceTargets: referenceTargetsSchema.optional(),\n\tccTargets: ccTargetsSchema.optional(),\n\treplyToSignalId: replyToSignalIdSchema.optional(),\n\ttext: z.preprocess(trimmedStringFromUnknown, z.string().min(1).max(MAX_TEXT_LENGTH))\n}).superRefine((value, context) => validateDistinctTargetLists({\n\tactivationTargets: value.activationTargets ?? [],\n\treferenceTargets: value.referenceTargets ?? [],\n\tccTargets: value.ccTargets ?? []\n}, context));\nconst normalizeMessageEnvelope = (value) => {\n\tconst parsed = messageEnvelopeInputSchema.safeParse(value);\n\tif (!parsed.success) throw parsed.error;\n\tconst normalized = {\n\t\tactivationTargets: parsed.data.activationTargets ?? [],\n\t\treferenceTargets: parsed.data.referenceTargets ?? [],\n\t\tccTargets: parsed.data.ccTargets ?? [],\n\t\ttext: parsed.data.text,\n\t\t...parsed.data.replyToSignalId ? { replyToSignalId: parsed.data.replyToSignalId } : {}\n\t};\n\tconst canonical = messageEnvelopeSchema.safeParse(normalized);\n\tif (!canonical.success) throw canonical.error;\n\treturn canonical.data;\n};\nconst parseCanonicalMentionLiteral = (value) => {\n\tif (typeof value !== \"string\") return null;\n\tconst trimmed = value.trim();\n\tif (trimmed.length === 0) return null;\n\tconst match = trimmed.match(CANONICAL_MENTION_LITERAL_PATTERN);\n\tif (!match?.groups) return null;\n\tconst name = match.groups.name;\n\tconst type = match.groups.type;\n\tif (typeof name !== \"string\" || typeof type !== \"string\") return null;\n\tif (name.trim() !== name) return null;\n\tconst parsed = canonicalMentionLiteralSchema.safeParse({\n\t\tname,\n\t\ttype\n\t});\n\tif (!parsed.success) return null;\n\treturn parsed.data;\n};\nconst formatCanonicalMentionLiteral = (value) => {\n\tconst parsed = canonicalMentionLiteralSchema.safeParse(value);\n\tif (!parsed.success) throw parsed.error;\n\treturn `@${parsed.data.name}(${parsed.data.type})`;\n};\nconst collectCanonicalMentionTextFragments = (value) => {\n\tif (typeof value !== \"string\" || value.length === 0) return [];\n\tconst fragments = [];\n\tlet cursor = 0;\n\twhile (cursor < value.length) {\n\t\tconst atIndex = value.indexOf(\"@\", cursor);\n\t\tif (atIndex < 0) break;\n\t\tif (shouldSkipCanonicalMentionAt(value, atIndex)) {\n\t\t\tcursor = atIndex + 1;\n\t\t\tcontinue;\n\t\t}\n\t\tconst lineEndIndex = value.indexOf(\"\\n\", atIndex);\n\t\tconst nextAtIndex = value.indexOf(\"@\", atIndex + 1);\n\t\tconst searchEnd = Math.min(lineEndIndex < 0 ? value.length : lineEndIndex, nextAtIndex < 0 ? value.length : nextAtIndex);\n\t\tconst lineFragment = value.slice(atIndex, searchEnd);\n\t\tconst relationEndOffset = findCanonicalMentionRelationEnd(lineFragment);\n\t\tif (relationEndOffset === null) {\n\t\t\tcursor = atIndex + 1;\n\t\t\tcontinue;\n\t\t}\n\t\tconst rawMentionText = lineFragment.slice(0, relationEndOffset);\n\t\tconst leadingTrimmedLength = rawMentionText.length - rawMentionText.trimStart().length;\n\t\tconst mentionText = rawMentionText.trim();\n\t\tif (!mentionText) {\n\t\t\tcursor = atIndex + Math.max(1, relationEndOffset);\n\t\t\tcontinue;\n\t\t}\n\t\tconst start = atIndex + leadingTrimmedLength;\n\t\tconst end = start + mentionText.length;\n\t\tconst fragment = canonicalMentionTextFragmentSchema.safeParse({\n\t\t\tstart,\n\t\t\tend,\n\t\t\ttext: mentionText,\n\t\t\tparsedLiteral: parseCanonicalMentionLiteral(mentionText)\n\t\t});\n\t\tif (!fragment.success) throw fragment.error;\n\t\tfragments.push(fragment.data);\n\t\tcursor = atIndex + relationEndOffset;\n\t}\n\treturn fragments;\n};\nfunction shouldSkipCanonicalMentionAt(value, atIndex) {\n\tconst previous = atIndex > 0 ? value[atIndex - 1] ?? \"\" : \"\";\n\treturn previous === \"\\\\\" || WORD_CHARACTER_PATTERN.test(previous);\n}\nfunction findCanonicalMentionRelationEnd(value) {\n\tRELATION_TEXT_PATTERN.lastIndex = 0;\n\tconst relationMatch = RELATION_TEXT_PATTERN.exec(value);\n\tif (relationMatch?.index !== void 0) return relationMatch.index + relationMatch[0].length;\n\tconst firstOpenIndex = value.indexOf(\"(\");\n\tif (firstOpenIndex < 0) return null;\n\tconst firstCloseIndex = value.indexOf(\")\", firstOpenIndex + 1);\n\tif (firstCloseIndex < 0) return null;\n\treturn firstCloseIndex + 1;\n}\nconst resolveMessageEnvelopeTargetField = (value) => {\n\tconst parsed = messageMentionTypeSchema.safeParse(value);\n\tif (!parsed.success) throw parsed.error;\n\treturn MESSAGE_ENVELOPE_TARGET_FIELD_BY_MENTION_TYPE[parsed.data];\n};\nconst resolveSpaceMessageAddressingTargetField = (value) => {\n\tconst parsed = spaceMessageAddressingRelationSchema.safeParse(value);\n\tif (!parsed.success) throw parsed.error;\n\treturn MESSAGE_ENVELOPE_TARGET_FIELD_BY_MENTION_TYPE[parsed.data];\n};\nconst isSpaceMessageAddressingRelationSupportedForTargetKind = (input) => {\n\tconst relation = spaceMessageAddressingRelationSchema.safeParse(input.relation);\n\tif (!relation.success) throw relation.error;\n\tconst targetKind = spaceMessageAddressingTargetKindSchema.safeParse(input.targetKind);\n\tif (!targetKind.success) throw targetKind.error;\n\treturn SPACE_MESSAGE_ADDRESSING_TARGET_KIND_SUPPORT_BY_RELATION[relation.data].includes(targetKind.data);\n};\nconst getSpaceMessageAddressingRelationSupportForTargetKind = (value) => {\n\tconst targetKind = spaceMessageAddressingTargetKindSchema.safeParse(value);\n\tif (!targetKind.success) throw targetKind.error;\n\treturn {\n\t\twake: isSpaceMessageAddressingRelationSupportedForTargetKind({\n\t\t\trelation: \"wake\",\n\t\t\ttargetKind: targetKind.data\n\t\t}),\n\t\treference: isSpaceMessageAddressingRelationSupportedForTargetKind({\n\t\t\trelation: \"reference\",\n\t\t\ttargetKind: targetKind.data\n\t\t}),\n\t\tcc: isSpaceMessageAddressingRelationSupportedForTargetKind({\n\t\t\trelation: \"cc\",\n\t\t\ttargetKind: targetKind.data\n\t\t})\n\t};\n};\n\n//#endregion\n//#region src/schemas/protocol/client-message-id.ts\nconst clientMessageIdSchema = z.string().trim().min(1).max(200);\nconst parseOptionalClientMessageId = (value) => {\n\tconst parsed = clientMessageIdSchema.safeParse(value);\n\treturn parsed.success ? parsed.data : null;\n};\n\n//#endregion\n//#region src/schemas/protocol/target-wake-lifecycle.ts\nconst TARGET_WAKE_LIFECYCLE_IDENTITY_MODEL_VERSION = \"ats.target_wake.lifecycle_identity.v1\";\nconst targetWakeLifecycleIdentifierSchema = z.string().trim().min(1).max(512);\nconst nullableTargetWakeLifecycleIdentifierSchema = targetWakeLifecycleIdentifierSchema.nullable();\nconst targetWakeLifecycleIdSchema = z.string().trim().min(1).max(2048);\nconst targetWakeLifecycleIdentitySchema = z.strictObject({\n\tmodelVersion: z.literal(TARGET_WAKE_LIFECYCLE_IDENTITY_MODEL_VERSION),\n\ttargetWakeLifecycleId: targetWakeLifecycleIdSchema,\n\tspaceId: targetWakeLifecycleIdentifierSchema,\n\tsourceSignalId: targetWakeLifecycleIdentifierSchema,\n\tclientMessageId: clientMessageIdSchema.nullable(),\n\ttargetProfileId: targetWakeLifecycleIdentifierSchema,\n\tdispatchId: nullableTargetWakeLifecycleIdentifierSchema\n}).superRefine((value, context) => {\n\tconst expectedTargetWakeLifecycleId = buildTargetWakeLifecycleId({\n\t\tspaceId: value.spaceId,\n\t\tsourceSignalId: value.sourceSignalId,\n\t\ttargetProfileId: value.targetProfileId\n\t});\n\tif (value.targetWakeLifecycleId === expectedTargetWakeLifecycleId) return;\n\tcontext.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"targetWakeLifecycleId must match spaceId, sourceSignalId, and targetProfileId\",\n\t\tpath: [\"targetWakeLifecycleId\"]\n\t});\n});\nfunction buildTargetWakeLifecycleId(input) {\n\tconst spaceId = normalizeRequiredTargetWakeLifecycleIdPart(\"spaceId\", input.spaceId);\n\tconst sourceSignalId = normalizeRequiredTargetWakeLifecycleIdPart(\"sourceSignalId\", input.sourceSignalId);\n\tconst targetProfileId = normalizeRequiredTargetWakeLifecycleIdPart(\"targetProfileId\", input.targetProfileId);\n\treturn [\n\t\t\"twl_v1\",\n\t\tencodeLengthPrefixedTargetWakeLifecycleIdPart(spaceId),\n\t\tencodeLengthPrefixedTargetWakeLifecycleIdPart(sourceSignalId),\n\t\tencodeLengthPrefixedTargetWakeLifecycleIdPart(targetProfileId)\n\t].join(\"|\");\n}\nfunction projectTargetWakeLifecycleIdentity(input) {\n\tconst spaceId = normalizeRequiredTargetWakeLifecycleIdPart(\"spaceId\", input.spaceId);\n\tconst sourceSignalId = normalizeRequiredTargetWakeLifecycleIdPart(\"sourceSignalId\", input.sourceSignalId);\n\tconst targetProfileId = normalizeRequiredTargetWakeLifecycleIdPart(\"targetProfileId\", input.targetProfileId);\n\tconst clientMessageId = normalizeOptionalClientMessageId(input.clientMessageId);\n\tconst dispatchId = normalizeOptionalTargetWakeLifecycleIdPart(input.dispatchId);\n\tconst candidate = {\n\t\tmodelVersion: TARGET_WAKE_LIFECYCLE_IDENTITY_MODEL_VERSION,\n\t\ttargetWakeLifecycleId: buildTargetWakeLifecycleId({\n\t\t\tspaceId,\n\t\t\tsourceSignalId,\n\t\t\ttargetProfileId\n\t\t}),\n\t\tspaceId,\n\t\tsourceSignalId,\n\t\tclientMessageId,\n\t\ttargetProfileId,\n\t\tdispatchId\n\t};\n\tconst parsed = targetWakeLifecycleIdentitySchema.safeParse(candidate);\n\tif (!parsed.success) throw new Error(\"invalid target Wake lifecycle identity\");\n\treturn parsed.data;\n}\nconst encodeLengthPrefixedTargetWakeLifecycleIdPart = (value) => {\n\treturn `${value.length}:${value}`;\n};\nfunction normalizeRequiredTargetWakeLifecycleIdPart(fieldName, value) {\n\tif (typeof value !== \"string\") throw new Error(`target_wake_lifecycle.identity_invalid: ${fieldName} must be a string`);\n\tconst normalized = value.trim();\n\tif (!normalized) throw new Error(`target_wake_lifecycle.identity_invalid: ${fieldName} is required`);\n\treturn normalized;\n}\nfunction normalizeOptionalTargetWakeLifecycleIdPart(value) {\n\tif (value === null || value === void 0) return null;\n\tif (typeof value !== \"string\") throw new Error(\"target_wake_lifecycle.identity_invalid: value must be a string\");\n\tconst normalized = value.trim();\n\treturn normalized.length > 0 ? normalized : null;\n}\nfunction normalizeOptionalClientMessageId(value) {\n\tif (value === null || value === void 0) return null;\n\tif (typeof value !== \"string\") throw new Error(\"target_wake_lifecycle.identity_invalid: clientMessageId must be a string\");\n\tconst parsed = clientMessageIdSchema.safeParse(value);\n\treturn parsed.success ? parsed.data : null;\n}\n\n//#endregion\n//#region src/schemas/space-mesh/authority-order.ts\nconst spaceAuthorityOrderSchema = z.literal(\"default\");\n\n//#endregion\n//#region src/schemas/space-mesh/dispatch-policy.ts\nconst spaceDispatchPolicyModeSchema = z.enum([\"mention_only\", \"listen_all\"]);\nconst spaceDispatchPolicySchema = z.strictObject({ mode: spaceDispatchPolicyModeSchema });\n\n//#endregion\n//#region src/schemas/space-mesh/publication-policy.ts\nconst spacePublicationModeSchema = z.enum([\"collaboration\", \"raw_context_sharing\"]);\nconst spaceAllowedActionSchema = z.enum([\n\t\"post_message\",\n\t\"post_status\",\n\t\"stay_silent\"\n]);\nconst spaceAllowedActionsSchema = z.array(spaceAllowedActionSchema).superRefine((value, ctx) => {\n\tif (value.length === 0) {\n\t\tctx.addIssue({\n\t\t\tcode: \"custom\",\n\t\t\tmessage: \"allowedActions must contain at least one action\"\n\t\t});\n\t\treturn;\n\t}\n\tif (new Set(value).size !== value.length) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"allowedActions must not contain duplicates\"\n\t});\n});\n\n//#endregion\n//#region src/schemas/space-mesh/result-archive-policy.ts\nconst resultArchiveModeSchema = z.enum([\n\t\"none\",\n\t\"space_reply_only\",\n\t\"all_final_results\"\n]);\nconst resultArchivePolicySchema = z.strictObject({ mode: resultArchiveModeSchema });\n\n//#endregion\n//#region src/schemas/space-mesh/space-note.ts\nconst spaceNoteSchema = z.string().trim().min(1);\n\n//#endregion\n//#region src/schemas/space-mesh/space-contract.ts\nconst isoDateTimeSchema = z.iso.datetime({ offset: true });\nconst spaceBriefModeSchema = z.enum([\"default\", \"none\"]);\nconst spaceContractFieldsSchema = z.strictObject({\n\tdispatchPolicy: spaceDispatchPolicySchema,\n\tpublicationMode: spacePublicationModeSchema,\n\tallowedActions: spaceAllowedActionsSchema,\n\tresultArchivePolicy: resultArchivePolicySchema,\n\tspaceNote: spaceNoteSchema.optional(),\n\tauthorityOrder: spaceAuthorityOrderSchema,\n\tentryBrief: spaceBriefModeSchema,\n\tdispatchBrief: spaceBriefModeSchema\n});\nconst spaceContractSchema = z.strictObject({\n\tversion: z.number().int().finite().positive(),\n\tupdatedAt: isoDateTimeSchema,\n\tupdatedBy: z.preprocess(trimmedStringFromUnknown, z.string().min(1)),\n\tdispatchPolicy: spaceDispatchPolicySchema,\n\tpublicationMode: spacePublicationModeSchema,\n\tallowedActions: spaceAllowedActionsSchema,\n\tresultArchivePolicy: resultArchivePolicySchema,\n\tspaceNote: spaceNoteSchema.optional(),\n\tauthorityOrder: spaceAuthorityOrderSchema,\n\tentryBrief: spaceBriefModeSchema,\n\tdispatchBrief: spaceBriefModeSchema\n});\n\n//#endregion\n//#region src/schemas/space-mesh/space-thread.ts\nconst ISO_DATE_TIME_SCHEMA$1 = z.iso.datetime({ offset: true });\nconst THREAD_ID_PATTERN = /^thr_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/u;\nconst spaceThreadIdSchema = z.preprocess(trimmedStringFromUnknown, z.string().min(1).max(64).regex(THREAD_ID_PATTERN));\nconst spaceThreadSchema = z.strictObject({\n\tthreadId: spaceThreadIdSchema,\n\tspaceId: z.preprocess(trimmedStringFromUnknown, z.string().min(1)),\n\trootSignalId: z.preprocess(trimmedStringFromUnknown, z.string().min(1)),\n\tcreatedByProfileId: atsRuntimeProfileIdSchema,\n\tcreatedAt: ISO_DATE_TIME_SCHEMA$1,\n\tupdatedAt: ISO_DATE_TIME_SCHEMA$1\n});\nconst spaceThreadContextSchema = z.strictObject({\n\tthreadId: spaceThreadIdSchema,\n\trootSignalId: z.preprocess(trimmedStringFromUnknown, z.string().min(1))\n});\nconst spaceThreadSignalPlacementKindSchema = z.enum([\"root\", \"thread\"]);\nconst spaceThreadSignalPlacementSchema = z.strictObject({\n\tthreadId: spaceThreadIdSchema,\n\tsignalId: z.preprocess(trimmedStringFromUnknown, z.string().min(1)),\n\tplacement: spaceThreadSignalPlacementKindSchema,\n\tcreatedAt: ISO_DATE_TIME_SCHEMA$1\n});\nconst spaceThreadEventTypeSchema = z.enum([\"created\"]);\nconst spaceThreadEventSchema = z.strictObject({\n\teventId: z.preprocess(trimmedStringFromUnknown, z.string().min(1)),\n\tthreadId: spaceThreadIdSchema,\n\teventType: spaceThreadEventTypeSchema,\n\tactorProfileId: atsRuntimeProfileIdSchema,\n\tclientMutationId: z.preprocess(trimmedStringFromUnknown, z.string().min(1).max(200)),\n\tcreatedAt: ISO_DATE_TIME_SCHEMA$1\n});\nconst spaceThreadActionRefSchema = z.strictObject({ threadId: spaceThreadIdSchema });\n\n//#endregion\n//#region src/schemas/daemon/controller-contract.ts\nconst LEGACY_RUNTIME_DISPATCH_POLICY = \"mention_only\";\nconst runtimeDispatchPolicySchema = z.enum([LEGACY_RUNTIME_DISPATCH_POLICY, \"listen_all\"]);\nconst runtimeTransportModeSchema = z.enum([\"local-cli\"]);\nconst runtimeStreamingModeSchema = z.enum([\"final\", \"stream\"]);\nconst runtimeAgentContextIdMappingSpecSchema = z.strictObject({\n\tsourceField: z.string().min(1),\n\tmappingVersion: z.number().int().min(1)\n});\nconst runtimeAgentExecutableLaunchContractSchema = z.strictObject({\n\tkind: z.literal(\"executable\"),\n\tcommandPath: z.string().min(1),\n\targsPrefix: z.array(z.string().min(1)).optional()\n});\nconst runtimeAgentNodeScriptLaunchContractSchema = z.strictObject({\n\tkind: z.literal(\"node_script\"),\n\tnodePath: z.string().min(1),\n\tscriptPath: z.string().min(1),\n\targsPrefix: z.array(z.string().min(1)).optional()\n});\nconst runtimeAgentControllerLaunchContractSchema = z.discriminatedUnion(\"kind\", [runtimeAgentExecutableLaunchContractSchema, runtimeAgentNodeScriptLaunchContractSchema]);\nconst runtimeAgentControllerLaunchCandidateSchema = z.strictObject({\n\tinstallId: z.string().min(1),\n\tlabel: z.string().min(1),\n\tdetail: z.string().min(1),\n\tcommandPath: z.string().min(1),\n\tlaunchContract: runtimeAgentControllerLaunchContractSchema\n});\nconst runtimeAgentControllerSettingsSchema = z.strictObject({\n\tdispatch_policy: runtimeDispatchPolicySchema.default(LEGACY_RUNTIME_DISPATCH_POLICY),\n\ttransport_mode: runtimeTransportModeSchema,\n\tstreaming_mode: runtimeStreamingModeSchema.default(\"final\"),\n\ttimeout_ms: z.number().int().positive().nullable().default(null),\n\tretry: z.number().int().min(0).default(0),\n\tcontext_id_mapping_spec: runtimeAgentContextIdMappingSpecSchema\n});\nconst agentContextResolutionSchema = z.strictObject({\n\tagentContextId: z.string().min(1).nullable(),\n\tupstreamConversation: upstreamConversationRefSchema.nullable().optional(),\n\tsourceField: z.string().min(1),\n\tmappingVersion: z.number().int().min(1)\n});\n\n//#endregion\n//#region src/schemas/daemon/conversation-lifecycle.ts\nconst conversationBootstrapReasonSchema = z.enum([\n\t\"missing_bootstrap_state\",\n\t\"compatibility_recreate\",\n\t\"template_changed\",\n\t\"idle_stale\",\n\t\"dispatch_count_stale\",\n\t\"context_healed\",\n\t\"context_replaced\"\n]);\nconst localRuntimeContextReasonSchema = z.enum([\n\t\"first_local_runtime_context\",\n\t\"workspace_changed\",\n\t\"transport_mode_changed\",\n\t\"policy_changed\",\n\t\"execution_state_missing\",\n\t\"controller_changed\"\n]);\nconst upstreamConversationResumePlanBlockedReasonSchema = z.enum([\"controller_changed\"]);\nconst upstreamConversationResumePlanSchema = z.discriminatedUnion(\"status\", [\n\tz.strictObject({ status: z.literal(\"not_bound\") }),\n\tz.strictObject({ status: z.literal(\"continue_existing\") }),\n\tz.strictObject({\n\t\tstatus: z.literal(\"blocked\"),\n\t\treason: upstreamConversationResumePlanBlockedReasonSchema\n\t})\n]);\nconst localRuntimeContextPlanSchema = z.strictObject({\n\tstatus: z.enum([\"reuse\", \"recreate\"]),\n\treason: z.union([localRuntimeContextReasonSchema, z.null()])\n});\nconst conversationBootstrapSchema = z.discriminatedUnion(\"status\", [z.strictObject({\n\treason: z.null(),\n\tstatus: z.literal(\"applied\")\n}), z.strictObject({\n\treason: conversationBootstrapReasonSchema,\n\tstatus: z.literal(\"pending\")\n})]);\nconst nextDispatchPlanSchema = z.strictObject({\n\tupstreamConversationResume: upstreamConversationResumePlanSchema,\n\tlocalRuntimeContext: localRuntimeContextPlanSchema,\n\tbootstrap: conversationBootstrapSchema\n});\nconst upstreamConversationResumeSchema = z.discriminatedUnion(\"status\", [\n\tz.strictObject({ status: z.literal(\"not_bound\") }),\n\tz.strictObject({ status: z.literal(\"continued\") }),\n\tz.strictObject({ status: z.literal(\"replaced_by_provider\") })\n]);\nconst localRuntimeContextExecutionSchema = z.strictObject({\n\tstatus: z.enum([\"reused\", \"recreated\"]),\n\treason: z.union([localRuntimeContextReasonSchema, z.null()])\n});\nconst dispatchExecutionSchema = z.strictObject({\n\tupstreamConversationResume: upstreamConversationResumeSchema,\n\tlocalRuntimeContext: localRuntimeContextExecutionSchema,\n\tbootstrap: conversationBootstrapSchema\n});\n\n//#endregion\n//#region src/schemas/daemon/conversation-binding.ts\nconst ISO_DATE_TIME_SCHEMA = z.iso.datetime({ offset: true });\nconst bootstrapTemplateFactsSchema = z.strictObject({\n\ttemplateVersion: z.string().min(1),\n\tcontentFingerprint: z.string().min(1)\n});\nconst conversationBindingObservedStateSchema = z.strictObject({\n\tlastObservedContextId: z.string().min(1),\n\thealth: z.literal(\"healthy\")\n});\nconst conversationBindingSourceSchema = z.enum([\"daemon-launch\", \"imported\"]);\nconst conversationBindingRecordSchema = z.strictObject({\n\tspaceId: z.string().min(1),\n\tatsProfileId: z.string().min(1),\n\tactive: z.boolean(),\n\tbindingSource: conversationBindingSourceSchema,\n\tcontrollerRef: z.string().min(1),\n\ttransportMode: runtimeTransportModeSchema,\n\tconversationRef: upstreamConversationRefSchema,\n\tpolicy: conversationPolicySchema,\n\tobservedState: conversationBindingObservedStateSchema.optional(),\n\tbootstrapTemplateFacts: bootstrapTemplateFactsSchema,\n\tupdatedAt: ISO_DATE_TIME_SCHEMA\n});\nconst conversationExecutionStateSchema = z.strictObject({\n\tagentContextLookupKey: z.string().min(1),\n\tactiveContextId: z.string().min(1).nullable(),\n\tlastResolvedUpstreamConversation: upstreamConversationRefSchema.optional(),\n\tlastRuntimeWorkspacePath: profileWorkingDirectorySchema.optional(),\n\truntimeWorkspaceFingerprint: z.string().min(1),\n\tbootstrapLastAppliedAt: ISO_DATE_TIME_SCHEMA.optional(),\n\tbootstrapLastActivatedAt: ISO_DATE_TIME_SCHEMA.optional(),\n\tdispatchesSinceBootstrapApplied: z.number().int().min(0),\n\tlastAppliedTemplateVersion: z.string().min(1).optional(),\n\tlastAppliedContentFingerprint: z.string().min(1).optional(),\n\tpendingBootstrapReason: conversationBootstrapReasonSchema.optional(),\n\tupdatedAt: ISO_DATE_TIME_SCHEMA\n});\n\n//#endregion\n//#region src/schemas/protocol/core-readiness-facts-changed.ts\nconst CORE_READINESS_FACTS_CHANGED_MARKER_KIND = \"core_readiness_facts_changed\";\nconst coreReadinessFactsChangedSchema = z.strictObject({\n\tagentProfileId: agentProfileIdSchema,\n\tkind: z.literal(CORE_READINESS_FACTS_CHANGED_MARKER_KIND)\n});\n\n//#endregion\n//#region src/schemas/protocol/signal-reply-to.ts\nconst MAX_SIGNAL_REPLY_TO_PREVIEW_LENGTH = 120;\nconst signalReplyToSchema = z.strictObject({\n\tsignalId: z.preprocess(trimmedStringFromUnknown, z.string().min(1)),\n\tprofileId: atsRuntimeProfileIdSchema,\n\tprofileKind: z.enum([\n\t\t\"human\",\n\t\t\"agent\",\n\t\t\"system\"\n\t]).nullable(),\n\tprofileName: z.preprocess(trimmedStringFromUnknown, z.string().min(1).max(MAX_PROFILE_NAME_LENGTH)),\n\tpreviewText: z.preprocess(trimmedStringFromUnknown, z.string().min(1).max(MAX_SIGNAL_REPLY_TO_PREVIEW_LENGTH))\n});\n\n//#endregion\n//#region src/schemas/space-mesh/signal-status.ts\nconst spaceStatusSchema = z.enum([\n\t\"working\",\n\t\"needs_input\",\n\t\"done\",\n\t\"blocked\",\n\t\"handoff\"\n]);\nconst signalStatusGeneratedBySchema = z.literal(\"ats\");\nconst signalStatusDataSchema$1 = z.strictObject({\n\tactorProfileId: atsRuntimeProfileIdSchema,\n\tstatus: spaceStatusSchema,\n\tdispatchId: z.preprocess(trimmedStringFromUnknown, z.string().min(1)),\n\tresultRef: z.preprocess(trimmedStringFromUnknown, z.string().min(1)).optional(),\n\tcoreReadinessFactsChanged: coreReadinessFactsChangedSchema.optional(),\n\treplyTo: signalReplyToSchema.optional(),\n\ttargetProfileId: atsRuntimeProfileIdSchema.optional(),\n\ttext: z.preprocess(trimmedStringFromUnknown, z.string().min(1).max(MAX_SIGNAL_REPLY_TO_PREVIEW_LENGTH)),\n\tgeneratedBy: signalStatusGeneratedBySchema\n});\nconst signalStatusSchema$1 = z.strictObject({\n\ttype: z.literal(\"signal.status\"),\n\tdata: signalStatusDataSchema$1\n});\n\n//#endregion\n//#region src/schemas/space-mesh/signal-system-notice.ts\nconst signalSystemNoticeTypeSchema = z.enum([\n\t\"stay_silent\",\n\t\"policy_blocked\",\n\t\"terminal_failure\"\n]);\nconst signalSystemNoticeGeneratedBySchema = z.literal(\"ats\");\nconst signalSystemNoticeDataSchema$1 = z.strictObject({\n\tnoticeType: signalSystemNoticeTypeSchema,\n\tactorProfileId: atsRuntimeProfileIdSchema.optional(),\n\tactorName: z.preprocess(trimmedStringFromUnknown, z.string().min(1)).optional(),\n\tdispatchId: z.preprocess(trimmedStringFromUnknown, z.string().min(1)),\n\tresultRef: z.preprocess(trimmedStringFromUnknown, z.string().min(1)).optional(),\n\tcoreReadinessFactsChanged: coreReadinessFactsChangedSchema.optional(),\n\treplyTo: signalReplyToSchema.optional(),\n\treason: z.preprocess(trimmedStringFromUnknown, z.string().min(1)).optional(),\n\ttext: z.preprocess(trimmedStringFromUnknown, z.string().min(1)),\n\tgeneratedBy: signalSystemNoticeGeneratedBySchema\n});\nconst signalSystemNoticeSchema$1 = z.strictObject({\n\ttype: z.literal(\"signal.system_notice\"),\n\tdata: signalSystemNoticeDataSchema$1\n});\n\n//#endregion\n//#region src/schemas/protocol/signal.ts\nconst MULTI_SPACE_PATTERN = /\\s+/g;\nconst DELETE_CODE_POINT = 127;\nconst COMPLETE_FENCED_BLOCK_PATTERN = /```[\\s\\S]*?```/gu;\nconst TRAILING_ATS_SPACE_ACTION_BLOCK_PATTERN = /```ats-space-action[\\s\\S]*$/u;\nconst SPACE_MEMBER_JOIN_NOTICE_PURPOSE = \"space_membership_join_notice\";\nconst SPACE_MEMBER_REMOVE_NOTICE_PURPOSE = \"space_membership_remove_notice\";\nconst SPACE_MENTION_REJECT_NOTICE_PURPOSE = \"space_mention_reject_notice\";\nconst AGENT_REPLYING_PURPOSE = \"agent_replying\";\nconst AGENT_REPLYING_END_PURPOSE = \"agent_replying_end\";\nconst AGENT_REPLY_PREVIEW_PURPOSE = \"agent_reply_preview\";\nconst AGENT_REPLY_PREVIEW_END_PURPOSE = \"agent_reply_preview_end\";\nconst AGENT_REPLY_FINAL_PURPOSE = \"agent_reply_final\";\nconst DISPATCH_ACTIVITY_DISPATCHING_PURPOSE = \"dispatch_activity_dispatching\";\nconst DISPATCH_ACTIVITY_RETRYING_PURPOSE = \"dispatch_activity_retrying\";\nconst DISPATCH_ACTIVITY_FAILED_PURPOSE = \"dispatch_activity_failed\";\nconst CONVERSATION_CONTINUITY_WARNING_PURPOSE = \"conversation_continuity_warning\";\nconst sanitizeSignalTextPreview = (text) => {\n\tconst normalized = trimmedStringFromUnknown(text).replace(COMPLETE_FENCED_BLOCK_PATTERN, \" \").replace(TRAILING_ATS_SPACE_ACTION_BLOCK_PATTERN, \" \");\n\tif (normalized.length === 0) return null;\n\tconst singleLine = normalized.split(\"\").map((character) => isControlCharacter(character) ? \" \" : character).join(\"\").replace(MULTI_SPACE_PATTERN, \" \").trim();\n\tif (singleLine.length === 0) return null;\n\treturn singleLine.length <= MAX_SIGNAL_REPLY_TO_PREVIEW_LENGTH ? singleLine : `${singleLine.slice(0, MAX_SIGNAL_REPLY_TO_PREVIEW_LENGTH - 1)}…`;\n};\nconst signalTextReplyToSchema = signalReplyToSchema;\nconst signalTextContentSchema = z.preprocess(trimmedStringFromUnknown, z.string().min(1).max(MAX_TEXT_LENGTH));\nconst runtimeDeviceDisplayNameSchema = z.preprocess(trimmedStringFromUnknown, z.string().min(1).max(80));\nconst signalTextMetaSchema = z.object({\n\ttransient: z.literal(true).optional(),\n\tclientMessageId: clientMessageIdSchema.optional(),\n\tsourceEventId: z.preprocess(trimmedStringFromUnknown, z.string().max(200)).optional(),\n\tsourceClientMessageId: clientMessageIdSchema.optional(),\n\tpurpose: z.preprocess(trimmedStringFromUnknown, z.string().min(1).max(80)).optional(),\n\terrorCode: z.preprocess(trimmedStringFromUnknown, z.string().min(1).max(120)).optional(),\n\tdispatchId: z.preprocess(trimmedStringFromUnknown, z.string().max(200)).optional(),\n\ttargetProfileId: atsRuntimeProfileIdSchema.optional(),\n\ttargetProfileKind: z.enum([\"human\", \"agent\"]).optional(),\n\ttargetProfileName: z.preprocess(trimmedStringFromUnknown, z.string().min(1).max(MAX_PROFILE_NAME_LENGTH)).optional(),\n\ttargetMentionLabel: spaceMentionLabelSchema.optional(),\n\truntimeDeviceDisplayName: runtimeDeviceDisplayNameSchema.optional(),\n\tcoreReadinessFactsChanged: coreReadinessFactsChangedSchema.optional(),\n\taddedByProfileId: atsRuntimeProfileIdSchema.optional(),\n\taddedByDisplayName: z.preprocess(trimmedStringFromUnknown, z.string().min(1).max(MAX_PROFILE_NAME_LENGTH)).optional(),\n\tremovedByProfileId: atsRuntimeProfileIdSchema.optional(),\n\tremovedByDisplayName: z.preprocess(trimmedStringFromUnknown, z.string().min(1).max(MAX_PROFILE_NAME_LENGTH)).optional()\n});\nconst postedSignalTextMetaSchema = signalTextMetaSchema.superRefine((meta, context) => {\n\tif (meta.purpose !== SPACE_MEMBER_JOIN_NOTICE_PURPOSE && meta.purpose !== SPACE_MEMBER_REMOVE_NOTICE_PURPOSE) return;\n\tif (!meta.targetProfileId) context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"targetProfileId is required for space member notices\",\n\t\tpath: [\"targetProfileId\"]\n\t});\n\tif (!meta.targetProfileKind) context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"targetProfileKind is required for space member notices\",\n\t\tpath: [\"targetProfileKind\"]\n\t});\n\tif (meta.purpose === SPACE_MEMBER_JOIN_NOTICE_PURPOSE && !meta.addedByProfileId) context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"addedByProfileId is required for space member notices\",\n\t\tpath: [\"addedByProfileId\"]\n\t});\n\tif (meta.purpose === SPACE_MEMBER_JOIN_NOTICE_PURPOSE && !meta.addedByDisplayName) context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"addedByDisplayName is required for space member notices\",\n\t\tpath: [\"addedByDisplayName\"]\n\t});\n\tif (meta.purpose === SPACE_MEMBER_REMOVE_NOTICE_PURPOSE && !meta.removedByProfileId) context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"removedByProfileId is required for space member notices\",\n\t\tpath: [\"removedByProfileId\"]\n\t});\n\tif (meta.purpose === SPACE_MEMBER_REMOVE_NOTICE_PURPOSE && !meta.removedByDisplayName) context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"removedByDisplayName is required for space member notices\",\n\t\tpath: [\"removedByDisplayName\"]\n\t});\n});\nconst addSignalTextMessageEnvelopeIssues = (input, context) => {\n\tif (!input.messageEnvelope) return;\n\tif (input.messageEnvelope.text !== input.text) context.addIssue({\n\t\tcode: z.ZodIssueCode.custom,\n\t\tpath: [\"messageEnvelope\", \"text\"],\n\t\tmessage: \"messageEnvelope.text must match text\"\n\t});\n\tif (input.replyTo?.signalId && input.messageEnvelope.replyToSignalId && input.replyTo.signalId !== input.messageEnvelope.replyToSignalId) context.addIssue({\n\t\tcode: z.ZodIssueCode.custom,\n\t\tpath: [\"messageEnvelope\", \"replyToSignalId\"],\n\t\tmessage: \"messageEnvelope.replyToSignalId must match replyTo.signalId\"\n\t});\n};\nconst buildSignalTextDataSchema = (metaSchema) => z.object({\n\ttext: signalTextContentSchema,\n\tmessageEnvelope: messageEnvelopeSchema.optional(),\n\treplyTo: signalTextReplyToSchema.optional(),\n\tmeta: metaSchema.optional()\n}).superRefine(addSignalTextMessageEnvelopeIssues);\nconst signalTextDataSchema = buildSignalTextDataSchema(signalTextMetaSchema);\nconst signalTextSchema = z.object({\n\ttype: z.literal(\"signal.text\"),\n\tdata: buildSignalTextDataSchema(postedSignalTextMetaSchema)\n});\nconst signalStatusSchema = z.strictObject({\n\ttype: z.literal(\"signal.status\"),\n\tdata: signalStatusDataSchema$1\n});\nconst signalStatusDataSchema = signalStatusDataSchema$1;\nconst signalSystemNoticeSchema = z.strictObject({\n\ttype: z.literal(\"signal.system_notice\"),\n\tdata: signalSystemNoticeDataSchema$1\n});\nconst signalSystemNoticeDataSchema = signalSystemNoticeDataSchema$1;\nconst isControlCharacter = (character) => {\n\tconst codePoint = character.codePointAt(0);\n\treturn typeof codePoint === \"number\" && (codePoint < 32 || codePoint === DELETE_CODE_POINT);\n};\n\n//#endregion\n//#region src/schemas/daemon/mention-dispatch-result.ts\nconst ATSD_MENTION_DISPATCH_RESULT_SCHEMA_VERSION = 2;\nconst atsdMentionDispatchStatusSchema = z.enum([\n\t\"dispatch_ready\",\n\t\"blocked\",\n\t\"failed\"\n]);\nconst atsdMentionDispatchRuleSourceSchema = z.enum([\n\t\"system\",\n\t\"space\",\n\t\"profile\",\n\t\"registry\"\n]);\nconst atsdMentionDispatchResultCommonPayloadSchema = z.strictObject({\n\tsourceEventId: z.string().min(1),\n\tdispatchId: z.string().min(1),\n\ttargetProfileId: z.string().min(1),\n\truleSource: atsdMentionDispatchRuleSourceSchema,\n\truleId: z.string().min(1),\n\truleReason: z.string().min(1)\n});\nconst atsdMentionDispatchReadyPayloadSchema = atsdMentionDispatchResultCommonPayloadSchema.extend({ status: z.literal(\"dispatch_ready\") });\nconst atsdMentionDispatchBlockedPayloadSchema = atsdMentionDispatchResultCommonPayloadSchema.extend({\n\tstatus: z.literal(\"blocked\"),\n\terrorCode: z.string().min(1)\n});\nconst atsdMentionDispatchFailedPayloadSchema = atsdMentionDispatchResultCommonPayloadSchema.extend({\n\tstatus: z.literal(\"failed\"),\n\terrorCode: z.string().min(1)\n});\nconst atsdMentionDispatchResultPayloadSchema = z.discriminatedUnion(\"status\", [\n\tatsdMentionDispatchReadyPayloadSchema,\n\tatsdMentionDispatchBlockedPayloadSchema,\n\tatsdMentionDispatchFailedPayloadSchema\n]);\nconst atsdMentionDispatchResultEnvelopeSchema = z.strictObject({\n\tv: z.literal(ATSD_MENTION_DISPATCH_RESULT_SCHEMA_VERSION),\n\tcode: z.literal(\"service.mention_dispatch_result\"),\n\tpayload: atsdMentionDispatchResultPayloadSchema\n});\n\n//#endregion\n//#region src/schemas/daemon/dispatch-queue.ts\nconst ATSD_DISPATCH_QUEUE_SCHEMA_VERSION = 2;\nconst ATSD_DISPATCH_CONTRACT_VERSION = 2;\nconst atsdDispatchDeliveryRecoveryReasonSchema = z.enum([\"connection_replaced\", \"route_lost\"]);\nconst atsdDispatchRulesSnapshotSchema = z.strictObject({\n\tdispatchPolicy: runtimeDispatchPolicySchema,\n\truleSource: atsdMentionDispatchRuleSourceSchema,\n\truleId: z.string().min(1),\n\truleReason: z.string().min(1)\n});\nconst atsdDispatchControllerSnapshotSchema = z.strictObject({\n\ttargetBindingState: z.enum([\"bound\", \"missing\"]).describe(\"Compatibility seed evidence captured at Space handoff time. RuntimeCoordinator head lifecycle and Core Binding lookup remain the Wake outcome authorities.\"),\n\ttargetBindingEnabled: z.boolean().describe(\"Compatibility seed evidence captured at Space handoff time. RuntimeCoordinator head lifecycle and Core Binding lookup remain the Wake outcome authorities.\"),\n\tcontrollerKind: z.enum([\"builtin\", \"custom\"]).nullable(),\n\tcontrollerRef: z.string().min(1).nullable()\n});\nconst atsdDispatchSnapshotSchema = z.strictObject({\n\tdispatchPolicy: runtimeDispatchPolicySchema,\n\truleSource: atsdMentionDispatchRuleSourceSchema,\n\truleId: z.string().min(1),\n\truleReason: z.string().min(1),\n\ttargetBindingState: z.enum([\"bound\", \"missing\"]).describe(\"Compatibility seed evidence captured at Space handoff time. Do not use this snapshot as Binding authority or per-Wake outcome truth.\"),\n\ttargetBindingEnabled: z.boolean().describe(\"Compatibility seed evidence captured at Space handoff time. Do not use this snapshot as Binding authority or per-Wake outcome truth.\")\n});\nconst atsdDispatchSourceSignalSnapshotSchema = z.strictObject({\n\ttext: z.string().min(1),\n\tprofileId: z.string().min(1).nullable(),\n\tprofileKind: z.enum([\n\t\t\"agent\",\n\t\t\"human\",\n\t\t\"system\"\n\t]).nullable(),\n\tprofileMentionLabel: spaceMentionLabelSchema.optional()\n});\nconst atsdDispatchReplyToSnapshotSchema = signalTextReplyToSchema;\nconst atsdDispatchContinuitySnapshotSchema = z.strictObject({\n\tmessagesSinceThen: z.number().int().finite().min(0),\n\thigherAuthorityUpdates: z.boolean()\n});\nconst atsdDispatchOwnerSchema = z.strictObject({\n\tkind: z.literal(\"owner_account\"),\n\tid: z.string().min(1)\n});\nconst atsdDispatchQueueLegacyMessageSchemaV1 = z.strictObject({\n\tv: z.literal(1),\n\tdispatchId: z.string().min(1),\n\tspaceId: z.string().min(1),\n\tsourceEventId: z.string().min(1),\n\ttargetProfileId: z.string().min(1),\n\tidempotencyKey: z.string().min(1),\n\tenqueuedAtMs: z.number().int().nonnegative()\n});\nconst atsdDispatchQueueMessageSchema = z.strictObject({\n\tv: z.literal(ATSD_DISPATCH_QUEUE_SCHEMA_VERSION),\n\tdispatchId: z.string().min(1),\n\tspaceId: z.string().min(1),\n\tsourceEventId: z.string().min(1),\n\tsourceClientMessageId: z.string().min(1).max(200).nullable().optional(),\n\tdispatchOwner: atsdDispatchOwnerSchema.optional(),\n\ttargetProfileId: z.string().min(1),\n\ttargetProfileMentionLabel: spaceMentionLabelSchema.optional(),\n\tdispatchChainId: z.string().min(1),\n\tautoRelayDepth: z.number().int().nonnegative(),\n\tvisitedProfileIds: z.array(z.string().min(1)).max(256).default([]),\n\tvisitedProfileIdsHash: z.string().min(1),\n\tdispatchContractVersion: z.number().int().positive(),\n\tdispatchPolicy: runtimeDispatchPolicySchema,\n\truleSource: atsdMentionDispatchRuleSourceSchema,\n\truleId: z.string().min(1),\n\truleReason: z.string().min(1),\n\ttaskId: z.string().min(1),\n\ttransportMode: runtimeTransportModeSchema.nullable(),\n\tspacePassword: spacePasswordSchema.optional(),\n\tcontrollerSnapshot: atsdDispatchControllerSnapshotSchema,\n\tcontextIdMappingSpec: runtimeAgentContextIdMappingSpecSchema.nullable(),\n\tdispatchRulesSnapshot: atsdDispatchRulesSnapshotSchema,\n\tdispatchSnapshot: atsdDispatchSnapshotSchema,\n\tspaceContractSnapshot: spaceContractSchema.optional(),\n\tcontinuitySnapshot: atsdDispatchContinuitySnapshotSchema.optional(),\n\tsourceSignalSnapshot: atsdDispatchSourceSignalSnapshotSchema.optional(),\n\tsourceMessageEnvelope: messageEnvelopeSchema.optional(),\n\treplyToSnapshot: atsdDispatchReplyToSnapshotSchema.optional(),\n\tthreadContext: spaceThreadContextSchema.optional(),\n\tspaceNameSnapshot: z.string().min(1).nullable().optional(),\n\tsourceProfileNameSnapshot: z.string().min(1).nullable().optional(),\n\ttargetProfileNameSnapshot: z.string().min(1).nullable().optional(),\n\tdeliveryRecoveryReason: atsdDispatchDeliveryRecoveryReasonSchema.optional(),\n\tidempotencyKey: z.string().min(1),\n\tenqueuedAtMs: z.number().int().nonnegative()\n}).superRefine((value, context) => {\n\tif (value.dispatchSnapshot.dispatchPolicy !== value.dispatchPolicy) context.addIssue({\n\t\tcode: z.ZodIssueCode.custom,\n\t\tpath: [\"dispatchSnapshot\", \"dispatchPolicy\"],\n\t\tmessage: \"dispatchSnapshot.dispatchPolicy must match dispatchPolicy\"\n\t});\n\tif (value.dispatchSnapshot.ruleSource !== value.ruleSource) context.addIssue({\n\t\tcode: z.ZodIssueCode.custom,\n\t\tpath: [\"dispatchSnapshot\", \"ruleSource\"],\n\t\tmessage: \"dispatchSnapshot.ruleSource must match ruleSource\"\n\t});\n\tif (value.dispatchSnapshot.ruleId !== value.ruleId) context.addIssue({\n\t\tcode: z.ZodIssueCode.custom,\n\t\tpath: [\"dispatchSnapshot\", \"ruleId\"],\n\t\tmessage: \"dispatchSnapshot.ruleId must match ruleId\"\n\t});\n\tif (value.dispatchSnapshot.ruleReason !== value.ruleReason) context.addIssue({\n\t\tcode: z.ZodIssueCode.custom,\n\t\tpath: [\"dispatchSnapshot\", \"ruleReason\"],\n\t\tmessage: \"dispatchSnapshot.ruleReason must match ruleReason\"\n\t});\n\tif (value.dispatchRulesSnapshot.dispatchPolicy !== value.dispatchPolicy || value.dispatchRulesSnapshot.ruleSource !== value.ruleSource || value.dispatchRulesSnapshot.ruleId !== value.ruleId || value.dispatchRulesSnapshot.ruleReason !== value.ruleReason) context.addIssue({\n\t\tcode: z.ZodIssueCode.custom,\n\t\tpath: [\"dispatchRulesSnapshot\"],\n\t\tmessage: \"dispatchRulesSnapshot must match top-level dispatch rule fields\"\n\t});\n\tif (value.controllerSnapshot.targetBindingState !== value.dispatchSnapshot.targetBindingState || value.controllerSnapshot.targetBindingEnabled !== value.dispatchSnapshot.targetBindingEnabled) context.addIssue({\n\t\tcode: z.ZodIssueCode.custom,\n\t\tpath: [\"controllerSnapshot\"],\n\t\tmessage: \"controllerSnapshot target binding fields must match dispatchSnapshot\"\n\t});\n});\nconst atsdDispatchQueueIngressSchema = z.discriminatedUnion(\"v\", [atsdDispatchQueueLegacyMessageSchemaV1, atsdDispatchQueueMessageSchema]);\nconst resolveReceivedQueueSchemaVersion = (value) => {\n\tif (!(value && typeof value === \"object\") || Array.isArray(value)) return null;\n\tconst version = value.v;\n\treturn typeof version === \"number\" && Number.isInteger(version) ? version : null;\n};\nconst buildLegacyQueueIssues = () => [{\n\tcode: z.ZodIssueCode.custom,\n\tmessage: \"legacy dispatch queue schema version unsupported\",\n\tpath: [\"v\"]\n}];\nconst parseAtsdDispatchQueueIngress = (value) => {\n\tconst receivedQueueSchemaVersion = resolveReceivedQueueSchemaVersion(value);\n\tif (receivedQueueSchemaVersion === 2) {\n\t\tconst parsed = atsdDispatchQueueMessageSchema.safeParse(value);\n\t\tif (parsed.success) return {\n\t\t\tkind: \"current_v2\",\n\t\t\tmessage: parsed.data,\n\t\t\treceivedQueueSchemaVersion: parsed.data.v\n\t\t};\n\t\treturn {\n\t\t\tkind: \"invalid\",\n\t\t\tissues: parsed.error.issues,\n\t\t\treceivedQueueSchemaVersion\n\t\t};\n\t}\n\tif (receivedQueueSchemaVersion === 1) {\n\t\tconst parsed = atsdDispatchQueueLegacyMessageSchemaV1.safeParse(value);\n\t\tif (parsed.success) return {\n\t\t\tkind: \"legacy_v1\",\n\t\t\tmessage: parsed.data,\n\t\t\tissues: buildLegacyQueueIssues(),\n\t\t\treceivedQueueSchemaVersion: parsed.data.v\n\t\t};\n\t\treturn {\n\t\t\tkind: \"invalid\",\n\t\t\tissues: parsed.error.issues,\n\t\t\treceivedQueueSchemaVersion\n\t\t};\n\t}\n\tconst parsed = atsdDispatchQueueIngressSchema.safeParse(value);\n\tif (parsed.success) {\n\t\tif (parsed.data.v === 2) return {\n\t\t\tkind: \"current_v2\",\n\t\t\tmessage: parsed.data,\n\t\t\treceivedQueueSchemaVersion: parsed.data.v\n\t\t};\n\t\treturn {\n\t\t\tkind: \"legacy_v1\",\n\t\t\tmessage: parsed.data,\n\t\t\tissues: buildLegacyQueueIssues(),\n\t\t\treceivedQueueSchemaVersion: parsed.data.v\n\t\t};\n\t}\n\treturn {\n\t\tkind: \"invalid\",\n\t\tissues: parsed.error.issues,\n\t\treceivedQueueSchemaVersion\n\t};\n};\n\n//#endregion\n//#region src/schemas/daemon/execution-identity.ts\nconst RUNTIME_EXECUTION_IDENTITY_MODEL_VERSION = \"ats.runtime.execution_identity.v1\";\nconst boundedIdentifierSchema$2 = z.string().trim().min(1).max(512);\nconst runtimeExecutionAuthorityRuntimeIdSchema = z.strictObject({\n\tsource: z.literal(\"runtime_registry_authority\"),\n\tvalue: boundedIdentifierSchema$2\n});\nconst runtimeExecutionIdentityCoreSchema = z.strictObject({\n\tmodelVersion: z.literal(RUNTIME_EXECUTION_IDENTITY_MODEL_VERSION),\n\tspaceId: boundedIdentifierSchema$2,\n\tdispatchId: boundedIdentifierSchema$2,\n\ttargetProfileId: boundedIdentifierSchema$2,\n\truntimeId: runtimeExecutionAuthorityRuntimeIdSchema,\n\tbindingId: boundedIdentifierSchema$2,\n\tcapabilityRef: boundedIdentifierSchema$2\n});\nconst daemonHubDeliveryExecutionIdentitySchema = z.strictObject({\n\tauthority: z.literal(\"core_runtime_registry_binding_route\"),\n\tcore: runtimeExecutionIdentityCoreSchema\n});\nconst daemonHubRuntimeEvidenceIdentityEchoSchema = z.strictObject({\n\techoSource: z.literal(\"daemon_delivery_context\"),\n\tcore: runtimeExecutionIdentityCoreSchema\n});\nconst daemonHubResultIdentityEchoSchema = z.strictObject({\n\techoSource: z.literal(\"daemon_delivery_context\"),\n\tcore: runtimeExecutionIdentityCoreSchema\n});\nconst spaceTraceExecutionIdentityProjectionSchema = z.strictObject({\n\tfactSource: z.enum([\n\t\t\"runtime_coordinator_projection\",\n\t\t\"dispatch_attempt_execution_identity\",\n\t\t\"dispatch_claim_lease_legacy\"\n\t]),\n\tauthority: z.enum([\"authoritative\", \"legacy_projection\"]),\n\tcore: runtimeExecutionIdentityCoreSchema\n});\n\n//#endregion\n//#region src/schemas/daemon/provider-runtime-capability.ts\nconst providerRuntimeStreamingCapabilitySchema = z.enum([\"preview_capable\", \"final_only\"]);\nconst providerRuntimeWorkingDirectoryModeSchema = z.enum([\n\t\"spawn_cwd\",\n\t\"cli_flag\",\n\t\"provider_workspace\",\n\t\"unsupported\"\n]);\nconst providerRuntimePreparationRequirementSchema = z.enum([\"none\", \"required\"]);\nconst providerRuntimeContinuationCapabilitySchema = z.enum([\"standard\", \"provider_specific\"]);\nconst providerRuntimeWorkspaceResumeBehaviorSchema = z.enum([\n\t\"transparent\",\n\t\"provider_specific_switch\",\n\t\"validate_only\"\n]);\nconst providerRuntimeCapabilityDeclarationSchema = z.strictObject({\n\tstreamingCapability: providerRuntimeStreamingCapabilitySchema,\n\truntimeWorkingDirectoryMode: providerRuntimeWorkingDirectoryModeSchema,\n\tpreparationRequirement: providerRuntimePreparationRequirementSchema,\n\tcontinuationCapability: providerRuntimeContinuationCapabilitySchema,\n\tworkspaceResumeBehavior: providerRuntimeWorkspaceResumeBehaviorSchema\n});\nconst daemonRuntimeAdapterCapabilitySnapshotSchema = z.strictObject({\n\tadapterId: z.string().min(1),\n\ttransportModes: z.array(runtimeTransportModeSchema).min(1),\n\tdefaultStreamingMode: runtimeStreamingModeSchema.optional(),\n\tcapabilityDeclaration: providerRuntimeCapabilityDeclarationSchema\n});\n\n//#endregion\n//#region src/schemas/daemon/runtime-coordinator-execution-token.ts\nconst RUNTIME_COORDINATOR_EXECUTION_TOKEN_MODEL_VERSION = \"ats.runtime_coordinator.execution_token.v1\";\nconst RUNTIME_COORDINATOR_TOKEN_DIAGNOSTIC_MODEL_VERSION = \"ats.runtime_coordinator.token_diagnostic.v1\";\nconst RUNTIME_COORDINATOR_TOKEN_AUTHORITY_MODEL_VERSION = \"ats.runtime_coordinator.token_authority.v1\";\nconst RUNTIME_COORDINATOR_EXECUTION_TOKEN_REDACTION_MARKER = \"[REDACTED_EXECUTION_TOKEN]\";\nconst RUNTIME_COORDINATOR_TOKEN_SECRET_FIELD_NAMES = [\n\t\"executionToken\",\n\t\"rawExecutionToken\",\n\t\"rawToken\",\n\t\"sealedExecutionToken\",\n\t\"sealedToken\",\n\t\"tokenSecret\",\n\t\"tokenSecretRefOrSealedToken\",\n\t\"tokenValidationHash\",\n\t\"validationHash\"\n];\nconst boundedIdentifierSchema$1 = z.string().trim().min(1).max(512);\nconst boundedNullableIdentifierSchema = boundedIdentifierSchema$1.nullable();\nconst boundedReasonCodeSchema$1 = z.string().trim().min(1).max(160);\nconst nullablePositiveIntegerSchema$1 = z.number().int().positive().nullable();\nconst nullableTimestampSchema = z.number().int().nonnegative().nullable();\nconst runtimeCoordinatorExecutionTokenSchema = z.string().trim().min(32).max(256).regex(/^rcet_v1_[A-Za-z0-9_-]+$/);\nconst runtimeCoordinatorTokenValidationHashSchema = z.string().trim().regex(/^sha256:[a-f0-9]{64}$/);\nconst runtimeCoordinatorTokenFingerprintSchema = z.string().trim().regex(/^etfp_v1_[a-f0-9]{16,64}$/);\nconst runtimeCoordinatorTokenStatusSchema = z.enum([\n\t\"active\",\n\t\"superseded\",\n\t\"expired\",\n\t\"revoked\",\n\t\"terminal\"\n]);\nconst runtimeCoordinatorTokenReasonCodeSchema = z.enum([\n\t\"delivery_accepted\",\n\t\"execution_token_authority_missing\",\n\t\"execution_token_expired\",\n\t\"execution_token_issued\",\n\t\"execution_token_mismatch\",\n\t\"execution_token_missing\",\n\t\"execution_token_revoked\",\n\t\"execution_token_scope_mismatch\",\n\t\"execution_token_superseded\",\n\t\"execution_token_terminal_late\",\n\t\"execution_token_unknown\",\n\t\"token_history_pruned\",\n\t\"token_history_retained\"\n]);\nconst RUNTIME_COORDINATOR_RETIRED_TOKEN_REASON_CODE_BY_STATUS = {\n\texpired: \"execution_token_expired\",\n\trevoked: \"execution_token_revoked\",\n\tsuperseded: \"execution_token_superseded\",\n\tterminal: \"execution_token_terminal_late\"\n};\nconst runtimeCoordinatorTokenExecutionScopeSchema = z.strictObject({\n\tdispatchId: boundedIdentifierSchema$1,\n\truntimeCoordinatorExecutionId: boundedIdentifierSchema$1,\n\tsourceClientMessageId: boundedIdentifierSchema$1.nullable(),\n\tspaceId: boundedIdentifierSchema$1,\n\ttargetProfileId: boundedIdentifierSchema$1\n});\nconst runtimeCoordinatorTokenAuthorityScopeSchema = z.strictObject({\n\tbindingId: boundedIdentifierSchema$1,\n\tcapabilityRef: boundedIdentifierSchema$1,\n\truntimeId: boundedIdentifierSchema$1\n});\nconst runtimeCoordinatorTokenDeliveryProvenanceSchema = z.strictObject({\n\tconnectionGeneration: nullablePositiveIntegerSchema$1,\n\tdaemonSessionId: boundedNullableIdentifierSchema,\n\tleaseEpoch: nullablePositiveIntegerSchema$1\n});\nconst runtimeCoordinatorExecutionTokenEnvelopeSchema = z.strictObject({\n\tauthorityScope: runtimeCoordinatorTokenAuthorityScopeSchema,\n\tdeliveryIdempotencyKey: boundedIdentifierSchema$1,\n\tdeliveryProvenance: runtimeCoordinatorTokenDeliveryProvenanceSchema,\n\texecutionScope: runtimeCoordinatorTokenExecutionScopeSchema,\n\texecutionToken: runtimeCoordinatorExecutionTokenSchema,\n\texpiresAtMs: nullableTimestampSchema,\n\tissuedAtMs: z.number().int().nonnegative(),\n\tmodelVersion: z.literal(RUNTIME_COORDINATOR_EXECUTION_TOKEN_MODEL_VERSION),\n\trunId: boundedIdentifierSchema$1,\n\ttokenFingerprint: runtimeCoordinatorTokenFingerprintSchema,\n\ttokenStatus: z.literal(\"active\")\n});\nconst runtimeCoordinatorExecutionTokenEchoSchema = z.strictObject({\n\texecutionToken: runtimeCoordinatorExecutionTokenSchema,\n\trunId: boundedIdentifierSchema$1,\n\truntimeCoordinatorExecutionId: boundedIdentifierSchema$1,\n\ttokenFingerprint: runtimeCoordinatorTokenFingerprintSchema\n});\nconst runtimeCoordinatorTokenProjectionSchema = z.strictObject({\n\tdeliveryIdempotencyKey: boundedIdentifierSchema$1,\n\texpiresAtMs: nullableTimestampSchema,\n\tissuedAtMs: z.number().int().nonnegative(),\n\tmodelVersion: z.literal(RUNTIME_COORDINATOR_EXECUTION_TOKEN_MODEL_VERSION),\n\treasonCode: runtimeCoordinatorTokenReasonCodeSchema.nullable(),\n\tretiredAtMs: nullableTimestampSchema,\n\tretentionExpiresAtMs: nullableTimestampSchema,\n\trunId: boundedIdentifierSchema$1,\n\ttokenFingerprint: runtimeCoordinatorTokenFingerprintSchema,\n\ttokenStatus: runtimeCoordinatorTokenStatusSchema\n});\nconst runtimeCoordinatorTokenDiagnosticEventSchema = z.strictObject({\n\tignoredEventSummary: z.string().trim().min(1).max(1e3).nullable(),\n\tmodelVersion: z.literal(RUNTIME_COORDINATOR_TOKEN_DIAGNOSTIC_MODEL_VERSION),\n\tobservedAtMs: z.number().int().nonnegative(),\n\treasonCode: runtimeCoordinatorTokenReasonCodeSchema,\n\trunId: boundedNullableIdentifierSchema,\n\truntimeCoordinatorExecutionId: boundedIdentifierSchema$1,\n\ttokenFingerprint: runtimeCoordinatorTokenFingerprintSchema.nullable(),\n\ttokenStatus: runtimeCoordinatorTokenStatusSchema.nullable()\n});\nconst runtimeCoordinatorTokenRunAuthoritySchema = z.strictObject({\n\tdeliveryIdempotencyKey: boundedIdentifierSchema$1,\n\tdeliveryProvenance: runtimeCoordinatorTokenDeliveryProvenanceSchema,\n\texpiresAtMs: nullableTimestampSchema,\n\tissuedAtMs: z.number().int().nonnegative(),\n\tretentionExpiresAtMs: nullableTimestampSchema,\n\tretiredAtMs: nullableTimestampSchema,\n\tretiredReasonCode: runtimeCoordinatorTokenReasonCodeSchema.nullable(),\n\trunId: boundedIdentifierSchema$1,\n\tsupersededByRunId: boundedNullableIdentifierSchema,\n\tsupersedesRunId: boundedNullableIdentifierSchema,\n\ttokenFingerprint: runtimeCoordinatorTokenFingerprintSchema,\n\ttokenSecretRefOrSealedToken: z.string().trim().min(1).max(4096).nullable(),\n\ttokenStatus: runtimeCoordinatorTokenStatusSchema,\n\ttokenValidationHash: runtimeCoordinatorTokenValidationHashSchema\n});\nconst runtimeCoordinatorExecutionTokenAuthorityRecordBaseSchema = z.strictObject({\n\tauthorityScope: runtimeCoordinatorTokenAuthorityScopeSchema,\n\tcurrentRunId: boundedNullableIdentifierSchema,\n\texecutionScope: runtimeCoordinatorTokenExecutionScopeSchema,\n\tmodelVersion: z.literal(RUNTIME_COORDINATOR_TOKEN_AUTHORITY_MODEL_VERSION),\n\tretention: z.strictObject({\n\t\tlastPrunedAtMs: nullableTimestampSchema,\n\t\tlateResultWindowMs: z.number().int().nonnegative(),\n\t\tmaxRetiredRuns: z.number().int().positive()\n\t}),\n\truntimeCoordinatorExecutionId: boundedIdentifierSchema$1,\n\trunsById: z.record(boundedIdentifierSchema$1, runtimeCoordinatorTokenRunAuthoritySchema),\n\tterminalOutcome: z.strictObject({\n\t\tfinalizedAtMs: z.number().int().nonnegative(),\n\t\treasonCode: boundedReasonCodeSchema$1,\n\t\treplySignalId: boundedNullableIdentifierSchema,\n\t\tstatus: z.enum([\"reply_published\", \"failed_terminal\"])\n\t}).nullable(),\n\ttokenValidationHashIndex: z.record(runtimeCoordinatorTokenValidationHashSchema, boundedIdentifierSchema$1)\n});\nconst runtimeCoordinatorExecutionTokenAuthorityRecordSchema = runtimeCoordinatorExecutionTokenAuthorityRecordBaseSchema.superRefine((record, context) => {\n\tvalidateCurrentTokenRun(record, context);\n\tvalidateRetiredTokenHistoryLimit(record, context);\n\tvalidateTokenRunAuthorityEntries(record, context);\n});\nfunction validateCurrentTokenRun(record, context) {\n\tconst activeRunIds = Object.values(record.runsById).filter((run) => run.tokenStatus === \"active\").map((run) => run.runId);\n\tif (record.currentRunId === null && activeRunIds.length > 0) addTokenAuthorityIssue(context, [\"currentRunId\"], \"active token run requires currentRunId\");\n\tif (record.currentRunId !== null && (activeRunIds.length !== 1 || activeRunIds[0] !== record.currentRunId)) addTokenAuthorityIssue(context, [\"runsById\"], \"authority record must have exactly one current active run\");\n\tif (record.currentRunId === null) return;\n\tconst currentRun = record.runsById[record.currentRunId];\n\tif (!currentRun) {\n\t\taddTokenAuthorityIssue(context, [\"currentRunId\"], \"currentRunId must reference an existing run\");\n\t\treturn;\n\t}\n\tif (currentRun.tokenStatus !== \"active\") addTokenAuthorityIssue(context, [\n\t\t\"runsById\",\n\t\trecord.currentRunId,\n\t\t\"tokenStatus\"\n\t], \"current run must be active\");\n}\nfunction validateRetiredTokenHistoryLimit(record, context) {\n\tif (Object.values(record.runsById).filter((run) => run.tokenStatus !== \"active\").length > record.retention.maxRetiredRuns) addTokenAuthorityIssue(context, [\"retention\", \"maxRetiredRuns\"], \"retired token history exceeds maxRetiredRuns\");\n}\nfunction validateTokenRunAuthorityEntries(record, context) {\n\tfor (const [runKey, run] of Object.entries(record.runsById)) {\n\t\tif (run.runId !== runKey) addTokenAuthorityIssue(context, [\n\t\t\t\"runsById\",\n\t\t\trunKey,\n\t\t\t\"runId\"\n\t\t], \"run key must match runId\");\n\t\tvalidateTokenRunSecretBoundary(runKey, run, context);\n\t\tvalidateTokenValidationHashIndex(record, run, context);\n\t}\n}\nfunction validateTokenRunSecretBoundary(runKey, run, context) {\n\tif (run.tokenStatus === \"active\") {\n\t\tvalidateActiveTokenRunSecretBoundary(runKey, run, context);\n\t\treturn;\n\t}\n\tvalidateRetiredTokenRunSecretBoundary(runKey, run, context);\n}\nfunction validateActiveTokenRunSecretBoundary(runKey, run, context) {\n\tif (!run.tokenSecretRefOrSealedToken) addTokenAuthorityIssue(context, [\n\t\t\"runsById\",\n\t\trunKey,\n\t\t\"tokenSecretRefOrSealedToken\"\n\t], \"active run must retain a resendable token secret\");\n\tif (run.retiredAtMs !== null || run.retentionExpiresAtMs !== null || run.retiredReasonCode !== null) addTokenAuthorityIssue(context, [\"runsById\", runKey], \"active run must not carry retired metadata\");\n}\nfunction validateRetiredTokenRunSecretBoundary(runKey, run, context) {\n\tif (run.tokenSecretRefOrSealedToken !== null) {\n\t\taddTokenAuthorityIssue(context, [\n\t\t\t\"runsById\",\n\t\t\trunKey,\n\t\t\t\"tokenSecretRefOrSealedToken\"\n\t\t], \"retired run must not retain a resendable token secret\");\n\t\treturn;\n\t}\n\tif (run.retiredAtMs === null || run.retentionExpiresAtMs === null || run.retiredReasonCode === null) {\n\t\taddTokenAuthorityIssue(context, [\"runsById\", runKey], \"retired run must carry retired metadata\");\n\t\treturn;\n\t}\n\tif (run.tokenStatus === \"active\") return;\n\tif (run.retiredReasonCode !== RUNTIME_COORDINATOR_RETIRED_TOKEN_REASON_CODE_BY_STATUS[run.tokenStatus]) addTokenAuthorityIssue(context, [\n\t\t\"runsById\",\n\t\trunKey,\n\t\t\"retiredReasonCode\"\n\t], \"retired run reason must match token status\");\n}\nfunction validateTokenValidationHashIndex(record, run, context) {\n\tif (record.tokenValidationHashIndex[run.tokenValidationHash] !== run.runId) addTokenAuthorityIssue(context, [\"tokenValidationHashIndex\", run.tokenValidationHash], \"tokenValidationHashIndex must map each hash to its run\");\n}\nfunction addTokenAuthorityIssue(context, path, message) {\n\tcontext.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage,\n\t\tpath\n\t});\n}\nconst runtimeCoordinatorSafeEventPayloadJsonSchema = z.string().trim().min(1).superRefine((value, context) => {\n\tlet parsed;\n\ttry {\n\t\tparsed = JSON.parse(value);\n\t} catch {\n\t\tcontext.addIssue({\n\t\t\tcode: \"custom\",\n\t\t\tmessage: \"runtime coordinator event payloadJson must be valid JSON\"\n\t\t});\n\t\treturn;\n\t}\n\tconst sensitivePath = findSensitiveTokenFieldPath(parsed);\n\tif (sensitivePath) context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"runtime coordinator event payloadJson must not contain execution token secrets\",\n\t\tpath: sensitivePath\n\t});\n});\nconst findSensitiveTokenFieldPath = (value, path = []) => {\n\tif (typeof value === \"string\") {\n\t\tif (isRuntimeCoordinatorTokenSecretValue(value)) return path;\n\t\treturn null;\n\t}\n\tif (!value || typeof value !== \"object\") return null;\n\tif (Array.isArray(value)) {\n\t\tfor (const [index, item] of value.entries()) {\n\t\t\tconst match = findSensitiveTokenFieldPath(item, [...path, index]);\n\t\t\tif (match) return match;\n\t\t}\n\t\treturn null;\n\t}\n\tfor (const [fieldName, fieldValue] of Object.entries(value)) {\n\t\tconst nextPath = [...path, fieldName];\n\t\tif (isAllowedRedactedTokenField(fieldName, fieldValue)) continue;\n\t\tif (isSensitiveTokenFieldName(fieldName)) return nextPath;\n\t\tconst match = findSensitiveTokenFieldPath(fieldValue, nextPath);\n\t\tif (match) return match;\n\t}\n\treturn null;\n};\nconst TOKEN_SECRET_FIELD_NAME_SET = new Set(RUNTIME_COORDINATOR_TOKEN_SECRET_FIELD_NAMES.map((fieldName) => normalizePayloadFieldName(fieldName)));\nconst SAFE_TOKEN_METADATA_FIELD_NAME_SET = new Set([\n\t\"reasoncode\",\n\t\"tokenfingerprint\",\n\t\"tokenstatus\"\n]);\nconst RAW_EXECUTION_TOKEN_VALUE_PATTERN = /^rcet_v1_[A-Za-z0-9_-]+$/;\nconst TOKEN_VALIDATION_HASH_VALUE_PATTERN = /^sha256:[a-f0-9]{64}$/;\nfunction isSensitiveTokenFieldName(fieldName) {\n\tconst normalized = normalizePayloadFieldName(fieldName);\n\tif (SAFE_TOKEN_METADATA_FIELD_NAME_SET.has(normalized)) return false;\n\tif (TOKEN_SECRET_FIELD_NAME_SET.has(normalized)) return true;\n\tconst referencesToken = normalized.includes(\"token\") || normalized.includes(\"credential\") || normalized.includes(\"bearer\");\n\tconst referencesProof = normalized.includes(\"hash\") || normalized.includes(\"validation\") || normalized.includes(\"validator\") || normalized.includes(\"digest\") || normalized.includes(\"proof\") || normalized.includes(\"secret\") || normalized.includes(\"sealed\") || normalized.includes(\"signature\") || normalized.includes(\"raw\");\n\treturn referencesToken && referencesProof;\n}\nfunction isRuntimeCoordinatorTokenSecretValue(value) {\n\tconst normalized = value.trim();\n\treturn RAW_EXECUTION_TOKEN_VALUE_PATTERN.test(normalized) || TOKEN_VALIDATION_HASH_VALUE_PATTERN.test(normalized);\n}\nfunction isAllowedRedactedTokenField(fieldName, fieldValue) {\n\treturn normalizePayloadFieldName(fieldName).endsWith(\"redacted\") && fieldValue === RUNTIME_COORDINATOR_EXECUTION_TOKEN_REDACTION_MARKER;\n}\nfunction normalizePayloadFieldName(fieldName) {\n\treturn fieldName.toLowerCase().replaceAll(/[^a-z0-9]/g, \"\");\n}\n\n//#endregion\n//#region src/schemas/daemon/runtime-coordinator-execution.ts\nconst RUNTIME_COORDINATOR_EXECUTION_MODEL_VERSION = \"ats.runtime_coordinator.execution.v1\";\nconst RUNTIME_COORDINATOR_CREATION_DIAGNOSTIC_MODEL_VERSION = \"ats.runtime_coordinator.creation_diagnostic.v1\";\nconst boundedIdentifierSchema = z.string().trim().min(1).max(512);\nconst boundedReasonCodeSchema = z.string().trim().min(1).max(160);\nconst nullableSourceClientMessageIdSchema = z.string().trim().min(1).max(200).nullable();\nconst nullableIdentifierSchema = boundedIdentifierSchema.nullable();\nconst nullablePositiveIntegerSchema = z.number().int().positive().nullable();\nconst runtimeCoordinatorExecutionStatusSchema = z.enum([\n\t\"created\",\n\t\"delivery_pending\",\n\t\"delivery_accepted\",\n\t\"delivery_rejected\",\n\t\"accepted_local\",\n\t\"running\",\n\t\"completed_local\",\n\t\"result_received\",\n\t\"result_accepted\",\n\t\"reply_published\",\n\t\"failed_retryable\",\n\t\"failed_terminal\",\n\t\"state_unknown\"\n]);\nconst runtimeCoordinatorExecutionEventTypeSchema = z.enum([\n\t\"execution_created\",\n\t\"delivery_accepted\",\n\t\"delivery_rejected\",\n\t\"lifecycle_accepted_local\",\n\t\"lifecycle_running\",\n\t\"lifecycle_completed_local\",\n\t\"result_received\",\n\t\"result_accepted\",\n\t\"result_duplicate\",\n\t\"result_stale_lease\",\n\t\"result_stale_attempt\",\n\t\"result_connection_generation_mismatch\",\n\t\"result_identity_echo_mismatch\",\n\t\"result_late_diagnostic\",\n\t\"execution_token_issued\",\n\t\"execution_token_validation_failed\",\n\t\"execution_token_superseded\",\n\t\"execution_token_expired\",\n\t\"execution_token_revoked\",\n\t\"execution_token_terminal_late\",\n\t\"token_history_retained\",\n\t\"token_history_pruned\",\n\t\"runtime_coordinator_execution_id_missing\",\n\t\"runtime_coordinator_execution_id_mismatch\",\n\t\"runtime_evidence_observed\",\n\t\"runtime_evidence_identity_echo_mismatch\",\n\t\"owner_conflict_current_token\",\n\t\"owner_conflict_stale_token\",\n\t\"owner_conflict_missing_token\",\n\t\"runtime_coordinator_decision_recorded\",\n\t\"runtime_coordinator_redelivery_commanded\",\n\t\"runtime_coordinator_owner_conflict_terminal\",\n\t\"runtime_coordinator_reclaim_blocked\",\n\t\"runtime_coordinator_retry_blocked\",\n\t\"runtime_coordinator_timeout_terminal\",\n\t\"reply_published\",\n\t\"reply_publication_failed\",\n\t\"coordinator_pending_state_missing\",\n\t\"runtime_connection_lost\"\n]);\nconst runtimeCoordinatorTerminalOutcomeSchema = z.strictObject({\n\tkind: z.enum([\n\t\t\"reply_published\",\n\t\t\"failed_retryable\",\n\t\t\"failed_terminal\",\n\t\t\"cancelled\",\n\t\t\"timed_out\"\n\t]),\n\treasonCode: boundedReasonCodeSchema.nullable(),\n\tobservedAtMs: z.number().int().nonnegative()\n});\nconst runtimeCoordinatorLegacyPointersSchema = z.strictObject({\n\tattemptId: nullableIdentifierSchema,\n\tclaimLeaseId: nullableIdentifierSchema,\n\tdaemonSessionId: nullableIdentifierSchema,\n\tconnectionGeneration: nullablePositiveIntegerSchema,\n\tleaseEpoch: nullablePositiveIntegerSchema\n});\nconst runtimeCoordinatorExecutionRecordSchema = z.strictObject({\n\truntimeCoordinatorExecutionId: boundedIdentifierSchema,\n\tmodelVersion: z.literal(RUNTIME_COORDINATOR_EXECUTION_MODEL_VERSION),\n\tspaceId: boundedIdentifierSchema,\n\tdispatchId: boundedIdentifierSchema,\n\ttargetProfileId: boundedIdentifierSchema,\n\tsourceClientMessageId: nullableSourceClientMessageIdSchema,\n\truntimeId: runtimeExecutionAuthorityRuntimeIdSchema,\n\tbindingId: boundedIdentifierSchema,\n\tcapabilityRef: boundedIdentifierSchema,\n\tstatus: runtimeCoordinatorExecutionStatusSchema,\n\tterminalOutcome: runtimeCoordinatorTerminalOutcomeSchema.nullable(),\n\tcreatedAtMs: z.number().int().nonnegative(),\n\tupdatedAtMs: z.number().int().nonnegative(),\n\tlegacyPointers: runtimeCoordinatorLegacyPointersSchema\n});\nconst runtimeCoordinatorExecutionEventSchema = z.strictObject({\n\teventId: boundedIdentifierSchema,\n\truntimeCoordinatorExecutionId: boundedIdentifierSchema,\n\teventType: runtimeCoordinatorExecutionEventTypeSchema,\n\tstatusAfter: runtimeCoordinatorExecutionStatusSchema.nullable(),\n\treasonCode: boundedReasonCodeSchema.nullable(),\n\tobservedAtMs: z.number().int().nonnegative(),\n\tidempotencyKey: boundedIdentifierSchema,\n\tpayloadJson: runtimeCoordinatorSafeEventPayloadJsonSchema\n});\nconst runtimeCoordinatorExecutionCreationStatusSchema = z.enum([\"not_created\"]);\nconst runtimeCoordinatorExecutionCreationDiagnosticSchema = z.strictObject({\n\tmodelVersion: z.literal(RUNTIME_COORDINATOR_CREATION_DIAGNOSTIC_MODEL_VERSION),\n\tspaceId: boundedIdentifierSchema,\n\tdispatchId: boundedIdentifierSchema,\n\ttargetProfileId: boundedIdentifierSchema,\n\tsourceClientMessageId: nullableSourceClientMessageIdSchema,\n\tcreationStatus: runtimeCoordinatorExecutionCreationStatusSchema,\n\treasonCode: boundedReasonCodeSchema,\n\tobservedAtMs: z.number().int().nonnegative(),\n\tlegacyAttemptId: nullableIdentifierSchema\n});\nconst buildRuntimeCoordinatorExecutionId = (input) => {\n\tconst spaceId = normalizeRequiredRuntimeCoordinatorIdPart(\"spaceId\", input.spaceId);\n\tconst dispatchId = normalizeRequiredRuntimeCoordinatorIdPart(\"dispatchId\", input.dispatchId);\n\tconst targetProfileId = normalizeRequiredRuntimeCoordinatorIdPart(\"targetProfileId\", input.targetProfileId);\n\treturn [\n\t\t\"rce_v1\",\n\t\tencodeLengthPrefixedIdPart(spaceId),\n\t\tencodeLengthPrefixedIdPart(dispatchId),\n\t\tencodeLengthPrefixedIdPart(targetProfileId)\n\t].join(\"|\");\n};\nconst buildRuntimeCoordinatorExecutionEventId = (input) => {\n\tconst runtimeCoordinatorExecutionId = normalizeRequiredRuntimeCoordinatorIdPart(\"runtimeCoordinatorExecutionId\", input.runtimeCoordinatorExecutionId);\n\tconst idempotencyKey = normalizeRequiredRuntimeCoordinatorIdPart(\"idempotencyKey\", input.idempotencyKey);\n\treturn [\n\t\t\"rce_event_v1\",\n\t\tencodeLengthPrefixedIdPart(runtimeCoordinatorExecutionId),\n\t\tencodeLengthPrefixedIdPart(input.eventType),\n\t\tencodeLengthPrefixedIdPart(idempotencyKey)\n\t].join(\"|\");\n};\nconst encodeLengthPrefixedIdPart = (value) => {\n\treturn `${value.length}:${value}`;\n};\nconst normalizeRequiredRuntimeCoordinatorIdPart = (fieldName, value) => {\n\tconst normalized = value.trim();\n\tif (!normalized) throw new Error(`runtime_coordinator.id_invalid: ${fieldName} is required`);\n\treturn normalized;\n};\n\n//#endregion\n//#region src/schemas/daemon/service-contract.ts\nconst DAEMON_SERVICE_CONTRACT_SCHEMA_VERSION = 1;\nconst daemonServiceLaneSchema = z.enum([\n\t\"prod\",\n\t\"dev-local\",\n\t\"canary\"\n]);\nconst daemonServiceDesiredStateSchema = z.enum([\"stopped\", \"background\"]);\nconst daemonServiceControllerSchema = z.enum([\n\t\"launchd\",\n\t\"systemd\",\n\t\"windows-service\",\n\t\"legacy-detached\",\n\t\"unknown\"\n]);\nconst daemonServiceContractSchema = z.strictObject({\n\tschema: z.literal(\"ats-daemon-service-contract-v1\"),\n\tv: z.literal(DAEMON_SERVICE_CONTRACT_SCHEMA_VERSION),\n\tlane: daemonServiceLaneSchema,\n\tdaemonVersion: z.string().min(1),\n\tbundleId: z.string().min(1),\n\tdesiredState: daemonServiceDesiredStateSchema,\n\tserviceController: daemonServiceControllerSchema,\n\tautoStart: z.boolean(),\n\tgatewayUrl: z.string().min(1),\n\tprofileId: z.string().min(1).optional(),\n\tdeviceId: z.string().min(1),\n\tconnectedComputerId: z.string().min(1).optional(),\n\theartbeatMs: z.int().positive(),\n\tgeneration: z.int().positive(),\n\tupdatedAt: z.string().min(1)\n});\n\n//#endregion\n//#region src/schemas/space-mesh/ats-space-action.ts\nconst SPACE_UPDATES_DEFAULT_LIMIT = 20;\nconst SPACE_UPDATES_MAX_LIMIT = 200;\nconst signalIdRefSchema = z.strictObject({ signalId: z.preprocess(trimmedStringFromUnknown, z.string().min(1)) });\nconst atsSpaceActionReplyToSchema = z.union([z.literal(\"current\"), signalIdRefSchema]);\nconst atsSpaceActionReadUpdatesFromSchema = z.union([z.literal(\"last_public_reply\"), signalIdRefSchema]);\nconst atsSpaceActionReadResultBySchema = z.union([z.strictObject({ resultRef: z.preprocess(trimmedStringFromUnknown, z.string().min(1)) }), z.strictObject({ dispatchId: z.preprocess(trimmedStringFromUnknown, z.string().min(1)) })]);\nconst atsSpacePostMessageActionSchema = z.strictObject({\n\ttype: z.literal(\"post_message\"),\n\tmessageEnvelope: messageEnvelopeSchema,\n\tthread: spaceThreadActionRefSchema.optional(),\n\tsaveResult: z.boolean().optional()\n});\nconst atsSpacePostStatusActionSchema = z.strictObject({\n\ttype: z.literal(\"post_status\"),\n\tstatus: spaceStatusSchema,\n\ttargetProfileId: atsRuntimeProfileIdSchema.optional(),\n\ttext: z.preprocess(trimmedStringFromUnknown, z.string().min(1).max(MAX_SIGNAL_REPLY_TO_PREVIEW_LENGTH)),\n\treplyTo: atsSpaceActionReplyToSchema.optional(),\n\tthread: spaceThreadActionRefSchema.optional(),\n\tsaveResult: z.boolean().optional()\n});\nconst atsSpaceStaySilentActionSchema = z.strictObject({\n\ttype: z.literal(\"stay_silent\"),\n\treason: z.preprocess(trimmedStringFromUnknown, z.string().min(1)),\n\tsaveResult: z.boolean().optional()\n});\nconst atsSpaceReadUpdatesActionSchema = z.strictObject({\n\ttype: z.literal(\"read_updates\"),\n\tfrom: atsSpaceActionReadUpdatesFromSchema,\n\tthread: spaceThreadActionRefSchema.optional(),\n\tlimit: z.number().int().finite().positive().max(SPACE_UPDATES_MAX_LIMIT).optional()\n});\nconst atsSpaceReadResultActionSchema = z.strictObject({\n\ttype: z.literal(\"read_result\"),\n\tby: atsSpaceActionReadResultBySchema\n});\nconst atsSpaceActionSchema = z.union([\n\tatsSpacePostMessageActionSchema,\n\tatsSpacePostStatusActionSchema,\n\tatsSpaceStaySilentActionSchema,\n\tatsSpaceReadUpdatesActionSchema,\n\tatsSpaceReadResultActionSchema\n]);\nconst atsSpaceEgressActionSchema = z.union([\n\tatsSpacePostMessageActionSchema,\n\tatsSpacePostStatusActionSchema,\n\tatsSpaceStaySilentActionSchema\n]);\n\n//#endregion\n//#region src/schemas/daemon/task-result.ts\nconst ATSD_TASK_RESULT_SCHEMA_VERSION = 4;\nconst ATSD_TASK_RESULT_SCHEMA_VERSION_PREVIOUS = 3;\nconst ATSD_TASK_RESULT_SCHEMA_VERSION_LEGACY = 2;\nconst ATSD_TASK_RESULT_SCHEMA_VERSION_OLDEST = 1;\nconst atsdTaskResultStatusSchema = z.enum([\n\t\"success\",\n\t\"partial_success\",\n\t\"failed\"\n]);\nconst atsdTaskResultErrorTypeSchema = z.enum([\n\t\"config\",\n\t\"network\",\n\t\"adapter\",\n\t\"policy\",\n\t\"timeout\",\n\t\"internal\",\n\t\"auth\"\n]);\nconst atsdProviderAccessEvidenceProviderSchema = z.literal(\"claude-code\");\nconst atsdProviderAccessEvidenceReasonCodeSchema = z.enum([\"provider_account.organization_access_disabled\", \"provider_account.subscription_access_unavailable\"]);\nconst atsdProviderAccessEvidenceSourceSchema = z.literal(\"wake_failure\");\nconst atsdProviderAccessEvidenceSchema = z.strictObject({\n\tobservedAtMs: z.number().int().nonnegative(),\n\tprovider: atsdProviderAccessEvidenceProviderSchema,\n\treasonCode: atsdProviderAccessEvidenceReasonCodeSchema,\n\tsource: atsdProviderAccessEvidenceSourceSchema\n});\nconst atsdTaskResultSpaceActionProvenanceSchema = z.enum([\n\t\"cli_action\",\n\t\"direct\",\n\t\"local_repair\",\n\t\"controller_repair\"\n]);\nconst atsdTaskResultSpaceActionFailureRepairModeSchema = z.enum([\n\t\"required_check\",\n\t\"local_synthetic\",\n\t\"controller_roundtrip\"\n]);\nconst atsdTaskResultSpaceActionCarrierKindSchema = z.enum([\n\t\"fenced_block\",\n\t\"invalid_json\",\n\t\"none\",\n\t\"trailing_json\"\n]);\nconst atsdTaskResultSpaceActionFailureDiagnosticsSchema = z.strictObject({\n\tcarrierKind: atsdTaskResultSpaceActionCarrierKindSchema,\n\tinvalidOutputPreview: z.union([z.string().min(1), z.null()]),\n\tpublicFailureReason: z.union([z.string().min(1), z.null()]).optional().default(null),\n\trepairMode: atsdTaskResultSpaceActionFailureRepairModeSchema,\n\tspaceActionCandidatePresent: z.boolean(),\n\tspaceActionParseError: z.union([z.string().min(1), z.null()])\n});\nconst atsdTaskResultOpenClawGatewayVisibilityStatusSchema = z.enum([\n\t\"missing_after_restart\",\n\t\"missing_before_restart\",\n\t\"visible\",\n\t\"visible_after_restart\"\n]);\nconst atsdTaskResultOpenClawGatewayVisibilitySchema = z.strictObject({\n\tagentId: z.string().min(1),\n\tgatewayRestartAttempted: z.boolean(),\n\tgatewayVisibility: atsdTaskResultOpenClawGatewayVisibilityStatusSchema\n});\nconst atsdTaskResultOpenClawBindingClassificationSchema = z.enum([\n\t\"missing\",\n\t\"canonical_owned\",\n\t\"legacy\",\n\t\"foreign\"\n]);\nconst atsdTaskResultOpenClawBindingSchema = z.strictObject({ classification: atsdTaskResultOpenClawBindingClassificationSchema });\nconst atsdTaskResultLocalOwnerConflictSchema = z.strictObject({\n\tactiveAttemptId: z.string().min(1).nullable(),\n\tactiveDispatchId: z.string().min(1).nullable(),\n\tactiveExecutionTokenRunId: z.string().min(1).nullable(),\n\tactiveRuntimeCoordinatorExecutionId: z.string().min(1).nullable(),\n\tactiveTaskId: z.string().min(1).nullable(),\n\treason: z.literal(\"task.owner_conflict\"),\n\trejectedAttemptId: z.string().min(1),\n\trejectedDispatchId: z.string().min(1),\n\trejectedExecutionTokenRunId: z.string().min(1).nullable(),\n\trejectedRuntimeCoordinatorExecutionId: z.string().min(1).nullable(),\n\trejectedTaskId: z.string().min(1)\n});\nconst atsdTaskResultPromptTraceSchema = z.strictObject({\n\tfingerprint: z.string().min(1),\n\tlength: z.int().nonnegative(),\n\tpreview: z.union([z.string().min(1), z.null()])\n});\nconst atsdTaskResultClaimLeaseSchema = z.strictObject({\n\tclaimLeaseId: z.string().min(1),\n\toutcome: z.enum([\"existing_lease\", \"new_lease\"]),\n\tstatus: z.literal(\"accepted\")\n});\nconst atsdTaskResultTelemetrySchema = z.strictObject({\n\tcompletedAtMs: z.number().int().nonnegative(),\n\tcontextHealed: z.boolean().optional(),\n\texitCode: z.int().nullable().optional(),\n\texitObservedAtMs: z.number().int().nonnegative().optional(),\n\texitSignal: z.string().min(1).nullable().optional(),\n\tfirstOutputAtMs: z.number().int().nonnegative().optional(),\n\tfirstStderrAtMs: z.number().int().nonnegative().optional(),\n\tfirstStdoutAtMs: z.number().int().nonnegative().optional(),\n\tinvokedAtMs: z.number().int().nonnegative(),\n\tpreviewEmitted: z.boolean().optional(),\n\tprocessId: z.number().int().positive().optional(),\n\tprocessSpawnedAtMs: z.number().int().nonnegative().optional(),\n\tresumedContext: z.boolean(),\n\tstdinClosedAtMs: z.number().int().nonnegative().optional(),\n\tstreamingMode: z.enum([\"final\", \"stream\"]).optional(),\n\ttimeoutTriggeredAtMs: z.number().int().nonnegative().optional()\n});\nconst atsdTaskResultCommonSchemaV1 = z.strictObject({\n\ttaskId: z.string().min(1),\n\tsourceEventId: z.string().min(1),\n\tagentId: z.string().min(1),\n\tdeduped: z.boolean(),\n\tcontrollerRef: z.string().min(1).optional(),\n\tagentContextId: z.string().min(1).optional()\n});\nconst atsdTaskResultCommonSchema = atsdTaskResultCommonSchemaV1.extend({\n\tattemptId: z.string().min(1),\n\ttelemetry: atsdTaskResultTelemetrySchema.optional(),\n\tupstreamConversation: upstreamConversationRefSchema.optional(),\n\teffectiveRuntimeWorkingDirectory: profileWorkingDirectorySchema.optional(),\n\truntimeWorkspaceFingerprint: z.string().min(1).optional(),\n\tpromptTrace: atsdTaskResultPromptTraceSchema.optional(),\n\tclaimLease: atsdTaskResultClaimLeaseSchema.optional(),\n\tbootstrapTemplateFacts: bootstrapTemplateFactsSchema.optional(),\n\tdispatchExecution: dispatchExecutionSchema.optional(),\n\topenClawGatewayVisibility: atsdTaskResultOpenClawGatewayVisibilitySchema.optional(),\n\topenClawBinding: atsdTaskResultOpenClawBindingSchema.optional(),\n\tlocalOwnerConflict: atsdTaskResultLocalOwnerConflictSchema.optional(),\n\tspaceAction: atsSpaceEgressActionSchema.optional(),\n\tspaceActionFailureDiagnostics: atsdTaskResultSpaceActionFailureDiagnosticsSchema.optional(),\n\tspaceActionProvenance: atsdTaskResultSpaceActionProvenanceSchema.optional(),\n\tsuppressPublicOutcome: z.boolean().optional()\n});\nconst atsdTaskResultCommonSchemaV3 = atsdTaskResultCommonSchemaV1.extend({\n\tattemptId: z.string().min(1),\n\ttelemetry: atsdTaskResultTelemetrySchema.optional(),\n\tupstreamConversation: upstreamConversationRefSchema.optional(),\n\teffectiveRuntimeWorkingDirectory: profileWorkingDirectorySchema.optional(),\n\truntimeWorkspaceFingerprint: z.string().min(1).optional(),\n\tbootstrapTemplateFacts: bootstrapTemplateFactsSchema.optional(),\n\tdispatchExecution: dispatchExecutionSchema.optional(),\n\topenClawGatewayVisibility: atsdTaskResultOpenClawGatewayVisibilitySchema.optional(),\n\topenClawBinding: atsdTaskResultOpenClawBindingSchema.optional(),\n\tspaceAction: atsSpaceEgressActionSchema.optional(),\n\tsuppressPublicOutcome: z.boolean().optional()\n});\nconst atsdTaskResultSuccessPayloadSchema = atsdTaskResultCommonSchema.extend({\n\tstatus: z.literal(\"success\"),\n\toutput: z.string().min(1)\n});\nconst atsdTaskResultPartialSuccessPayloadSchema = atsdTaskResultCommonSchema.extend({\n\tstatus: z.literal(\"partial_success\"),\n\toutput: z.string().min(1),\n\terrorType: atsdTaskResultErrorTypeSchema,\n\terrorCode: z.string().min(1).optional(),\n\tpartialReason: z.string().min(1),\n\terrorMessage: z.string().min(1).optional()\n});\nconst atsdTaskResultFailedPayloadSchema = atsdTaskResultCommonSchema.extend({\n\tstatus: z.literal(\"failed\"),\n\terrorType: atsdTaskResultErrorTypeSchema,\n\terrorCode: z.string().min(1).optional(),\n\terrorMessage: z.string().min(1).optional(),\n\tproviderAccessEvidence: atsdProviderAccessEvidenceSchema.optional()\n});\nconst atsdTaskResultPayloadSchema = z.discriminatedUnion(\"status\", [\n\tatsdTaskResultSuccessPayloadSchema,\n\tatsdTaskResultPartialSuccessPayloadSchema,\n\tatsdTaskResultFailedPayloadSchema\n]);\nconst atsdTaskResultSuccessPayloadSchemaV3 = atsdTaskResultCommonSchemaV3.extend({\n\tstatus: z.literal(\"success\"),\n\toutput: z.string().min(1)\n});\nconst atsdTaskResultPartialSuccessPayloadSchemaV3 = atsdTaskResultCommonSchemaV3.extend({\n\tstatus: z.literal(\"partial_success\"),\n\toutput: z.string().min(1),\n\terrorType: atsdTaskResultErrorTypeSchema,\n\terrorCode: z.string().min(1).optional(),\n\tpartialReason: z.string().min(1),\n\terrorMessage: z.string().min(1).optional()\n});\nconst atsdTaskResultFailedPayloadSchemaV3 = atsdTaskResultCommonSchemaV3.extend({\n\tstatus: z.literal(\"failed\"),\n\terrorType: atsdTaskResultErrorTypeSchema,\n\terrorCode: z.string().min(1).optional(),\n\terrorMessage: z.string().min(1).optional()\n});\nconst atsdTaskResultPayloadSchemaV3 = z.discriminatedUnion(\"status\", [\n\tatsdTaskResultSuccessPayloadSchemaV3,\n\tatsdTaskResultPartialSuccessPayloadSchemaV3,\n\tatsdTaskResultFailedPayloadSchemaV3\n]);\nconst atsdTaskResultSuccessPayloadSchemaV1 = atsdTaskResultCommonSchemaV1.extend({\n\tstatus: z.literal(\"success\"),\n\toutput: z.string().min(1)\n});\nconst atsdTaskResultPartialSuccessPayloadSchemaV1 = atsdTaskResultCommonSchemaV1.extend({\n\tstatus: z.literal(\"partial_success\"),\n\toutput: z.string().min(1),\n\terrorType: atsdTaskResultErrorTypeSchema,\n\terrorCode: z.string().min(1).optional(),\n\tpartialReason: z.string().min(1),\n\terrorMessage: z.string().min(1).optional()\n});\nconst atsdTaskResultFailedPayloadSchemaV1 = atsdTaskResultCommonSchemaV1.extend({\n\tstatus: z.literal(\"failed\"),\n\terrorType: atsdTaskResultErrorTypeSchema,\n\terrorCode: z.string().min(1).optional(),\n\terrorMessage: z.string().min(1).optional()\n});\nconst atsdTaskResultPayloadSchemaV1 = z.discriminatedUnion(\"status\", [\n\tatsdTaskResultSuccessPayloadSchemaV1,\n\tatsdTaskResultPartialSuccessPayloadSchemaV1,\n\tatsdTaskResultFailedPayloadSchemaV1\n]);\nconst atsdTaskResultEnvelopeWriteSchema = z.strictObject({\n\tv: z.literal(ATSD_TASK_RESULT_SCHEMA_VERSION),\n\tcode: z.literal(\"service.task_result\"),\n\tpayload: atsdTaskResultPayloadSchema\n});\nconst atsdTaskResultEnvelopeSchemaV3 = z.strictObject({\n\tv: z.literal(ATSD_TASK_RESULT_SCHEMA_VERSION_PREVIOUS),\n\tcode: z.literal(\"service.task_result\"),\n\tpayload: atsdTaskResultPayloadSchemaV3\n});\nconst atsdTaskResultEnvelopeSchemaV2 = z.strictObject({\n\tv: z.literal(ATSD_TASK_RESULT_SCHEMA_VERSION_LEGACY),\n\tcode: z.literal(\"service.task_result\"),\n\tpayload: atsdTaskResultPayloadSchemaV3\n});\nconst atsdTaskResultEnvelopeSchemaV1 = z.strictObject({\n\tv: z.literal(ATSD_TASK_RESULT_SCHEMA_VERSION_OLDEST),\n\tcode: z.literal(\"service.task_result\"),\n\tpayload: atsdTaskResultPayloadSchemaV1\n});\nconst atsdTaskResultEnvelopeSchema = z.union([\n\tatsdTaskResultEnvelopeWriteSchema,\n\tatsdTaskResultEnvelopeSchemaV2,\n\tatsdTaskResultEnvelopeSchemaV3,\n\tatsdTaskResultEnvelopeSchemaV1\n]);\n\n//#endregion\n//#region src/schemas/daemon/daemon-hub.ts\nconst DAEMON_HUB_SCHEMA_VERSION = 1;\nconst CURRENT_DAEMON_EXECUTION_CONTRACT_EPOCH = \"daemon-runtime-epoch-2026-05-runtime-coordinator-execution-token\";\nconst daemonRuntimeContractSchema = z.strictObject({ epoch: z.string().min(1) });\nconst daemonRuntimeContractReasonCodeSchema = z.enum([\n\t\"daemon.runtime_contract.compatible\",\n\t\"daemon.runtime_contract.missing\",\n\t\"daemon.runtime_contract.mismatch\"\n]);\nconst daemonExecutionCompatibilitySchema = z.strictObject({\n\tstatus: z.enum([\"compatible\", \"update_required\"]),\n\texpectedEpoch: z.string().min(1),\n\tobservedEpoch: z.union([z.string().min(1), z.null()]),\n\treasonCode: daemonRuntimeContractReasonCodeSchema\n});\nconst daemonHubErrorCodeSchema = z.enum([\n\t\"daemon.session.reject_conflict\",\n\t\"daemon.session.not_found\",\n\t\"daemon.session.connection_replaced\",\n\t\"daemon.session.stale_lease\",\n\t\"daemon.profile.offline\",\n\t\"daemon.runtime_contract.missing\",\n\t\"daemon.runtime_contract.mismatch\",\n\t\"daemon.delivery.timeout\",\n\t\"daemon.delivery.start_timeout\",\n\t\"daemon.delivery.execution_stalled\",\n\t\"daemon.delivery.finalization_timeout\",\n\t\"daemon.result.conflict\",\n\t\"daemon.result.identity_mismatch\",\n\t\"daemon.result.inbox_unavailable\",\n\t\"daemon.result.finalization_unavailable\",\n\t\"execution_token_authority_missing\",\n\t\"execution_token_expired\",\n\t\"execution_token_mismatch\",\n\t\"execution_token_missing\",\n\t\"execution_token_revoked\",\n\t\"execution_token_scope_mismatch\",\n\t\"execution_token_superseded\",\n\t\"execution_token_terminal_late\",\n\t\"execution_token_unknown\",\n\t\"runtime_coordinator.execution_id_missing\",\n\t\"runtime_coordinator.execution_id_mismatch\",\n\t\"runtime_coordinator.execution_token_authority_unavailable\",\n\t\"runtime_coordinator.execution_token_scope_mismatch\",\n\t\"runtime_coordinator.execution_token_unavailable\"\n]);\nconst daemonHubLeaseSchema = z.strictObject({\n\tprofileId: z.string().min(1),\n\tleaseEpoch: z.number().int().positive()\n});\nconst daemonHubCapabilitiesSchema = z.strictObject({ runtimeAdapters: z.array(daemonRuntimeAdapterCapabilitySnapshotSchema).min(1).optional() });\nconst daemonHubRegisterSessionRequestSchema = z.strictObject({\n\tv: z.literal(DAEMON_HUB_SCHEMA_VERSION),\n\townerUserId: z.string().min(1),\n\tdeviceId: z.string().min(1),\n\tlane: daemonServiceLaneSchema,\n\tdaemonSessionId: z.string().min(1),\n\tconnectionGeneration: z.number().int().positive(),\n\tprofileIds: z.array(z.string().min(1)).max(512),\n\tcapabilities: daemonHubCapabilitiesSchema,\n\truntimeContract: daemonRuntimeContractSchema.optional(),\n\tconnectedAtMs: z.number().int().nonnegative()\n});\nconst daemonHubRegisterSessionResponseSchema = z.strictObject({\n\tok: z.boolean(),\n\tconnectionGeneration: z.number().int().positive(),\n\tacceptedLeases: z.array(daemonHubLeaseSchema),\n\trejectedProfiles: z.array(z.strictObject({\n\t\tprofileId: z.string().min(1),\n\t\treasonCode: daemonHubErrorCodeSchema\n\t}))\n});\nconst daemonHubHeartbeatRequestSchema = z.strictObject({\n\tv: z.literal(DAEMON_HUB_SCHEMA_VERSION),\n\townerUserId: z.string().min(1),\n\tdeviceId: z.string().min(1),\n\tlane: daemonServiceLaneSchema,\n\tdaemonSessionId: z.string().min(1),\n\tleases: z.array(daemonHubLeaseSchema).max(512),\n\truntimeContract: daemonRuntimeContractSchema.optional(),\n\tsentAtMs: z.number().int().nonnegative()\n});\nconst daemonHubHeartbeatResponseSchema = z.strictObject({\n\tok: z.boolean(),\n\tserverNowMs: z.number().int().nonnegative(),\n\tstaleLeases: z.array(daemonHubLeaseSchema),\n\treasonCode: daemonHubErrorCodeSchema.optional()\n});\nconst daemonHubRouteCatalogChangedReasonSchema = z.string().trim().min(1).max(100);\nconst daemonHubRouteCatalogChangedFramePayloadSchema = z.strictObject({ reason: daemonHubRouteCatalogChangedReasonSchema });\nconst daemonHubNotifyRouteCatalogChangedRequestSchema = z.strictObject({\n\tv: z.literal(DAEMON_HUB_SCHEMA_VERSION),\n\townerUserId: z.string().min(1),\n\treason: daemonHubRouteCatalogChangedReasonSchema\n});\nconst daemonHubNotifyRouteCatalogChangedResponseSchema = z.strictObject({\n\tok: z.boolean(),\n\tnotifiedSessions: z.number().int().nonnegative()\n});\nconst daemonHubLookupOwnerServiceRequestSchema = z.strictObject({\n\tv: z.literal(DAEMON_HUB_SCHEMA_VERSION),\n\townerUserId: z.string().min(1)\n});\nconst daemonHubLiveSessionSchema = z.strictObject({\n\tdaemonSessionId: z.string().min(1),\n\tdeviceId: z.string().min(1),\n\tlane: daemonServiceLaneSchema,\n\tconnectionGeneration: z.number().int().positive(),\n\tlastHeartbeatMs: z.number().int().nonnegative(),\n\tcapabilities: daemonHubCapabilitiesSchema,\n\texecutionCompatibility: daemonExecutionCompatibilitySchema\n});\nconst daemonHubLookupOwnerServiceResponseSchema = z.discriminatedUnion(\"online\", [z.strictObject({\n\tonline: z.literal(true),\n\tsessions: z.array(daemonHubLiveSessionSchema).min(1)\n}), z.strictObject({\n\tonline: z.literal(false),\n\treasonCode: daemonHubErrorCodeSchema\n})]);\nconst daemonHubLookupRouteRequestSchema = z.strictObject({\n\tv: z.literal(DAEMON_HUB_SCHEMA_VERSION),\n\townerUserId: z.string().min(1),\n\tprofileId: z.string().min(1)\n});\nconst daemonHubLookupRouteResponseSchema = z.discriminatedUnion(\"online\", [z.strictObject({\n\tonline: z.literal(true),\n\tdaemonSessionId: z.string().min(1),\n\tdeviceId: z.string().min(1),\n\tlane: daemonServiceLaneSchema,\n\tconnectionGeneration: z.number().int().positive(),\n\tleaseEpoch: z.number().int().positive(),\n\tlastHeartbeatMs: z.number().int().nonnegative(),\n\tcapabilities: daemonHubCapabilitiesSchema,\n\texecutionCompatibility: daemonExecutionCompatibilitySchema\n}), z.strictObject({\n\tonline: z.literal(false),\n\treasonCode: daemonHubErrorCodeSchema,\n\texecutionCompatibility: daemonExecutionCompatibilitySchema.optional()\n})]);\nconst daemonHubDispatchSourceSignalSchema = z.strictObject({\n\tprofileId: z.string().min(1).nullable(),\n\tprofileKind: z.enum([\n\t\t\"agent\",\n\t\t\"human\",\n\t\t\"system\"\n\t]).nullable(),\n\tprofileHandle: profileHandleSchema.optional(),\n\tprofileMentionLabel: spaceMentionLabelSchema.optional(),\n\ttext: z.string().min(1).max(MAX_TEXT_LENGTH)\n});\nconst daemonHubDeliverDispatchPayloadSchema = z.strictObject({\n\truntimeCoordinatorExecutionId: runtimeCoordinatorExecutionRecordSchema.shape.runtimeCoordinatorExecutionId,\n\texecutionToken: runtimeCoordinatorExecutionTokenEnvelopeSchema.optional(),\n\tattemptId: z.string().min(1),\n\tdispatchId: z.string().min(1),\n\texecutionIdentity: daemonHubDeliveryExecutionIdentitySchema,\n\ttaskId: z.string().min(1),\n\tspaceId: z.string().min(1),\n\tsourceEventId: z.string().min(1),\n\tsourceClientMessageId: z.string().min(1).max(200).nullable().optional(),\n\tsourceSignal: daemonHubDispatchSourceSignalSchema,\n\ttargetProfileId: z.string().min(1),\n\tdispatchContractVersion: z.number().int().positive(),\n\tdispatchPolicy: runtimeDispatchPolicySchema,\n\tcontrollerSnapshot: atsdDispatchControllerSnapshotSchema,\n\tcontextIdMappingSpec: runtimeAgentContextIdMappingSpecSchema.nullable(),\n\tdispatchRulesSnapshot: atsdDispatchRulesSnapshotSchema,\n\tspaceContractSnapshot: spaceContractSchema.optional(),\n\tcontinuitySnapshot: atsdDispatchContinuitySnapshotSchema.optional(),\n\tenqueuedAtMs: z.number().int().nonnegative(),\n\tidempotencyKey: z.string().min(1),\n\tspacePassword: spacePasswordSchema.optional(),\n\ttargetProfileName: z.string().min(1).max(MAX_PROFILE_NAME_LENGTH).optional(),\n\ttargetProfileMentionLabel: spaceMentionLabelSchema.optional(),\n\tconversationBinding: conversationBindingRecordSchema.optional(),\n\tdeliveryRecoveryReason: atsdDispatchDeliveryRecoveryReasonSchema.optional(),\n\tdispatchChainId: z.string().min(1).optional(),\n\tautoRelayDepth: z.number().int().nonnegative().optional(),\n\tvisitedProfileIds: z.array(z.string().min(1)).max(256).optional(),\n\tvisitedProfileIdsHash: z.string().min(1).optional(),\n\ttransportMode: runtimeTransportModeSchema.nullable().optional(),\n\tstreamingMode: runtimeStreamingModeSchema.optional(),\n\tsourceSignalSnapshot: atsdDispatchSourceSignalSnapshotSchema.optional(),\n\tsourceMessageEnvelope: messageEnvelopeSchema.optional(),\n\treplyToSnapshot: atsdDispatchReplyToSnapshotSchema.optional(),\n\tthreadContext: spaceThreadContextSchema.optional(),\n\tspaceNameSnapshot: z.string().min(1).nullable().optional()\n});\nconst daemonHubDeliverDispatchRequestSchema = z.strictObject({\n\tv: z.literal(DAEMON_HUB_SCHEMA_VERSION),\n\tdispatchId: z.string().min(1),\n\tattemptId: z.string().min(1),\n\townerUserId: z.string().min(1),\n\tprofileId: z.string().min(1),\n\tdaemonSessionId: z.string().min(1),\n\tconnectionGeneration: z.number().int().positive(),\n\tleaseEpoch: z.number().int().positive(),\n\tdeliveryRecoveryReason: atsdDispatchDeliveryRecoveryReasonSchema.optional(),\n\tpayload: daemonHubDeliverDispatchPayloadSchema\n});\nconst daemonHubDeliverDispatchResponseSchema = z.discriminatedUnion(\"status\", [\n\tz.strictObject({\n\t\taccepted: z.literal(true),\n\t\tstatus: z.literal(\"delivered\")\n\t}),\n\tz.strictObject({\n\t\taccepted: z.literal(true),\n\t\tstatus: z.literal(\"already_pending\"),\n\t\texistingAttemptId: z.string().min(1)\n\t}),\n\tz.strictObject({\n\t\taccepted: z.literal(true),\n\t\tstatus: z.literal(\"already_completed\"),\n\t\tcompletedAttemptId: z.string().min(1)\n\t}),\n\tz.strictObject({\n\t\taccepted: z.literal(false),\n\t\tstatus: z.literal(\"rejected\"),\n\t\treasonCode: daemonHubErrorCodeSchema\n\t})\n]);\nconst daemonHubWaitDispatchResultRequestSchema = z.strictObject({\n\tdispatchId: z.string().min(1),\n\tattemptId: z.string().min(1),\n\tdaemonSessionId: z.string().min(1),\n\tconnectionGeneration: z.number().int().positive(),\n\tleaseEpoch: z.number().int().positive(),\n\ttimeoutMs: z.number().int().positive().optional()\n});\nconst runtimeCoordinatorDecisionReasonCodeSchema = z.string().trim().min(1).max(160);\nconst daemonHubRuntimeCoordinatorDecisionEventKindSchema = z.enum([\n\t\"owner_conflict\",\n\t\"reclaim\",\n\t\"retry\",\n\t\"timeout\"\n]);\nconst daemonHubRuntimeCoordinatorDecisionTriggerSchema = z.enum([\n\t\"alarm\",\n\t\"daemon\",\n\t\"queue\"\n]);\nconst daemonHubRuntimeCoordinatorDecisionRequestSchema = z.strictObject({\n\tv: z.literal(DAEMON_HUB_SCHEMA_VERSION),\n\truntimeCoordinatorExecutionId: runtimeCoordinatorExecutionRecordSchema.shape.runtimeCoordinatorExecutionId,\n\tdispatchId: z.string().min(1),\n\tspaceId: z.string().min(1),\n\ttargetProfileId: z.string().min(1),\n\tsourceClientMessageId: z.string().min(1).max(200).nullable().optional(),\n\tattemptId: z.string().min(1).nullable().optional(),\n\tclaimDecision: z.enum([\n\t\t\"continue_existing\",\n\t\t\"reset_existing\",\n\t\t\"claim_recovery\",\n\t\t\"claim_existing_inside_window\",\n\t\t\"reclaim_stale_dispatching\",\n\t\t\"reclaim_stale_queued\"\n\t]).optional(),\n\teventKind: daemonHubRuntimeCoordinatorDecisionEventKindSchema,\n\tidempotencyKey: z.string().min(1).max(512),\n\tobservedRunId: z.string().min(1).nullable().optional(),\n\treasonCode: runtimeCoordinatorDecisionReasonCodeSchema.optional(),\n\ttrigger: daemonHubRuntimeCoordinatorDecisionTriggerSchema\n});\nconst daemonHubRuntimeCoordinatorDecisionResponseSchema = z.discriminatedUnion(\"status\", [z.strictObject({\n\tok: z.literal(true),\n\tstatus: z.enum([\"already_recorded\", \"recorded\"]),\n\taction: z.enum([\n\t\t\"diagnostic_only\",\n\t\t\"keep_waiting\",\n\t\t\"owner_conflict_terminal\",\n\t\t\"redeliver_current_run\",\n\t\t\"redelivery_deferred\",\n\t\t\"reclaim_blocked\",\n\t\t\"retry_blocked\",\n\t\t\"retry_run_issued\",\n\t\t\"terminal_failed\",\n\t\t\"timeout_terminal\"\n\t]),\n\treasonCode: runtimeCoordinatorDecisionReasonCodeSchema,\n\truntimeCoordinatorExecutionId: runtimeCoordinatorExecutionRecordSchema.shape.runtimeCoordinatorExecutionId\n}), z.strictObject({\n\tok: z.literal(false),\n\tstatus: z.literal(\"retry_later\"),\n\treasonCode: runtimeCoordinatorDecisionReasonCodeSchema,\n\truntimeCoordinatorExecutionId: runtimeCoordinatorExecutionRecordSchema.shape.runtimeCoordinatorExecutionId\n})]);\nconst daemonHubRuntimeCoordinatorHeadAcceptActionSchema = z.enum([\"create_execution\", \"skip_duplicate\"]);\nconst daemonHubRuntimeCoordinatorHeadAcceptRequestSchema = z.strictObject({\n\tv: z.literal(DAEMON_HUB_SCHEMA_VERSION),\n\townerUserId: z.string().min(1),\n\tdispatchId: z.string().min(1),\n\tidempotencyKey: z.string().min(1).max(512),\n\ttargetProfileMentionLabel: spaceMentionLabelSchema.optional(),\n\ttargetProfileName: z.string().min(1).max(MAX_PROFILE_NAME_LENGTH).optional(),\n\ttargetWakeLifecycleIdentity: targetWakeLifecycleIdentitySchema\n});\nconst daemonHubRuntimeCoordinatorHeadAcceptResponseSchema = z.discriminatedUnion(\"status\", [z.strictObject({\n\taction: daemonHubRuntimeCoordinatorHeadAcceptActionSchema,\n\tok: z.literal(true),\n\tprimaryDispatchId: z.string().min(1),\n\treasonCode: z.string().min(1).max(160),\n\truntimeCoordinatorExecutionId: runtimeCoordinatorExecutionRecordSchema.shape.runtimeCoordinatorExecutionId.nullable(),\n\tstatus: z.enum([\n\t\t\"accepted\",\n\t\t\"already_accepted\",\n\t\t\"execution_linked\",\n\t\t\"publication_intent_ready\"\n\t]),\n\ttargetWakeLifecycleId: z.string().min(1).max(2048)\n}), z.strictObject({\n\tok: z.literal(false),\n\tprimaryDispatchId: z.string().min(1).nullable(),\n\treasonCode: z.string().min(1).max(160),\n\tstatus: z.enum([\"conflict\", \"retry_later\"]),\n\ttargetWakeLifecycleId: z.string().min(1).max(2048)\n})]);\nconst daemonHubRuntimeCoordinatorHeadLifecycleStatusSchema = z.enum([\n\t\"accepted\",\n\t\"execution_linked\",\n\t\"publication_intent_ready\",\n\t\"waiting\"\n]);\nconst daemonHubRuntimeCoordinatorHeadNoExecutionReasonCodeSchema = z.enum([\n\t\"agent_profile_binding.missing\",\n\t\"agent_profile_binding.disabled\",\n\t\"agent_profile_binding.owner_mismatch\",\n\t\"local_service.identity_mismatch\",\n\t\"daemon.profile.offline\",\n\t\"service.update_required\"\n]);\nconst daemonHubRuntimeCoordinatorHeadNoExecutionPublicationCategorySchema = z.enum([\n\t\"binding_required\",\n\t\"local_connection_mismatch\",\n\t\"service_not_connected\",\n\t\"update_required\"\n]);\nconst daemonHubRuntimeCoordinatorHeadNoExecutionRecoveryActionSchema = z.enum([\n\t\"set_up_agent_binding\",\n\t\"enable_agent_binding\",\n\t\"repair_agent_binding\",\n\t\"reconnect_agent_binding\",\n\t\"start_or_restart_ats_service\",\n\t\"update_ats_service\"\n]);\nconst daemonHubRuntimeCoordinatorHeadNoExecutionDecisionSourceSchema = z.enum([\n\t\"dispatch_preflight\",\n\t\"dispatch_delivery_pre_execution\",\n\t\"runtime_coordinator_head_waiting_deadline\"\n]);\nconst daemonHubRuntimeCoordinatorHeadNoExecutionRequestSchema = z.strictObject({\n\tv: z.literal(DAEMON_HUB_SCHEMA_VERSION),\n\townerUserId: z.string().min(1),\n\tdispatchId: z.string().min(1),\n\tidempotencyKey: z.string().min(1).max(512),\n\tdecisionSource: daemonHubRuntimeCoordinatorHeadNoExecutionDecisionSourceSchema.optional(),\n\treasonCode: daemonHubRuntimeCoordinatorHeadNoExecutionReasonCodeSchema,\n\tpublicationCategory: daemonHubRuntimeCoordinatorHeadNoExecutionPublicationCategorySchema,\n\tuserRecoveryAction: daemonHubRuntimeCoordinatorHeadNoExecutionRecoveryActionSchema,\n\ttargetWakeLifecycleIdentity: targetWakeLifecycleIdentitySchema\n});\nconst daemonHubRuntimeCoordinatorHeadNoExecutionResponseSchema = z.discriminatedUnion(\"status\", [z.strictObject({\n\tok: z.literal(true),\n\tprimaryDispatchId: z.string().min(1),\n\tpublicationIntentId: z.string().min(1).max(4096),\n\treasonCode: daemonHubRuntimeCoordinatorHeadNoExecutionReasonCodeSchema,\n\truntimeCoordinatorExecutionId: z.null(),\n\tstatus: z.enum([\"publication_intent_ready\", \"already_recorded\"]),\n\ttargetWakeLifecycleId: z.string().min(1).max(2048)\n}), z.strictObject({\n\tok: z.literal(false),\n\tprimaryDispatchId: z.string().min(1).nullable(),\n\tpublicationIntentId: z.string().min(1).max(4096).nullable(),\n\treasonCode: z.string().min(1).max(160),\n\truntimeCoordinatorExecutionId: z.null(),\n\tstatus: z.enum([\"conflict\", \"retry_later\"]),\n\ttargetWakeLifecycleId: z.string().min(1).max(2048)\n})]);\nconst daemonHubRuntimeCoordinatorHeadWaitingReasonCodeSchema = z.enum([\"daemon.profile.offline\"]);\nconst daemonHubRuntimeCoordinatorHeadWaitingCategorySchema = z.enum([\"service_not_connected\"]);\nconst daemonHubRuntimeCoordinatorHeadWaitingRecoveryActionSchema = z.enum([\"start_or_restart_ats_service\"]);\nconst daemonHubRuntimeCoordinatorHeadWaitingBoundarySchema = z.strictObject({\n\tdeadlineAtMs: z.number().int().nonnegative(),\n\tdeadlineOutcome: z.literal(\"publication_intent_ready\"),\n\tobservedAtMs: z.number().int().nonnegative(),\n\treasonCode: daemonHubRuntimeCoordinatorHeadWaitingReasonCodeSchema,\n\tsoftDeadlineAtMs: z.number().int().nonnegative(),\n\ttrigger: z.literal(\"ats_service_route_connected\"),\n\ttriggerOwner: z.literal(\"runtime_coordinator\"),\n\tuserRecoveryAction: daemonHubRuntimeCoordinatorHeadWaitingRecoveryActionSchema,\n\tuserVisibleState: z.literal(\"waiting_for_ats_service\"),\n\twaitingCategory: daemonHubRuntimeCoordinatorHeadWaitingCategorySchema,\n\twaitingFor: z.literal(\"ats_service_route_connection\"),\n\twaitingSinceMs: z.number().int().nonnegative()\n});\nconst daemonHubRuntimeCoordinatorHeadWaitingRequestSchema = z.strictObject({\n\tv: z.literal(DAEMON_HUB_SCHEMA_VERSION),\n\townerUserId: z.string().min(1),\n\tdispatchId: z.string().min(1),\n\tidempotencyKey: z.string().min(1).max(512),\n\tobservedAtMs: z.number().int().nonnegative(),\n\treasonCode: daemonHubRuntimeCoordinatorHeadWaitingReasonCodeSchema,\n\ttargetWakeLifecycleIdentity: targetWakeLifecycleIdentitySchema,\n\tuserRecoveryAction: daemonHubRuntimeCoordinatorHeadWaitingRecoveryActionSchema,\n\twaitingCategory: daemonHubRuntimeCoordinatorHeadWaitingCategorySchema\n});\nconst daemonHubRuntimeCoordinatorHeadWaitingResponseSchema = z.discriminatedUnion(\"status\", [\n\tz.strictObject({\n\t\tdeadlineAtMs: z.number().int().nonnegative(),\n\t\tnextTriggerAtMs: z.number().int().nonnegative(),\n\t\tok: z.literal(true),\n\t\tprimaryDispatchId: z.string().min(1),\n\t\treasonCode: daemonHubRuntimeCoordinatorHeadWaitingReasonCodeSchema,\n\t\truntimeCoordinatorExecutionId: z.null(),\n\t\tsoftDeadlineAtMs: z.number().int().nonnegative(),\n\t\tstatus: z.literal(\"waiting\"),\n\t\ttargetWakeLifecycleId: z.string().min(1).max(2048),\n\t\tuserRecoveryAction: daemonHubRuntimeCoordinatorHeadWaitingRecoveryActionSchema,\n\t\twaitingCategory: daemonHubRuntimeCoordinatorHeadWaitingCategorySchema\n\t}),\n\tz.strictObject({\n\t\tok: z.literal(true),\n\t\tprimaryDispatchId: z.string().min(1),\n\t\tpublicationIntentId: z.string().min(1).max(4096),\n\t\treasonCode: daemonHubRuntimeCoordinatorHeadNoExecutionReasonCodeSchema,\n\t\truntimeCoordinatorExecutionId: z.null(),\n\t\tstatus: z.literal(\"publication_intent_ready\"),\n\t\ttargetWakeLifecycleId: z.string().min(1).max(2048)\n\t}),\n\tz.strictObject({\n\t\tok: z.literal(false),\n\t\tprimaryDispatchId: z.string().min(1).nullable(),\n\t\treasonCode: z.string().min(1).max(160),\n\t\truntimeCoordinatorExecutionId: z.null(),\n\t\tstatus: z.enum([\"conflict\", \"retry_later\"]),\n\t\ttargetWakeLifecycleId: z.string().min(1).max(2048)\n\t})\n]);\nconst daemonHubRuntimeCoordinatorHeadNoExecutionDecisionTraceSchema = z.strictObject({\n\tdecidedAtMs: z.int().min(0),\n\tpublicationCategory: daemonHubRuntimeCoordinatorHeadNoExecutionPublicationCategorySchema,\n\treasonCode: daemonHubRuntimeCoordinatorHeadNoExecutionReasonCodeSchema,\n\tsource: daemonHubRuntimeCoordinatorHeadNoExecutionDecisionSourceSchema,\n\tuserRecoveryAction: daemonHubRuntimeCoordinatorHeadNoExecutionRecoveryActionSchema\n});\nconst daemonHubRuntimeCoordinatorHeadPublicationIntentTraceSchema = z.strictObject({\n\tintentId: z.string().min(1).max(4096),\n\tkind: z.literal(\"no_execution_failure\"),\n\tpublicationCategory: daemonHubRuntimeCoordinatorHeadNoExecutionPublicationCategorySchema,\n\treadyAtMs: z.int().min(0),\n\treasonCode: daemonHubRuntimeCoordinatorHeadNoExecutionReasonCodeSchema,\n\tstatus: z.literal(\"ready_for_phase_6\"),\n\tuserRecoveryAction: daemonHubRuntimeCoordinatorHeadNoExecutionRecoveryActionSchema\n});\nconst daemonHubRuntimeCoordinatorHeadPublicationOutcomeTraceSchema = z.strictObject({\n\tfailurePublicationCommandId: z.string().min(1).max(4096),\n\tfinalMessageKind: z.enum([\n\t\t\"failure_notice\",\n\t\t\"status\",\n\t\t\"success_reply\",\n\t\t\"unknown\"\n\t]).nullable(),\n\tobservedAtMs: z.int().min(0),\n\tpublicationErrorCode: z.string().min(1).max(160).nullable(),\n\tpublishedSignalId: z.string().min(1).nullable(),\n\tstatus: z.enum([\n\t\t\"failure_published\",\n\t\t\"already_final\",\n\t\t\"failure_publication_failed\"\n\t])\n});\nconst daemonHubRuntimeCoordinatorHeadPublicationExhaustionTraceSchema = z.strictObject({\n\tattemptCount: z.int().positive(),\n\texhaustedAtMs: z.int().min(0),\n\tlastFailureAtMs: z.int().min(0),\n\tlastReasonCode: z.string().min(1).max(160),\n\treasonCode: z.literal(\"runtime_coordinator.publication_retry_exhausted\"),\n\tstatus: z.literal(\"publication_exhausted\")\n});\nconst daemonHubRuntimeCoordinatorHeadTargetDisplayTraceSchema = z.strictObject({\n\ttargetProfileMentionLabel: spaceMentionLabelSchema.nullable(),\n\ttargetProfileName: z.string().min(1).max(MAX_PROFILE_NAME_LENGTH).nullable()\n});\nconst daemonHubRuntimeCoordinatorHeadLifecycleTraceRecordSchema = z.strictObject({\n\tcreatedAtMs: z.int().min(0),\n\tduplicateDispatchCount: z.int().min(0),\n\texecutionLinkedAtMs: z.int().min(0).nullable(),\n\tmodelVersion: z.literal(\"ats.runtime_coordinator.head_lifecycle.v1\"),\n\tnoExecutionDecision: z.union([daemonHubRuntimeCoordinatorHeadNoExecutionDecisionTraceSchema, z.null()]),\n\townerUserId: z.string().min(1),\n\tprimaryDispatchId: z.string().min(1),\n\tpublicationIntent: z.union([daemonHubRuntimeCoordinatorHeadPublicationIntentTraceSchema, z.null()]),\n\tpublicationExhaustion: daemonHubRuntimeCoordinatorHeadPublicationExhaustionTraceSchema.optional(),\n\tpublicationOutcome: daemonHubRuntimeCoordinatorHeadPublicationOutcomeTraceSchema.optional(),\n\truntimeCoordinatorExecutionId: runtimeCoordinatorExecutionRecordSchema.shape.runtimeCoordinatorExecutionId.nullable(),\n\tstatus: daemonHubRuntimeCoordinatorHeadLifecycleStatusSchema,\n\ttargetWakeLifecycleIdentity: targetWakeLifecycleIdentitySchema,\n\ttargetWakeLifecycleId: z.string().min(1).max(2048),\n\ttargetDisplay: daemonHubRuntimeCoordinatorHeadTargetDisplayTraceSchema.optional(),\n\tupdatedAtMs: z.int().min(0),\n\twaitingBoundary: z.union([daemonHubRuntimeCoordinatorHeadWaitingBoundarySchema, z.null()])\n});\nconst daemonHubRuntimeCoordinatorHeadLifecycleTraceRequestSchema = z.strictObject({\n\tv: z.literal(DAEMON_HUB_SCHEMA_VERSION),\n\ttargetWakeLifecycleIdentity: targetWakeLifecycleIdentitySchema\n});\nconst daemonHubRuntimeCoordinatorHeadLifecycleTraceResponseSchema = z.discriminatedUnion(\"readStatus\", [\n\tz.strictObject({\n\t\tlifecycle: daemonHubRuntimeCoordinatorHeadLifecycleTraceRecordSchema,\n\t\tok: z.literal(true),\n\t\treadStatus: z.literal(\"found\")\n\t}),\n\tz.strictObject({\n\t\tok: z.literal(true),\n\t\treadStatus: z.literal(\"missing\"),\n\t\treasonCode: z.literal(\"runtime_coordinator.head_lifecycle_not_found\"),\n\t\ttargetWakeLifecycleId: z.string().min(1).max(2048)\n\t}),\n\tz.strictObject({\n\t\tok: z.literal(false),\n\t\treadStatus: z.literal(\"authority_unavailable\"),\n\t\treasonCode: z.string().min(1).max(160),\n\t\ttargetWakeLifecycleId: z.string().min(1).max(2048)\n\t})\n]);\nconst daemonHubPreExecutionHandoffReasonCodeSchema = z.enum([\"daemon.profile.offline\"]);\nconst daemonHubPreExecutionHandoffRequestSchema = z.strictObject({\n\tv: z.literal(DAEMON_HUB_SCHEMA_VERSION),\n\tattemptId: z.string().min(1).nullable().optional(),\n\tautoRelayDepth: z.number().int().nonnegative().optional(),\n\tdispatchChainId: z.string().min(1).nullable().optional(),\n\tdispatchId: z.string().min(1),\n\tfirstSeenAtMs: z.number().int().nonnegative(),\n\tidempotencyKey: z.string().min(1).max(512),\n\tobservedAtMs: z.number().int().nonnegative(),\n\treasonCode: daemonHubPreExecutionHandoffReasonCodeSchema,\n\tsourceClientMessageId: z.string().min(1).max(200).nullable().optional(),\n\tsourceEventId: z.string().min(1),\n\tspaceId: z.string().min(1),\n\tspacePassword: spacePasswordSchema.optional(),\n\ttargetProfileId: z.string().min(1),\n\ttargetProfileMentionLabel: spaceMentionLabelSchema.optional(),\n\ttargetProfileName: z.string().min(1).max(MAX_PROFILE_NAME_LENGTH).optional(),\n\ttaskId: z.string().min(1),\n\tthreadContext: spaceThreadContextSchema.optional(),\n\tvisitedProfileIds: z.array(z.string().min(1)).max(256).optional(),\n\tvisitedProfileIdsHash: z.string().min(1).nullable().optional()\n});\nconst daemonHubPreExecutionHandoffResponseSchema = z.discriminatedUnion(\"status\", [\n\tz.strictObject({\n\t\tdeadlineAtMs: z.number().int().nonnegative(),\n\t\tnextAlarmAtMs: z.number().int().nonnegative(),\n\t\tok: z.literal(true),\n\t\treasonCode: daemonHubPreExecutionHandoffReasonCodeSchema,\n\t\tstatus: z.literal(\"waiting_for_recovery\")\n\t}),\n\tz.strictObject({\n\t\tdeadlineAtMs: z.number().int().nonnegative(),\n\t\tok: z.literal(true),\n\t\tpublishedSignalId: z.string().min(1),\n\t\treasonCode: daemonHubPreExecutionHandoffReasonCodeSchema,\n\t\tresultRef: z.string().min(1),\n\t\tstatus: z.literal(\"failure_published\")\n\t}),\n\tz.strictObject({\n\t\tdeadlineAtMs: z.number().int().nonnegative(),\n\t\tnextPublicationRetryAtMs: z.number().int().nonnegative(),\n\t\tok: z.literal(true),\n\t\tpublicationErrorCode: z.string().min(1),\n\t\treasonCode: daemonHubPreExecutionHandoffReasonCodeSchema,\n\t\tresultRef: z.string().min(1),\n\t\tstatus: z.literal(\"failure_publication_retry_scheduled\")\n\t}),\n\tz.strictObject({\n\t\tdeadlineAtMs: z.number().int().nonnegative(),\n\t\tok: z.literal(true),\n\t\treasonCode: daemonHubPreExecutionHandoffReasonCodeSchema,\n\t\tstatus: z.literal(\"handoff_recovered\")\n\t}),\n\tz.strictObject({\n\t\tdeadlineAtMs: z.number().int().nonnegative(),\n\t\tok: z.literal(true),\n\t\treasonCode: daemonHubPreExecutionHandoffReasonCodeSchema,\n\t\tstatus: z.literal(\"legacy_evidence_only\")\n\t}),\n\tz.strictObject({\n\t\tok: z.literal(false),\n\t\treasonCode: z.string().min(1),\n\t\tstatus: z.literal(\"retry_later\")\n\t})\n]);\nconst daemonHubDispatchLifecyclePhaseSchema = z.enum([\n\t\"accepted_local\",\n\t\"running\",\n\t\"completed_local\"\n]);\nconst daemonHubDispatchLocalQueueWaitReasonSchema = z.enum([\n\t\"global_concurrency\",\n\t\"none\",\n\t\"profile_concurrency\"\n]);\nconst daemonHubDispatchLocalQueueDiagnosticsSchema = z.strictObject({\n\tactiveForProfile: z.number().int().nonnegative(),\n\tactiveGlobal: z.number().int().nonnegative(),\n\tglobalConcurrency: z.number().int().positive(),\n\tqueueDepth: z.number().int().nonnegative(),\n\tqueueMax: z.number().int().positive(),\n\tqueuePosition: z.union([z.number().int().positive(), z.null()]),\n\tstatus: z.enum([\"queued\", \"starting_runtime\"]),\n\twaitReason: daemonHubDispatchLocalQueueWaitReasonSchema\n});\nconst daemonHubDispatchLifecycleRequestSchema = z.strictObject({\n\tv: z.literal(DAEMON_HUB_SCHEMA_VERSION),\n\truntimeCoordinatorExecutionId: runtimeCoordinatorExecutionRecordSchema.shape.runtimeCoordinatorExecutionId.optional(),\n\texecutionTokenEcho: runtimeCoordinatorExecutionTokenEchoSchema.optional(),\n\tdispatchId: z.string().min(1),\n\tattemptId: z.string().min(1),\n\tdaemonSessionId: z.string().min(1),\n\tconnectionGeneration: z.number().int().positive(),\n\tleaseEpoch: z.number().int().positive(),\n\tphase: daemonHubDispatchLifecyclePhaseSchema,\n\tlifecycleAtMs: z.number().int().nonnegative(),\n\tlocalQueue: daemonHubDispatchLocalQueueDiagnosticsSchema.optional()\n});\nconst daemonHubDispatchRuntimeEvidencePhaseSchema = z.enum([\n\t\"received\",\n\t\"claimed\",\n\t\"runtime_started\",\n\t\"first_output\",\n\t\"completed\",\n\t\"failed\"\n]);\nconst daemonHubDispatchRuntimeEvidenceRequestSchema = z.strictObject({\n\tv: z.literal(DAEMON_HUB_SCHEMA_VERSION),\n\truntimeCoordinatorExecutionId: runtimeCoordinatorExecutionRecordSchema.shape.runtimeCoordinatorExecutionId.optional(),\n\texecutionTokenEcho: runtimeCoordinatorExecutionTokenEchoSchema.optional(),\n\tdispatchId: z.string().min(1),\n\tattemptId: z.string().min(1),\n\texecutionIdentityEcho: daemonHubRuntimeEvidenceIdentityEchoSchema,\n\tdaemonSessionId: z.string().min(1),\n\tconnectionGeneration: z.number().int().positive(),\n\tleaseEpoch: z.number().int().positive(),\n\tphase: daemonHubDispatchRuntimeEvidencePhaseSchema,\n\tevidenceAtMs: z.number().int().nonnegative(),\n\ttaskId: z.string().min(1),\n\tspaceId: z.string().min(1),\n\tsourceSignalId: z.string().min(1),\n\tsourceClientMessageId: z.string().min(1).max(200).nullable().optional(),\n\ttargetProfileId: z.string().min(1),\n\tclaimLeaseId: z.string().min(1).optional(),\n\tdurationMs: z.number().finite().nonnegative().optional(),\n\treasonCode: z.string().trim().min(1).max(160).optional(),\n\terrorName: z.string().trim().min(1).max(160).optional()\n});\nconst nullableLifecyclePhaseTimestampSchema = z.union([z.number().int().nonnegative(), z.null()]);\nconst daemonHubDispatchLifecycleSnapshotSchema = z.strictObject({\n\tphase: z.enum([\n\t\t\"starting\",\n\t\t\"accepted_local\",\n\t\t\"running\",\n\t\t\"completed_local\",\n\t\t\"result_received\"\n\t]),\n\tcreatedAtMs: z.number().int().nonnegative(),\n\tacceptedLocalAtMs: nullableLifecyclePhaseTimestampSchema,\n\trunningAtMs: nullableLifecyclePhaseTimestampSchema,\n\tcompletedLocalAtMs: nullableLifecyclePhaseTimestampSchema,\n\tlastLifecycleAtMs: z.number().int().nonnegative()\n});\nconst daemonHubWaitDispatchResultResponseSchema = z.discriminatedUnion(\"state\", [\n\tz.strictObject({\n\t\tstate: z.literal(\"completed\"),\n\t\tlifecycle: daemonHubDispatchLifecycleSnapshotSchema.optional(),\n\t\ttaskResult: atsdTaskResultEnvelopeSchema\n\t}),\n\tz.strictObject({\n\t\tstate: z.literal(\"pending\"),\n\t\tlifecycle: daemonHubDispatchLifecycleSnapshotSchema\n\t}),\n\tz.strictObject({\n\t\tstate: z.literal(\"failed\"),\n\t\tlifecycle: daemonHubDispatchLifecycleSnapshotSchema.optional(),\n\t\treasonCode: daemonHubErrorCodeSchema\n\t})\n]);\nconst daemonHubSubmitTaskResultRequestSchema = z.strictObject({\n\tv: z.literal(DAEMON_HUB_SCHEMA_VERSION),\n\truntimeCoordinatorExecutionId: runtimeCoordinatorExecutionRecordSchema.shape.runtimeCoordinatorExecutionId.optional(),\n\texecutionTokenEcho: runtimeCoordinatorExecutionTokenEchoSchema.optional(),\n\tdispatchId: z.string().min(1),\n\tattemptId: z.string().min(1).optional(),\n\texecutionIdentityEcho: daemonHubResultIdentityEchoSchema,\n\tdaemonSessionId: z.string().min(1),\n\tconnectionGeneration: z.number().int().positive(),\n\tleaseEpoch: z.number().int().positive(),\n\ttaskResult: atsdTaskResultEnvelopeSchema\n});\nconst daemonHubSubmitTaskResultResponseSchema = z.discriminatedUnion(\"status\", [\n\tz.strictObject({\n\t\tok: z.literal(true),\n\t\tstatus: z.literal(\"accepted\")\n\t}),\n\tz.strictObject({\n\t\tok: z.literal(false),\n\t\tstatus: z.literal(\"retry_later\"),\n\t\treasonCode: daemonHubErrorCodeSchema\n\t}),\n\tz.strictObject({\n\t\tok: z.literal(false),\n\t\tstatus: z.literal(\"rejected_terminal\"),\n\t\treasonCode: daemonHubErrorCodeSchema\n\t})\n]);\nconst daemonHubDispatchPreviewRequestSchema = z.strictObject({\n\tv: z.literal(DAEMON_HUB_SCHEMA_VERSION),\n\tdispatchId: z.string().min(1),\n\tattemptId: z.string().min(1),\n\tdaemonSessionId: z.string().min(1),\n\tconnectionGeneration: z.number().int().positive(),\n\tleaseEpoch: z.number().int().positive(),\n\tpreviewText: z.string().min(1).max(MAX_TEXT_LENGTH)\n});\nconst daemonHubDispatchPreviewEndRequestSchema = z.strictObject({\n\tv: z.literal(DAEMON_HUB_SCHEMA_VERSION),\n\tdispatchId: z.string().min(1),\n\tattemptId: z.string().min(1),\n\tdaemonSessionId: z.string().min(1),\n\tconnectionGeneration: z.number().int().positive(),\n\tleaseEpoch: z.number().int().positive(),\n\ttargetProfileName: z.string().min(1).max(MAX_PROFILE_NAME_LENGTH).optional()\n});\nconst daemonStreamCodeSchema = z.enum([\n\t\"daemon.session.register\",\n\t\"daemon.session.heartbeat\",\n\t\"daemon.dispatch.deliver\",\n\t\"daemon.dispatch.lifecycle\",\n\t\"daemon.dispatch.runtime_evidence\",\n\t\"daemon.dispatch.preview\",\n\t\"daemon.dispatch.preview_end\",\n\t\"daemon.dispatch.accepted\",\n\t\"daemon.dispatch.result\",\n\t\"daemon.route_catalog.changed\",\n\t\"daemon.error\"\n]);\nconst daemonStreamFrameSchema = z.strictObject({\n\tv: z.literal(DAEMON_HUB_SCHEMA_VERSION),\n\tcode: daemonStreamCodeSchema,\n\tpayload: z.record(z.string(), z.unknown())\n});\nconst daemonStreamErrorFrameCodeSchema = daemonHubErrorCodeSchema.or(z.union([z.literal(\"schema.invalid\"), z.literal(\"schema.invalid.runtime_response\")]));\nconst daemonStreamErrorFrameSchema = z.strictObject({\n\tv: z.literal(DAEMON_HUB_SCHEMA_VERSION),\n\tcode: z.literal(\"daemon.error\"),\n\tpayload: z.strictObject({\n\t\tcode: daemonStreamErrorFrameCodeSchema,\n\t\tmessage: z.string().min(1)\n\t})\n});\n\n//#endregion\nexport { daemonHubRuntimeCoordinatorHeadWaitingRequestSchema as $, MAX_PROFILE_HANDLE_LENGTH as $i, DISPATCH_ACTIVITY_FAILED_PURPOSE as $n, spaceThreadSchema as $r, RUNTIME_COORDINATOR_EXECUTION_TOKEN_REDACTION_MARKER as $t, daemonHubRegisterSessionResponseSchema as A, isSpaceMessageAddressingRelationSupportedForTargetKind as Ai, runtimeExecutionAuthorityRuntimeIdSchema as An, localRuntimeContextExecutionSchema as Ar, atsSpacePostMessageActionSchema as At, daemonHubRuntimeCoordinatorHeadLifecycleStatusSchema as B, spaceMessageAddressingTargetKindSchema as Bi, parseAtsdDispatchQueueIngress as Bn, runtimeAgentControllerLaunchCandidateSchema as Br, RUNTIME_COORDINATOR_CREATION_DIAGNOSTIC_MODEL_VERSION as Bt, daemonHubLookupRouteResponseSchema as C, BUILTIN_UPSTREAM_CONVERSATION_REF_KIND_BY_PROVIDER as Ca, SPACE_MESSAGE_ADDRESSING_TARGET_FIELD_VALUES as Ci, providerRuntimeStreamingCapabilitySchema as Cn, conversationBindingObservedStateSchema as Cr, SPACE_UPDATES_DEFAULT_LIMIT as Ct, daemonHubPreExecutionHandoffRequestSchema as D, resolveBuiltinUpstreamConversationRefKind as Da, collectCanonicalMentionTextFragments as Di, daemonHubDeliveryExecutionIdentitySchema as Dn, conversationBootstrapReasonSchema as Dr, atsSpaceActionReplyToSchema as Dt, daemonHubPreExecutionHandoffReasonCodeSchema as E, conversationPolicySchema as Ea, canonicalMentionTextFragmentSchema as Ei, RUNTIME_EXECUTION_IDENTITY_MODEL_VERSION as En, conversationExecutionStateSchema as Er, atsSpaceActionReadUpdatesFromSchema as Et, daemonHubRuntimeCoordinatorDecisionResponseSchema as F, normalizeMessageEnvelope as Fi, atsdDispatchContinuitySnapshotSchema as Fn, upstreamConversationResumePlanSchema as Fr, DAEMON_SERVICE_CONTRACT_SCHEMA_VERSION as Ft, daemonHubRuntimeCoordinatorHeadNoExecutionPublicationCategorySchema as G, spacePasswordStateSchema as Gi, atsdMentionDispatchStatusSchema as Gn, runtimeDispatchPolicySchema as Gr, runtimeCoordinatorExecutionCreationStatusSchema as Gt, daemonHubRuntimeCoordinatorHeadLifecycleTraceRequestSchema as H, createSpacePasswordBodySchema as Hi, atsdMentionDispatchResultEnvelopeSchema as Hn, runtimeAgentControllerSettingsSchema as Hr, buildRuntimeCoordinatorExecutionEventId as Ht, daemonHubRuntimeCoordinatorDecisionTriggerSchema as I, parseCanonicalMentionLiteral as Ii, atsdDispatchQueueIngressSchema as In, upstreamConversationResumeSchema as Ir, daemonServiceContractSchema as It, daemonHubRuntimeCoordinatorHeadNoExecutionRequestSchema as J, SPACE_MENTION_LABEL_SOURCE_VALUES as Ji, AGENT_REPLY_FINAL_PURPOSE as Jn, spaceThreadActionRefSchema as Jr, runtimeCoordinatorExecutionRecordSchema as Jt, daemonHubRuntimeCoordinatorHeadNoExecutionReasonCodeSchema as K, upsertSpacePasswordBodySchema as Ki, AGENT_REPLYING_END_PURPOSE as Kn, runtimeStreamingModeSchema as Kr, runtimeCoordinatorExecutionEventSchema as Kt, daemonHubRuntimeCoordinatorHeadAcceptActionSchema as L, resolveMessageEnvelopeTargetField as Li, atsdDispatchQueueLegacyMessageSchemaV1 as Ln, LEGACY_RUNTIME_DISPATCH_POLICY as Lr, daemonServiceControllerSchema as Lt, daemonHubRouteCatalogChangedReasonSchema as M, messageEnvelopeSchema as Mi, spaceTraceExecutionIdentityProjectionSchema as Mn, localRuntimeContextReasonSchema as Mr, atsSpaceReadResultActionSchema as Mt, daemonHubRuntimeCoordinatorDecisionEventKindSchema as N, messageEnvelopeTargetFieldSchema as Ni, ATSD_DISPATCH_CONTRACT_VERSION as Nn, nextDispatchPlanSchema as Nr, atsSpaceReadUpdatesActionSchema as Nt, daemonHubPreExecutionHandoffResponseSchema as O, upstreamConversationRefKindSchema as Oa, formatCanonicalMentionLiteral as Oi, daemonHubResultIdentityEchoSchema as On, conversationBootstrapSchema as Or, atsSpaceActionSchema as Ot, daemonHubRuntimeCoordinatorDecisionRequestSchema as P, messageMentionTypeSchema as Pi, ATSD_DISPATCH_QUEUE_SCHEMA_VERSION as Pn, upstreamConversationResumePlanBlockedReasonSchema as Pr, atsSpaceStaySilentActionSchema as Pt, daemonHubRuntimeCoordinatorHeadWaitingRecoveryActionSchema as Q, spaceMentionLabelSourceSchema as Qi, DISPATCH_ACTIVITY_DISPATCHING_PURPOSE as Qn, spaceThreadIdSchema as Qr, RUNTIME_COORDINATOR_EXECUTION_TOKEN_MODEL_VERSION as Qt, daemonHubRuntimeCoordinatorHeadAcceptRequestSchema as R, resolveSpaceMessageAddressingTargetField as Ri, atsdDispatchQueueMessageSchema as Rn, agentContextResolutionSchema as Rr, daemonServiceDesiredStateSchema as Rt, daemonHubLookupRouteRequestSchema as S, BUILTIN_PROVIDER_ALLOWS_DISTINCT_AGENT_CONTEXT_ID as Sa, SPACE_MESSAGE_ADDRESSING_RELATION_VALUES as Si, providerRuntimePreparationRequirementSchema as Sn, bootstrapTemplateFactsSchema as Sr, atsdTaskResultTelemetrySchema as St, daemonHubNotifyRouteCatalogChangedResponseSchema as T, builtinProviderAllowsDistinctAgentContextId as Ta, canonicalMentionLiteralSchema as Ti, providerRuntimeWorkspaceResumeBehaviorSchema as Tn, conversationBindingSourceSchema as Tr, atsSpaceActionReadResultBySchema as Tt, daemonHubRuntimeCoordinatorHeadLifecycleTraceResponseSchema as U, normalizeSpacePasswordText as Ui, atsdMentionDispatchResultPayloadSchema as Un, runtimeAgentExecutableLaunchContractSchema as Ur, buildRuntimeCoordinatorExecutionId as Ut, daemonHubRuntimeCoordinatorHeadLifecycleTraceRecordSchema as V, SPACE_PASSWORD_MIN_LENGTH as Vi, ATSD_MENTION_DISPATCH_RESULT_SCHEMA_VERSION as Vn, runtimeAgentControllerLaunchContractSchema as Vr, RUNTIME_COORDINATOR_EXECUTION_MODEL_VERSION as Vt, daemonHubRuntimeCoordinatorHeadNoExecutionDecisionSourceSchema as W, spacePasswordSchema as Wi, atsdMentionDispatchRuleSourceSchema as Wn, runtimeAgentNodeScriptLaunchContractSchema as Wr, runtimeCoordinatorExecutionCreationDiagnosticSchema as Wt, daemonHubRuntimeCoordinatorHeadWaitingCategorySchema as X, resolveSpaceMentionLabels as Xi, AGENT_REPLY_PREVIEW_PURPOSE as Xn, spaceThreadEventSchema as Xr, runtimeCoordinatorLegacyPointersSchema as Xt, daemonHubRuntimeCoordinatorHeadNoExecutionResponseSchema as Y, resolveSingleSpaceMentionLabels as Yi, AGENT_REPLY_PREVIEW_END_PURPOSE as Yn, spaceThreadContextSchema as Yr, runtimeCoordinatorExecutionStatusSchema as Yt, daemonHubRuntimeCoordinatorHeadWaitingReasonCodeSchema as Z, spaceMentionLabelSchema as Zi, CONVERSATION_CONTINUITY_WARNING_PURPOSE as Zn, spaceThreadEventTypeSchema as Zr, runtimeCoordinatorTerminalOutcomeSchema as Zt, daemonHubHeartbeatRequestSchema as _, createDaemonRouteObservationSummary as _a, targetWakeLifecycleIdentitySchema as _i, runtimeCoordinatorTokenStatusSchema as _n, signalStatusGeneratedBySchema as _r, atsdTaskResultErrorTypeSchema as _t, daemonHubDeliverDispatchPayloadSchema as a, profileKindSchema as aa, spaceNoteSchema as ai, runtimeCoordinatorExecutionTokenEchoSchema as an, signalStatusDataSchema as ar, daemonRuntimeContractReasonCodeSchema as at, daemonHubLookupOwnerServiceRequestSchema as b, daemonRouteObservationSummarySchema as ba, MESSAGE_ENVELOPE_TARGET_FIELD_VALUES as bi, providerRuntimeCapabilityDeclarationSchema as bn, CORE_READINESS_FACTS_CHANGED_MARKER_KIND as br, atsdTaskResultSpaceActionProvenanceSchema as bt, daemonHubDispatchLifecyclePhaseSchema as c, profileWorkingDirectorySchema as ca, spaceAllowedActionSchema as ci, runtimeCoordinatorSafeEventPayloadJsonSchema as cn, signalSystemNoticeSchema as cr, daemonStreamErrorFrameSchema as ct, daemonHubDispatchPreviewEndRequestSchema as d, finiteIntegerNumber as da, spaceDispatchPolicyModeSchema as di, runtimeCoordinatorTokenDiagnosticEventSchema as dn, signalTextSchema as dr, atsdProviderAccessEvidenceProviderSchema as dt, MAX_PROFILE_WORKING_DIRECTORY_LENGTH as ea, spaceThreadSignalPlacementKindSchema as ei, RUNTIME_COORDINATOR_RETIRED_TOKEN_REASON_CODE_BY_STATUS as en, DISPATCH_ACTIVITY_RETRYING_PURPOSE as er, daemonHubRuntimeCoordinatorHeadWaitingResponseSchema as et, daemonHubDispatchPreviewRequestSchema as f, nonEmptyTrimmedStringFromUnknown as fa, spaceDispatchPolicySchema as fi, runtimeCoordinatorTokenExecutionScopeSchema as fn, signalSystemNoticeDataSchema$1 as fr, atsdProviderAccessEvidenceReasonCodeSchema as ft, daemonHubErrorCodeSchema as g, MAX_TEXT_LENGTH as ga, projectTargetWakeLifecycleIdentity as gi, runtimeCoordinatorTokenRunAuthoritySchema as gn, signalStatusDataSchema$1 as gr, atsdTaskResultEnvelopeWriteSchema as gt, daemonHubDispatchSourceSignalSchema as h, MAX_PROFILE_NAME_LENGTH as ha, buildTargetWakeLifecycleId as hi, runtimeCoordinatorTokenReasonCodeSchema as hn, signalSystemNoticeTypeSchema as hr, atsdTaskResultEnvelopeSchema as ht, daemonHubCapabilitiesSchema as i, profileHandleSchema as ia, spaceContractSchema as ii, runtimeCoordinatorExecutionTokenAuthorityRecordSchema as in, sanitizeSignalTextPreview as ir, daemonHubWaitDispatchResultResponseSchema as it, daemonHubRouteCatalogChangedFramePayloadSchema as j, messageEnvelopeInputSchema as ji, runtimeExecutionIdentityCoreSchema as jn, localRuntimeContextPlanSchema as jr, atsSpacePostStatusActionSchema as jt, daemonHubRegisterSessionRequestSchema as k, upstreamConversationRefSchema as ka, getSpaceMessageAddressingRelationSupportForTargetKind as ki, daemonHubRuntimeEvidenceIdentityEchoSchema as kn, dispatchExecutionSchema as kr, atsSpaceEgressActionSchema as kt, daemonHubDispatchLifecycleRequestSchema as l, profileWorkspaceModeSchema as la, spaceAllowedActionsSchema as li, runtimeCoordinatorTokenAuthorityScopeSchema as ln, signalTextDataSchema as lr, daemonStreamFrameSchema as lt, daemonHubDispatchRuntimeEvidenceRequestSchema as m, MAX_PROFILE_ID_LENGTH as ma, TARGET_WAKE_LIFECYCLE_IDENTITY_MODEL_VERSION as mi, runtimeCoordinatorTokenProjectionSchema as mn, signalSystemNoticeSchema$1 as mr, atsdProviderAccessEvidenceSourceSchema as mt, DAEMON_HUB_SCHEMA_VERSION as n, atsRuntimeProfileIdSchema as na, spaceBriefModeSchema as ni, RUNTIME_COORDINATOR_TOKEN_DIAGNOSTIC_MODEL_VERSION as nn, SPACE_MEMBER_REMOVE_NOTICE_PURPOSE as nr, daemonHubSubmitTaskResultResponseSchema as nt, daemonHubDeliverDispatchRequestSchema as o, profileLabelSchema as oa, resultArchiveModeSchema as oi, runtimeCoordinatorExecutionTokenEnvelopeSchema as on, signalStatusSchema as or, daemonRuntimeContractSchema as ot, daemonHubDispatchRuntimeEvidencePhaseSchema as p, trimmedStringFromUnknown as pa, spaceAuthorityOrderSchema as pi, runtimeCoordinatorTokenFingerprintSchema as pn, signalSystemNoticeGeneratedBySchema as pr, atsdProviderAccessEvidenceSchema as pt, daemonHubRuntimeCoordinatorHeadNoExecutionRecoveryActionSchema as q, SPACE_MENTION_LABEL_MAX_LENGTH as qi, AGENT_REPLYING_PURPOSE as qn, runtimeTransportModeSchema as qr, runtimeCoordinatorExecutionEventTypeSchema as qt, daemonExecutionCompatibilitySchema as r, normalizeOptionalWorkingDirectory as ra, spaceContractFieldsSchema as ri, RUNTIME_COORDINATOR_TOKEN_SECRET_FIELD_NAMES as rn, SPACE_MENTION_REJECT_NOTICE_PURPOSE as rr, daemonHubWaitDispatchResultRequestSchema as rt, daemonHubDeliverDispatchResponseSchema as s, profileSchema as sa, resultArchivePolicySchema as si, runtimeCoordinatorExecutionTokenSchema as sn, signalSystemNoticeDataSchema as sr, daemonStreamCodeSchema as st, CURRENT_DAEMON_EXECUTION_CONTRACT_EPOCH as t, agentProfileIdSchema as ta, spaceThreadSignalPlacementSchema as ti, RUNTIME_COORDINATOR_TOKEN_AUTHORITY_MODEL_VERSION as tn, SPACE_MEMBER_JOIN_NOTICE_PURPOSE as tr, daemonHubSubmitTaskResultRequestSchema as tt, daemonHubDispatchLifecycleSnapshotSchema as u, uuidProfileIdSchema as ua, spacePublicationModeSchema as ui, runtimeCoordinatorTokenDeliveryProvenanceSchema as un, signalTextReplyToSchema as ur, ATSD_TASK_RESULT_SCHEMA_VERSION as ut, daemonHubHeartbeatResponseSchema as v, daemonRouteObservationReasonCodeSchema as va, clientMessageIdSchema as vi, runtimeCoordinatorTokenValidationHashSchema as vn, spaceStatusSchema as vr, atsdTaskResultOpenClawGatewayVisibilityStatusSchema as vt, daemonHubNotifyRouteCatalogChangedRequestSchema as w, buildUpstreamConversationRef as wa, SPACE_MESSAGE_ADDRESSING_TARGET_KIND_VALUES as wi, providerRuntimeWorkingDirectoryModeSchema as wn, conversationBindingRecordSchema as wr, SPACE_UPDATES_MAX_LIMIT as wt, daemonHubLookupOwnerServiceResponseSchema as x, daemonRouteObservationUnavailableReasonCodeSchema as xa, MESSAGE_MENTION_TYPE_VALUES as xi, providerRuntimeContinuationCapabilitySchema as xn, coreReadinessFactsChangedSchema as xr, atsdTaskResultStatusSchema as xt, daemonHubLeaseSchema as y, daemonRouteObservationStatusSchema as ya, parseOptionalClientMessageId as yi, daemonRuntimeAdapterCapabilitySnapshotSchema as yn, MAX_SIGNAL_REPLY_TO_PREVIEW_LENGTH as yr, atsdTaskResultPayloadSchema as yt, daemonHubRuntimeCoordinatorHeadAcceptResponseSchema as z, spaceMessageAddressingRelationSchema as zi, atsdDispatchReplyToSnapshotSchema as zn, runtimeAgentContextIdMappingSpecSchema as zr, daemonServiceLaneSchema as zt };\n//# sourceMappingURL=daemon-hub-DecCVKaH.js.map","import { $r as spaceThreadSchema, B as daemonHubRuntimeCoordinatorHeadLifecycleStatusSchema, C as daemonHubLookupRouteResponseSchema, Ct as SPACE_UPDATES_DEFAULT_LIMIT, Di as collectCanonicalMentionTextFragments, Ea as conversationPolicySchema, Er as conversationExecutionStateSchema, G as daemonHubRuntimeCoordinatorHeadNoExecutionPublicationCategorySchema, Hn as atsdMentionDispatchResultEnvelopeSchema, Jt as runtimeCoordinatorExecutionRecordSchema, K as daemonHubRuntimeCoordinatorHeadNoExecutionReasonCodeSchema, Kt as runtimeCoordinatorExecutionEventSchema, Lt as daemonServiceControllerSchema, Mi as messageEnvelopeSchema, Mn as spaceTraceExecutionIdentityProjectionSchema, Nr as nextDispatchPlanSchema, Q as daemonHubRuntimeCoordinatorHeadWaitingRecoveryActionSchema, Sr as bootstrapTemplateFactsSchema, Tr as conversationBindingSourceSchema, Vn as ATSD_MENTION_DISPATCH_RESULT_SCHEMA_VERSION, W as daemonHubRuntimeCoordinatorHeadNoExecutionDecisionSourceSchema, Wi as spacePasswordSchema, Wt as runtimeCoordinatorExecutionCreationDiagnosticSchema, X as daemonHubRuntimeCoordinatorHeadWaitingCategorySchema, Xr as spaceThreadEventSchema, Yr as spaceThreadContextSchema, Z as daemonHubRuntimeCoordinatorHeadWaitingReasonCodeSchema, Zi as spaceMentionLabelSchema, _i as targetWakeLifecycleIdentitySchema, aa as profileKindSchema, ar as signalStatusDataSchema, ba as daemonRouteObservationSummarySchema, ca as profileWorkingDirectorySchema, da as finiteIntegerNumber, dr as signalTextSchema, ea as MAX_PROFILE_WORKING_DIRECTORY_LENGTH, fa as nonEmptyTrimmedStringFromUnknown, fi as spaceDispatchPolicySchema, ga as MAX_TEXT_LENGTH, ha as MAX_PROFILE_NAME_LENGTH, ht as atsdTaskResultEnvelopeSchema, ia as profileHandleSchema, ii as spaceContractSchema, ka as upstreamConversationRefSchema, kr as dispatchExecutionSchema, la as profileWorkspaceModeSchema, li as spaceAllowedActionsSchema, lr as signalTextDataSchema, na as atsRuntimeProfileIdSchema, oa as profileLabelSchema, pa as trimmedStringFromUnknown, q as daemonHubRuntimeCoordinatorHeadNoExecutionRecoveryActionSchema, qr as runtimeTransportModeSchema, r as daemonExecutionCompatibilitySchema, ri as spaceContractFieldsSchema, sa as profileSchema, si as resultArchivePolicySchema, sr as signalSystemNoticeDataSchema, t as CURRENT_DAEMON_EXECUTION_CONTRACT_EPOCH, ta as agentProfileIdSchema, ti as spaceThreadSignalPlacementSchema, ua as uuidProfileIdSchema, ui as spacePublicationModeSchema, va as daemonRouteObservationReasonCodeSchema, vi as clientMessageIdSchema$1, vr as spaceStatusSchema, wr as conversationBindingRecordSchema, wt as SPACE_UPDATES_MAX_LIMIT, ya as daemonRouteObservationStatusSchema, zt as daemonServiceLaneSchema } from \"./daemon-hub-DecCVKaH.js\";\nimport { z } from \"zod/v4\";\n\n//#region src/schemas/daemon/provider-conversation-capability.ts\nconst providerConversationExternalImportCapabilitySchema = z.enum([\"unsupported\", \"by_ref_id\"]);\nconst providerConversationResumeCapabilitySchema = z.enum([\"unsupported\", \"by_ref_id\"]);\nconst providerConversationDiscoverCapabilitySchema = z.literal(\"unsupported\");\nconst providerConversationTurnOverrideCapabilitySchema = z.enum([\n\t\"unsupported\",\n\t\"stateless\",\n\t\"persistent\"\n]);\nconst providerConversationCapabilitySchema = z.strictObject({\n\tdiscover: providerConversationDiscoverCapabilitySchema,\n\texternalImport: providerConversationExternalImportCapabilitySchema,\n\tresume: providerConversationResumeCapabilitySchema,\n\tturnOverride: providerConversationTurnOverrideCapabilitySchema\n});\nconst BUILTIN_PROVIDER_CONVERSATION_CAPABILITY_BY_PROVIDER = {\n\tcodex: {\n\t\tdiscover: \"unsupported\",\n\t\texternalImport: \"by_ref_id\",\n\t\tresume: \"by_ref_id\",\n\t\tturnOverride: \"unsupported\"\n\t},\n\t\"claude-code\": {\n\t\tdiscover: \"unsupported\",\n\t\texternalImport: \"by_ref_id\",\n\t\tresume: \"by_ref_id\",\n\t\tturnOverride: \"unsupported\"\n\t},\n\topenclaw: {\n\t\tdiscover: \"unsupported\",\n\t\texternalImport: \"unsupported\",\n\t\tresume: \"by_ref_id\",\n\t\tturnOverride: \"unsupported\"\n\t}\n};\nconst resolveBuiltinProviderConversationCapability = (providerId) => {\n\tconst capability = BUILTIN_PROVIDER_CONVERSATION_CAPABILITY_BY_PROVIDER[providerId];\n\treturn capability ? { ...capability } : null;\n};\n\n//#endregion\n//#region src/schemas/daemon/controller-ref.ts\nconst BUILTIN_CONTROLLER_REF_PREFIX = \"builtin:\";\nfunction normalizeOptionalText(value) {\n\tif (typeof value !== \"string\") return null;\n\tconst normalized = value.trim();\n\treturn normalized.length > 0 ? normalized : null;\n}\nfunction normalizeBuiltinControllerId(controllerRef) {\n\tconst normalized = normalizeOptionalText(controllerRef);\n\tif (!normalized) return null;\n\tif (normalized.includes(\":\") && !normalized.startsWith(BUILTIN_CONTROLLER_REF_PREFIX)) return null;\n\tconst builtinId = normalized.startsWith(BUILTIN_CONTROLLER_REF_PREFIX) ? normalized.slice(8) : normalized;\n\tif (builtinId.length === 0 || builtinId.includes(\":\")) return null;\n\treturn builtinId;\n}\nfunction normalizeBuiltinControllerProviderId(controllerRef) {\n\tconst builtinId = normalizeBuiltinControllerId(controllerRef);\n\treturn builtinId && resolveBuiltinProviderConversationCapability(builtinId) ? builtinId : null;\n}\nfunction normalizeBuiltinControllerAgentId(controllerRef) {\n\treturn normalizeBuiltinControllerId(controllerRef);\n}\nfunction isExplicitBuiltinControllerRef(controllerRef) {\n\tconst normalized = normalizeOptionalText(controllerRef);\n\treturn normalized?.startsWith(BUILTIN_CONTROLLER_REF_PREFIX) === true && normalizeBuiltinControllerProviderId(normalized) !== null;\n}\nfunction canonicalizeControllerRefForKind(input) {\n\tconst normalized = normalizeOptionalText(input.controllerRef);\n\tif (!normalized) return null;\n\tif (input.controllerKind === \"builtin\") return canonicalizeBuiltinControllerRef(normalized);\n\treturn normalized;\n}\nfunction buildControllerRoutingKeyForKind(input) {\n\tconst canonicalControllerRef = canonicalizeControllerRefForKind(input);\n\tif (!canonicalControllerRef) return null;\n\treturn input.controllerKind === \"builtin\" ? canonicalControllerRef : `${input.controllerKind}:${canonicalControllerRef}`;\n}\nfunction canonicalizeBuiltinControllerRef(controllerRef) {\n\tconst builtinId = normalizeBuiltinControllerId(controllerRef);\n\treturn builtinId ? `${BUILTIN_CONTROLLER_REF_PREFIX}${builtinId}` : null;\n}\nfunction areBuiltinControllerRefsEquivalent(left, right) {\n\tconst canonicalLeft = canonicalizeBuiltinControllerRef(left);\n\tif (!canonicalLeft) return false;\n\treturn canonicalLeft === canonicalizeBuiltinControllerRef(right);\n}\n\n//#endregion\n//#region src/agent-execution-readiness-impact-taxonomy.ts\nconst AGENT_EXECUTION_READINESS_IMPACT_FRESH_TTL_MS = 1800 * 1e3;\nconst AGENT_EXECUTION_READINESS_IMPACT_REASON_CODES = [\n\t\"controller.launch.choice_required\",\n\t\"controller.launch.needs_repair\",\n\t\"controller.client.upgrade_required\",\n\t\"controller.runtime.missing\",\n\t\"runtime_coordinator.delivery_expired\",\n\t\"workspace.invalid\",\n\t\"workspace.missing\"\n];\nconst AGENT_EXECUTION_READINESS_IMPACT_KINDS = [\"local_execution\"];\nconst AGENT_EXECUTION_READINESS_IMPACT_SOURCES = [\"wake_failure\"];\nconst AGENT_EXECUTION_READINESS_IMPACT_EFFECTS = [\"current_readiness_blocker\"];\nconst AGENT_EXECUTION_READINESS_IMPACT_SCOPES = [\"agent_profile_binding_runtime_capability\"];\nconst AGENT_EXECUTION_READINESS_IMPACT_CLEARING_TRIGGERS = [\"fresh_ttl_expires\", \"matching_execution_success\"];\nconst AGENT_EXECUTION_READINESS_IMPACT_REASON_CODE_ALIASES = {\n\t\"profile.workspace.invalid\": \"workspace.invalid\",\n\t\"profile.workspace.missing\": \"workspace.missing\"\n};\nconst AGENT_EXECUTION_READINESS_IMPACT_TAXONOMY = [\n\t{\n\t\tclearingTriggers: AGENT_EXECUTION_READINESS_IMPACT_CLEARING_TRIGGERS,\n\t\teffect: \"current_readiness_blocker\",\n\t\tfreshTtlMs: AGENT_EXECUTION_READINESS_IMPACT_FRESH_TTL_MS,\n\t\timpactKind: \"local_execution\",\n\t\treasonCode: \"controller.launch.choice_required\",\n\t\tscope: \"agent_profile_binding_runtime_capability\",\n\t\tsource: \"wake_failure\"\n\t},\n\t{\n\t\tclearingTriggers: AGENT_EXECUTION_READINESS_IMPACT_CLEARING_TRIGGERS,\n\t\teffect: \"current_readiness_blocker\",\n\t\tfreshTtlMs: AGENT_EXECUTION_READINESS_IMPACT_FRESH_TTL_MS,\n\t\timpactKind: \"local_execution\",\n\t\treasonCode: \"controller.launch.needs_repair\",\n\t\tscope: \"agent_profile_binding_runtime_capability\",\n\t\tsource: \"wake_failure\"\n\t},\n\t{\n\t\tclearingTriggers: AGENT_EXECUTION_READINESS_IMPACT_CLEARING_TRIGGERS,\n\t\teffect: \"current_readiness_blocker\",\n\t\tfreshTtlMs: AGENT_EXECUTION_READINESS_IMPACT_FRESH_TTL_MS,\n\t\timpactKind: \"local_execution\",\n\t\treasonCode: \"controller.client.upgrade_required\",\n\t\tscope: \"agent_profile_binding_runtime_capability\",\n\t\tsource: \"wake_failure\"\n\t},\n\t{\n\t\tclearingTriggers: AGENT_EXECUTION_READINESS_IMPACT_CLEARING_TRIGGERS,\n\t\teffect: \"current_readiness_blocker\",\n\t\tfreshTtlMs: AGENT_EXECUTION_READINESS_IMPACT_FRESH_TTL_MS,\n\t\timpactKind: \"local_execution\",\n\t\treasonCode: \"controller.runtime.missing\",\n\t\tscope: \"agent_profile_binding_runtime_capability\",\n\t\tsource: \"wake_failure\"\n\t},\n\t{\n\t\tclearingTriggers: AGENT_EXECUTION_READINESS_IMPACT_CLEARING_TRIGGERS,\n\t\teffect: \"current_readiness_blocker\",\n\t\tfreshTtlMs: AGENT_EXECUTION_READINESS_IMPACT_FRESH_TTL_MS,\n\t\timpactKind: \"local_execution\",\n\t\treasonCode: \"runtime_coordinator.delivery_expired\",\n\t\tscope: \"agent_profile_binding_runtime_capability\",\n\t\tsource: \"wake_failure\"\n\t},\n\t{\n\t\tclearingTriggers: AGENT_EXECUTION_READINESS_IMPACT_CLEARING_TRIGGERS,\n\t\teffect: \"current_readiness_blocker\",\n\t\tfreshTtlMs: AGENT_EXECUTION_READINESS_IMPACT_FRESH_TTL_MS,\n\t\timpactKind: \"local_execution\",\n\t\treasonCode: \"workspace.invalid\",\n\t\tscope: \"agent_profile_binding_runtime_capability\",\n\t\tsource: \"wake_failure\"\n\t},\n\t{\n\t\tclearingTriggers: AGENT_EXECUTION_READINESS_IMPACT_CLEARING_TRIGGERS,\n\t\teffect: \"current_readiness_blocker\",\n\t\tfreshTtlMs: AGENT_EXECUTION_READINESS_IMPACT_FRESH_TTL_MS,\n\t\timpactKind: \"local_execution\",\n\t\treasonCode: \"workspace.missing\",\n\t\tscope: \"agent_profile_binding_runtime_capability\",\n\t\tsource: \"wake_failure\"\n\t}\n];\nconst KNOWN_FINAL_FAILURE_REASON_CODES_WITHOUT_READINESS_IMPACT = [\n\t\"ats.space_action.repair_failed\",\n\t\"daemon.delivery.execution_stalled\",\n\t\"daemon.delivery.finalization_timeout\",\n\t\"daemon.delivery.start_timeout\",\n\t\"daemon.delivery.timeout\",\n\t\"delivery.result_timeout\",\n\t\"delivery.start_timeout\",\n\t\"final_visible_outcome.publication_pending\",\n\t\"final_visible_outcome.publication_retrying\",\n\t\"final_visible_outcome.publication_unresolved\",\n\t\"local_adapter.timeout\",\n\t\"reply.invalid_space_action\",\n\t\"reply.publication_failed\",\n\t\"runtime.progress_stale\",\n\t\"runtime.reply.empty_output\",\n\t\"runtime.reply.metadata_missing.agent_context_id\",\n\t\"runtime.reply.metadata_missing.controller_ref\",\n\t\"runtime_coordinator.failure_publication_failed\",\n\t\"runtime_coordinator.failure_publication_unavailable\",\n\t\"runtime_coordinator.publication_retry_exhausted\",\n\t\"runtime_coordinator.publication_unresolved\",\n\t\"space.signal.persist_failed\",\n\t\"timed_out_after_output\",\n\t\"timed_out_no_output\",\n\t\"timeout\"\n];\nconst agentExecutionReadinessImpactReasonCodeSchema = z.enum(AGENT_EXECUTION_READINESS_IMPACT_REASON_CODES);\nconst agentExecutionReadinessImpactKindSchema = z.enum(AGENT_EXECUTION_READINESS_IMPACT_KINDS);\nconst agentExecutionReadinessImpactSourceSchema = z.enum(AGENT_EXECUTION_READINESS_IMPACT_SOURCES);\nconst agentExecutionReadinessImpactEffectSchema = z.enum(AGENT_EXECUTION_READINESS_IMPACT_EFFECTS);\nconst agentExecutionReadinessImpactScopeSchema = z.enum(AGENT_EXECUTION_READINESS_IMPACT_SCOPES);\nconst agentExecutionReadinessImpactClearingTriggerSchema = z.enum(AGENT_EXECUTION_READINESS_IMPACT_CLEARING_TRIGGERS);\nfunction resolveAgentExecutionReadinessImpactTaxonomyEntry(reasonCode) {\n\tconst resolvedReasonCode = resolveAgentExecutionReadinessImpactReasonCode(reasonCode);\n\tif (!resolvedReasonCode) return null;\n\treturn AGENT_EXECUTION_READINESS_IMPACT_TAXONOMY.find((entry) => entry.reasonCode === resolvedReasonCode) ?? null;\n}\nfunction resolveAgentExecutionReadinessImpactReasonCode(reasonCode) {\n\tif (typeof reasonCode !== \"string\") return null;\n\tconst normalized = reasonCode.trim().toLowerCase();\n\tif (!normalized) return null;\n\tconst alias = AGENT_EXECUTION_READINESS_IMPACT_REASON_CODE_ALIASES[normalized];\n\tif (alias) return alias;\n\treturn AGENT_EXECUTION_READINESS_IMPACT_REASON_CODES.includes(normalized) ? normalized : null;\n}\nfunction isAgentExecutionReadinessImpactReasonCode(reasonCode) {\n\treturn resolveAgentExecutionReadinessImpactReasonCode(reasonCode) !== null;\n}\nfunction isKnownFinalFailureReasonCodeWithoutReadinessImpact(reasonCode) {\n\treturn typeof reasonCode === \"string\" && KNOWN_FINAL_FAILURE_REASON_CODES_WITHOUT_READINESS_IMPACT.includes(reasonCode);\n}\n\n//#endregion\n//#region src/schemas/http/prepare-readiness.ts\nconst boundedIdentifierSchema$5 = z.string().trim().min(1).max(256);\nconst reasonCodeSchema$3 = z.string().trim().min(1).max(256);\nconst prepareReadinessRouteParamsSchema = z.strictObject({ deviceId: boundedIdentifierSchema$5 });\nconst getPrepareReadinessQuerySchema = z.strictObject({\n\tcapabilityRefs: z.array(z.string().trim().min(1).max(256)).optional(),\n\tlane: boundedIdentifierSchema$5,\n\truntimeId: z.string().trim().min(1).max(512).optional()\n});\nconst prepareReadinessRuntimeIdSchema = z.strictObject({\n\tsource: z.literal(\"runtime_registry_authority\"),\n\tvalue: z.string().trim().min(1).max(512)\n});\nconst prepareReadinessDisplayStateSchema = z.enum([\n\t\"ready\",\n\t\"pending\",\n\t\"unavailable\",\n\t\"needs_prepare\",\n\t\"needs_repair\",\n\t\"stale\",\n\t\"unknown\"\n]);\nconst prepareReadinessRunnableCapabilitySchema = z.strictObject({\n\tcapabilityRef: z.string().trim().min(1).max(256),\n\texpiresAtMs: z.int().nonnegative(),\n\tobservedAtMs: z.int().nonnegative(),\n\treasonCodes: z.array(reasonCodeSchema$3),\n\tstatus: z.literal(\"ready\")\n});\nconst prepareReadinessNonRunnableCapabilitySchema = z.strictObject({\n\tcapabilityRef: z.string().trim().min(1).max(256),\n\texpiresAtMs: z.int().nonnegative().optional(),\n\tobservedAtMs: z.int().nonnegative().optional(),\n\treasonCodes: z.array(reasonCodeSchema$3),\n\tstatus: z.enum([\n\t\t\"disabled\",\n\t\t\"invalid\",\n\t\t\"missing\",\n\t\t\"stale\",\n\t\t\"unavailable\",\n\t\t\"unknown\"\n\t])\n});\nconst prepareReadinessProjectionSchema = z.strictObject({\n\tallRunnableCapabilitiesPrepared: z.strictObject({ status: z.enum([\n\t\t\"prepared\",\n\t\t\"not_prepared\",\n\t\t\"partial\",\n\t\t\"unknown\"\n\t]) }).optional(),\n\tprojectionStatus: prepareReadinessDisplayStateSchema,\n\treasonCodes: z.array(reasonCodeSchema$3),\n\tserviceReadiness: z.strictObject({ status: z.enum([\n\t\t\"running\",\n\t\t\"starting\",\n\t\t\"not_running\",\n\t\t\"not_installed\",\n\t\t\"needs_repair\",\n\t\t\"unavailable\",\n\t\t\"unknown\"\n\t]) }).optional()\n});\nconst prepareReadinessSummarySchema = z.strictObject({\n\tdisplayState: prepareReadinessDisplayStateSchema,\n\tready: z.boolean(),\n\treasonCodes: z.array(reasonCodeSchema$3)\n});\nconst getPrepareReadinessResponseSchema = z.strictObject({\n\tcapabilityReportsRead: z.boolean(),\n\tnonRunnableCapabilities: z.array(prepareReadinessNonRunnableCapabilitySchema),\n\tprojection: prepareReadinessProjectionSchema,\n\treason: z.enum([\n\t\t\"runtime_identity_invalid\",\n\t\t\"runtime_id_invalid\",\n\t\t\"runtime_id_mismatch\",\n\t\t\"runtime_lookup_conflict\",\n\t\t\"runtime_missing\",\n\t\t\"runtime_not_ready\"\n\t]).optional(),\n\trunnableCapabilities: z.array(prepareReadinessRunnableCapabilitySchema),\n\truntimeId: prepareReadinessRuntimeIdSchema.optional(),\n\tstatus: z.enum([\"not_ready\", \"ready\"]),\n\tsummary: prepareReadinessSummarySchema\n}).superRefine((value, context) => {\n\tif (value.status === \"ready\" && !value.runtimeId) context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"ready prepare readiness response requires authority runtimeId evidence\",\n\t\tpath: [\"runtimeId\"]\n\t});\n});\n\n//#endregion\n//#region src/schemas/http/agent-execution-readiness.ts\nconst ISO_DATE_TIME_SCHEMA$6 = z.iso.datetime({ offset: true });\nconst trimmedNonEmptyStringSchema$7 = z.string().trim().min(1);\nconst nullableTrimmedStringSchema$6 = z.union([trimmedNonEmptyStringSchema$7, z.null()]);\nconst nullableIsoDateTimeSchema$4 = z.union([ISO_DATE_TIME_SCHEMA$6, z.null()]);\nconst nullableControllerKindSchema$1 = z.union([z.enum([\"builtin\", \"custom\"]), z.null()]);\nconst agentExecutionReadinessRouteParamsSchema = z.strictObject({ agentProfileId: agentProfileIdSchema });\nconst agentExecutionReadinessTargetRuntimeSchema = z.discriminatedUnion(\"kind\", [z.strictObject({ kind: z.literal(\"current_local_runtime\") }), z.strictObject({\n\tkind: z.literal(\"runtime_id\"),\n\truntimeId: prepareReadinessRuntimeIdSchema\n})]);\nconst getAgentExecutionReadinessBatchBodySchema = z.strictObject({\n\tagentProfileIds: z.array(agentProfileIdSchema).min(1).max(100),\n\ttargetRuntime: agentExecutionReadinessTargetRuntimeSchema.optional()\n});\nconst agentExecutionReadinessPrimaryActionSchema = z.enum([\n\t\"none\",\n\t\"connect_service\",\n\t\"reconnect_binding\",\n\t\"run_prepare\",\n\t\"update_service\",\n\t\"check_status\",\n\t\"fix_provider_account\"\n]);\nconst agentExecutionReadinessPrimaryActionPlanSchema = z.discriminatedUnion(\"action\", [\n\tz.strictObject({\n\t\taction: z.literal(\"none\"),\n\t\ttarget: z.null()\n\t}),\n\tz.strictObject({\n\t\taction: z.literal(\"connect_service\"),\n\t\ttarget: z.strictObject({ kind: z.literal(\"ats_service_connection\") })\n\t}),\n\tz.strictObject({\n\t\taction: z.literal(\"reconnect_binding\"),\n\t\ttarget: z.union([z.strictObject({ kind: z.literal(\"choose_local_agent\") }), z.strictObject({\n\t\t\tcontrollerKind: z.enum([\"builtin\", \"custom\"]),\n\t\t\tcontrollerRef: trimmedNonEmptyStringSchema$7,\n\t\t\tkind: z.literal(\"local_agent_connection\")\n\t\t})])\n\t}),\n\tz.strictObject({\n\t\taction: z.literal(\"run_prepare\"),\n\t\ttarget: z.strictObject({ kind: z.literal(\"current_computer\") })\n\t}),\n\tz.strictObject({\n\t\taction: z.literal(\"update_service\"),\n\t\ttarget: z.strictObject({ kind: z.literal(\"ats_service\") })\n\t}),\n\tz.strictObject({\n\t\taction: z.literal(\"check_status\"),\n\t\ttarget: z.strictObject({ kind: z.literal(\"status\") })\n\t}),\n\tz.strictObject({\n\t\taction: z.literal(\"fix_provider_account\"),\n\t\ttarget: z.strictObject({\n\t\t\tkind: z.literal(\"provider_account\"),\n\t\t\tprovider: z.literal(\"claude-code\")\n\t\t})\n\t})\n]);\nconst agentExecutionReadinessSchema = z.strictObject({\n\tagentProfileId: agentProfileIdSchema,\n\tdisplayState: z.enum([\n\t\t\"ready\",\n\t\t\"not_ready\",\n\t\t\"blocked\",\n\t\t\"unknown\"\n\t]),\n\tfacts: z.strictObject({\n\t\tprofile: z.strictObject({\n\t\t\tactive: z.boolean(),\n\t\t\treasonCodes: z.array(trimmedNonEmptyStringSchema$7),\n\t\t\tsource: z.enum([\n\t\t\t\t\"not_checked\",\n\t\t\t\t\"profile_identity\",\n\t\t\t\t\"unavailable\"\n\t\t\t])\n\t\t}),\n\t\tbinding: z.strictObject({\n\t\t\treasonCodes: z.array(trimmedNonEmptyStringSchema$7),\n\t\t\troutable: z.boolean(),\n\t\t\tsource: z.enum([\n\t\t\t\t\"binding_truth\",\n\t\t\t\t\"blocked\",\n\t\t\t\t\"missing\",\n\t\t\t\t\"not_checked\",\n\t\t\t\t\"unavailable\"\n\t\t\t])\n\t\t}),\n\t\tclaim: z.strictObject({\n\t\t\texecutionBlocked: z.boolean(),\n\t\t\tgrantsClaimSuccess: z.literal(false),\n\t\t\treasonCodes: z.array(trimmedNonEmptyStringSchema$7),\n\t\t\tsource: z.enum([\"claim_diagnostics\", \"not_checked\"])\n\t\t}),\n\t\tproviderAccount: z.strictObject({\n\t\t\tblocked: z.boolean(),\n\t\t\texpiresAtMs: z.number().int().nonnegative().nullable(),\n\t\t\tobservedAtMs: z.number().int().nonnegative().nullable(),\n\t\t\tprovider: z.union([z.literal(\"claude-code\"), z.null()]),\n\t\t\treasonCodes: z.array(trimmedNonEmptyStringSchema$7),\n\t\t\tsource: z.enum([\"not_checked\", \"wake_failure\"])\n\t\t}),\n\t\treadinessImpact: z.strictObject({\n\t\t\tblocked: z.boolean(),\n\t\t\texpiresAtMs: z.number().int().nonnegative().nullable(),\n\t\t\timpactKind: z.union([agentExecutionReadinessImpactKindSchema, z.null()]),\n\t\t\tobservedAtMs: z.number().int().nonnegative().nullable(),\n\t\t\treasonCodes: z.array(trimmedNonEmptyStringSchema$7),\n\t\t\tsource: z.union([z.literal(\"not_checked\"), agentExecutionReadinessImpactSourceSchema])\n\t\t}),\n\t\tlocalService: z.strictObject({\n\t\t\treachable: z.boolean(),\n\t\t\trefreshable: z.boolean(),\n\t\t\treasonCodes: z.array(trimmedNonEmptyStringSchema$7),\n\t\t\tsource: z.enum([\n\t\t\t\t\"daemon_hub\",\n\t\t\t\t\"not_checked\",\n\t\t\t\t\"unavailable\"\n\t\t\t])\n\t\t}),\n\t\tservice: z.strictObject({\n\t\t\texecutionCompatible: z.boolean(),\n\t\t\texpectedEpoch: z.literal(CURRENT_DAEMON_EXECUTION_CONTRACT_EPOCH),\n\t\t\tobservedEpoch: z.union([trimmedNonEmptyStringSchema$7, z.null()]),\n\t\t\treasonCodes: z.array(trimmedNonEmptyStringSchema$7),\n\t\t\tsource: z.enum([\n\t\t\t\t\"daemon_hub\",\n\t\t\t\t\"not_checked\",\n\t\t\t\t\"unavailable\"\n\t\t\t])\n\t\t}),\n\t\troute: z.strictObject({\n\t\t\tdeviceId: nullableTrimmedStringSchema$6,\n\t\t\tlane: z.union([daemonServiceLaneSchema, z.null()]),\n\t\t\tobservedAt: nullableIsoDateTimeSchema$4,\n\t\t\tonline: z.boolean(),\n\t\t\treasonCodes: z.array(trimmedNonEmptyStringSchema$7),\n\t\t\tsource: z.enum([\"daemon_route\", \"missing\"])\n\t\t}),\n\t\truntime: z.strictObject({\n\t\t\tready: z.boolean(),\n\t\t\treasonCodes: z.array(trimmedNonEmptyStringSchema$7),\n\t\t\tsource: z.enum([\"missing\", \"prepare_readiness\"])\n\t\t})\n\t}),\n\tprimaryAction: agentExecutionReadinessPrimaryActionSchema,\n\treasonCodes: z.array(trimmedNonEmptyStringSchema$7)\n});\nconst getAgentExecutionReadinessResponseSchema = z.strictObject({\n\tagentExecutionReadiness: agentExecutionReadinessSchema,\n\tagentProfileId: agentProfileIdSchema,\n\tcontrollerKind: nullableControllerKindSchema$1,\n\tcontrollerRef: nullableTrimmedStringSchema$6,\n\tdaemonRouteObservation: daemonRouteObservationSummarySchema,\n\tgeneratedAt: ISO_DATE_TIME_SCHEMA$6,\n\townerUserId: nullableTrimmedStringSchema$6,\n\tprimaryActionPlan: agentExecutionReadinessPrimaryActionPlanSchema,\n\tprofileName: nullableTrimmedStringSchema$6,\n\trouteDeviceId: nullableTrimmedStringSchema$6,\n\trouteLane: z.union([daemonServiceLaneSchema, z.null()]),\n\truntimeDeviceDisplayName: nullableTrimmedStringSchema$6\n});\nconst getAgentExecutionReadinessBatchResponseSchema = z.strictObject({ items: z.array(getAgentExecutionReadinessResponseSchema) });\n\n//#endregion\n//#region src/schemas/http/space-members.ts\nconst ISO_DATE_TIME_SCHEMA$5 = z.iso.datetime({ offset: true });\nconst MAX_SPACE_MEMBERS_BATCH_SIZE = 100;\nconst trimmedNonEmptyStringSchema$6 = z.string().trim().min(1);\nconst profileIdSchema = atsRuntimeProfileIdSchema;\nconst nullableTrimmedStringSchema$5 = z.union([trimmedNonEmptyStringSchema$6, z.null()]);\nconst nullableUpstreamConversationRefSchema = z.union([upstreamConversationRefSchema, z.null()]);\nconst nullableRuntimeProfileIdSchema = z.union([profileIdSchema, z.null()]);\nconst nullableIsoDateTimeSchema$3 = z.union([ISO_DATE_TIME_SCHEMA$5, z.null()]);\nconst nullableControllerKindSchema = z.union([z.enum([\"builtin\", \"custom\"]), z.null()]);\nfunction validateRuntimeProfileIdForMemberKind(input) {\n\tif ((input.profileKind === \"human\" ? uuidProfileIdSchema : agentProfileIdSchema).safeParse(input.profileId).success) return;\n\tinput.ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: input.profileKind === \"human\" ? \"human profileId must be a UUID\" : \"agent profileId must use agt_<UUID>\",\n\t\tpath: input.path\n\t});\n}\nconst spaceMemberKindSchema = z.enum([\"human\", \"agent\"]);\nconst spaceMemberStatusSchema = z.enum([\"active\", \"removed\"]);\nconst spaceMemberSourceSchema = z.enum([\n\t\"space_creator\",\n\t\"joined_directly\",\n\t\"added_by_member\",\n\t\"backfilled\"\n]);\nconst spaceMemberAgentExecutionReadinessSchema = agentExecutionReadinessSchema;\nconst spaceMemberAgentPublicReplyPresenceSchema = z.strictObject({\n\tlabel: nullableTrimmedStringSchema$5.optional(),\n\tstatus: z.enum([\n\t\t\"ready\",\n\t\t\"offline\",\n\t\t\"unavailable\",\n\t\t\"unknown\"\n\t])\n});\nconst spaceMemberAgentViewerLocalControlSchema = z.strictObject({\n\tagentExecutionReadiness: spaceMemberAgentExecutionReadinessSchema,\n\tdaemonRouteObservation: daemonRouteObservationSummarySchema\n});\nconst baseSpaceMemberSnapshotSchema = z.strictObject({\n\tprofileId: profileIdSchema,\n\tprofileName: trimmedNonEmptyStringSchema$6,\n\tprofileKind: spaceMemberKindSchema,\n\tstatus: spaceMemberStatusSchema,\n\tmemberSource: spaceMemberSourceSchema,\n\tmemberSourceLabel: trimmedNonEmptyStringSchema$6,\n\taddedAt: ISO_DATE_TIME_SCHEMA$5,\n\tremovedAt: nullableIsoDateTimeSchema$3,\n\tcreatedAt: ISO_DATE_TIME_SCHEMA$5,\n\tupdatedAt: ISO_DATE_TIME_SCHEMA$5,\n\taddedByProfileId: nullableRuntimeProfileIdSchema,\n\taddedByOwnerUserId: nullableTrimmedStringSchema$5,\n\taddedByDisplayName: nullableTrimmedStringSchema$5,\n\tremovedByProfileId: nullableRuntimeProfileIdSchema,\n\tremovedByOwnerUserId: nullableTrimmedStringSchema$5,\n\tremovalReason: nullableTrimmedStringSchema$5,\n\tfirstEnteredAt: nullableIsoDateTimeSchema$3,\n\tlastEnteredAt: nullableIsoDateTimeSchema$3,\n\tlastSeenAt: nullableIsoDateTimeSchema$3,\n\tlastSeenLabel: nullableTrimmedStringSchema$5,\n\tliveNow: z.boolean()\n});\nconst spaceMemberHumanSnapshotSchema = baseSpaceMemberSnapshotSchema.extend({\n\tprofileKind: z.literal(\"human\"),\n\tmentionAlias: nullableTrimmedStringSchema$5,\n\townerUserId: nullableTrimmedStringSchema$5,\n\townerName: nullableTrimmedStringSchema$5\n}).superRefine((value, ctx) => {\n\tvalidateRuntimeProfileIdForMemberKind({\n\t\tprofileId: value.profileId,\n\t\tprofileKind: \"human\",\n\t\tctx,\n\t\tpath: [\"profileId\"]\n\t});\n});\nconst spaceMemberAgentSnapshotSchema = baseSpaceMemberSnapshotSchema.extend({\n\tprofileKind: z.literal(\"agent\"),\n\tmentionAlias: nullableTrimmedStringSchema$5,\n\townerUserId: nullableTrimmedStringSchema$5,\n\townerName: nullableTrimmedStringSchema$5,\n\tcontrollerKind: nullableControllerKindSchema,\n\tcontrollerRef: nullableTrimmedStringSchema$5,\n\truntimeDeviceDisplayName: nullableTrimmedStringSchema$5.optional(),\n\tagentContextId: nullableTrimmedStringSchema$5,\n\tupstreamConversation: nullableUpstreamConversationRefSchema.optional(),\n\tworkingDirectory: profileWorkingDirectorySchema.nullable().optional(),\n\tpublicReplyPresence: spaceMemberAgentPublicReplyPresenceSchema.optional(),\n\tviewerLocalControl: z.union([spaceMemberAgentViewerLocalControlSchema, z.null()]).optional(),\n\tagentExecutionReadiness: spaceMemberAgentExecutionReadinessSchema.optional(),\n\tdaemonRouteObservation: daemonRouteObservationSummarySchema.optional()\n}).superRefine((value, ctx) => {\n\tvalidateRuntimeProfileIdForMemberKind({\n\t\tprofileId: value.profileId,\n\t\tprofileKind: \"agent\",\n\t\tctx,\n\t\tpath: [\"profileId\"]\n\t});\n\tconst hasViewerLocalControl = value.viewerLocalControl !== void 0 && value.viewerLocalControl !== null;\n\tconst hasLegacyLocalControlFacts = value.agentExecutionReadiness !== void 0 || value.daemonRouteObservation !== void 0;\n\tif (!(hasViewerLocalControl || !hasLegacyLocalControlFacts)) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"agent local control facts require viewerLocalControl for owner-scoped member projections\",\n\t\tpath: [\"viewerLocalControl\"]\n\t});\n});\nconst spaceMembersSummarySchema = z.strictObject({\n\ttotalCount: z.number().int().min(0),\n\thumanCount: z.number().int().min(0),\n\tagentCount: z.number().int().min(0),\n\tliveNowCount: z.number().int().min(0),\n\twakeableAgentCount: z.number().int().min(0),\n\tofflineAgentCount: z.number().int().min(0)\n});\nconst spaceMembersSnapshotSchema = z.strictObject({\n\tspaceId: trimmedNonEmptyStringSchema$6,\n\tgeneratedAt: ISO_DATE_TIME_SCHEMA$5,\n\tsummary: spaceMembersSummarySchema,\n\thumans: z.array(spaceMemberHumanSnapshotSchema),\n\tagents: z.array(spaceMemberAgentSnapshotSchema)\n}).superRefine((value, ctx) => {\n\tconst totalCount = value.humans.length + value.agents.length;\n\tconst liveNowCount = [...value.humans, ...value.agents].filter((item) => item.liveNow).length;\n\tconst wakeableAgentCount = value.agents.filter(isWakeableAgent).length;\n\tconst offlineAgentCount = value.agents.length - wakeableAgentCount;\n\taddSummaryMismatchIssue({\n\t\tctx,\n\t\tactual: totalCount,\n\t\texpected: value.summary.totalCount,\n\t\tpath: [\"summary\", \"totalCount\"],\n\t\tlabel: \"totalCount\"\n\t});\n\taddSummaryMismatchIssue({\n\t\tctx,\n\t\tactual: value.humans.length,\n\t\texpected: value.summary.humanCount,\n\t\tpath: [\"summary\", \"humanCount\"],\n\t\tlabel: \"humanCount\"\n\t});\n\taddSummaryMismatchIssue({\n\t\tctx,\n\t\tactual: value.agents.length,\n\t\texpected: value.summary.agentCount,\n\t\tpath: [\"summary\", \"agentCount\"],\n\t\tlabel: \"agentCount\"\n\t});\n\taddSummaryMismatchIssue({\n\t\tctx,\n\t\tactual: liveNowCount,\n\t\texpected: value.summary.liveNowCount,\n\t\tpath: [\"summary\", \"liveNowCount\"],\n\t\tlabel: \"liveNowCount\"\n\t});\n\taddSummaryMismatchIssue({\n\t\tctx,\n\t\tactual: wakeableAgentCount,\n\t\texpected: value.summary.wakeableAgentCount,\n\t\tpath: [\"summary\", \"wakeableAgentCount\"],\n\t\tlabel: \"wakeableAgentCount\"\n\t});\n\taddSummaryMismatchIssue({\n\t\tctx,\n\t\tactual: offlineAgentCount,\n\t\texpected: value.summary.offlineAgentCount,\n\t\tpath: [\"summary\", \"offlineAgentCount\"],\n\t\tlabel: \"offlineAgentCount\"\n\t});\n});\nfunction isWakeableAgent(item) {\n\treturn item.publicReplyPresence?.status === \"ready\";\n}\nconst spaceViewerMembershipProfileSchema = z.strictObject({\n\tprofileId: profileIdSchema,\n\tprofileKind: spaceMemberKindSchema,\n\tprofileName: trimmedNonEmptyStringSchema$6,\n\tlastEnteredAt: nullableIsoDateTimeSchema$3\n});\nconst spaceViewerMembershipResponseSchema = z.strictObject({\n\tspaceId: trimmedNonEmptyStringSchema$6,\n\tactiveMemberProfiles: z.array(spaceViewerMembershipProfileSchema),\n\tpreferredOpenProfileId: nullableRuntimeProfileIdSchema\n});\nconst postSpaceMembersBodySchema = z.strictObject({ memberProfileIds: z.array(profileIdSchema).min(1).max(MAX_SPACE_MEMBERS_BATCH_SIZE) });\nconst removeSpaceMembersBodySchema = z.strictObject({ memberProfileIds: z.array(profileIdSchema).min(1).max(MAX_SPACE_MEMBERS_BATCH_SIZE) });\nconst resolvedSpaceMemberProfileSchema = z.strictObject({\n\tprofileId: profileIdSchema,\n\tprofileName: trimmedNonEmptyStringSchema$6,\n\tprofileKind: spaceMemberKindSchema,\n\townerUserId: nullableTrimmedStringSchema$5,\n\townerName: nullableTrimmedStringSchema$5,\n\tcontrollerKind: nullableControllerKindSchema,\n\tcontrollerRef: nullableTrimmedStringSchema$5\n}).superRefine((value, ctx) => {\n\tvalidateRuntimeProfileIdForMemberKind({\n\t\tprofileId: value.profileId,\n\t\tprofileKind: value.profileKind,\n\t\tctx,\n\t\tpath: [\"profileId\"]\n\t});\n});\nconst postResolvedSpaceMembersBodySchema = z.strictObject({ members: z.array(resolvedSpaceMemberProfileSchema).min(1).max(MAX_SPACE_MEMBERS_BATCH_SIZE) });\nconst postSpaceMembersResponseSchema = z.strictObject({\n\taddedMemberIds: z.array(profileIdSchema),\n\talreadyMemberIds: z.array(profileIdSchema),\n\titems: z.array(z.union([spaceMemberHumanSnapshotSchema, spaceMemberAgentSnapshotSchema]))\n});\nconst removeSpaceMembersResponseSchema = z.strictObject({\n\tremovedMemberIds: z.array(profileIdSchema),\n\talreadyAbsentMemberIds: z.array(profileIdSchema)\n});\nconst leaveSpaceResponseSchema = z.strictObject({\n\tleftProfileId: profileIdSchema,\n\tstatus: z.enum([\"left\", \"already_absent\"])\n});\nfunction addSummaryMismatchIssue(input) {\n\tif (input.actual === input.expected) return;\n\tinput.ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: `${input.label} must match derived member counts`,\n\t\tpath: input.path\n\t});\n}\n\n//#endregion\n//#region src/schemas/agent-view/space-members.ts\nconst spaceMembersEventSchema = z.strictObject({\n\ttype: z.literal(\"system.space.members\"),\n\tpayload: spaceMembersSnapshotSchema\n});\n\n//#endregion\n//#region src/schemas/agent-view/structured-guide.ts\nconst STRUCTURED_GUIDE_SCHEMA_VERSION = 1;\nconst dualViewGuideInputSchema = z.strictObject({\n\tsummary: z.string().min(1),\n\thumanSteps: z.array(z.string()),\n\tagentRequiredArgs: z.array(z.string()).optional(),\n\tagentOptionalArgs: z.array(z.string()).optional(),\n\tagentCommands: z.array(z.string()).optional(),\n\tnotes: z.array(z.string()).optional()\n});\nconst structuredGuidePayloadSchema = z.strictObject({\n\tschemaVersion: z.literal(STRUCTURED_GUIDE_SCHEMA_VERSION),\n\tsummary: z.string().min(1),\n\tforAgents: z.strictObject({\n\t\trequiredArguments: z.array(z.string()),\n\t\toptionalArguments: z.array(z.string()),\n\t\tcommands: z.array(z.string()),\n\t\tnotes: z.array(z.string())\n\t}),\n\tforHumans: z.strictObject({ steps: z.array(z.string()) })\n});\n/**\n* Builds a stable structured payload:\n* optional agent arrays are normalized to `[]`, and schemaVersion is always present.\n*/\nconst structuredGuidePayloadFromInputSchema = dualViewGuideInputSchema.transform((guide) => ({\n\tschemaVersion: STRUCTURED_GUIDE_SCHEMA_VERSION,\n\tsummary: guide.summary,\n\tforAgents: {\n\t\trequiredArguments: guide.agentRequiredArgs ?? [],\n\t\toptionalArguments: guide.agentOptionalArgs ?? [],\n\t\tcommands: guide.agentCommands ?? [],\n\t\tnotes: guide.notes ?? []\n\t},\n\tforHumans: { steps: guide.humanSteps }\n})).pipe(structuredGuidePayloadSchema);\n\n//#endregion\n//#region src/schemas/common/error-response.ts\nconst commonErrorSchema = z.strictObject({\n\tcode: z.string().min(1),\n\tmessage: z.string().min(1),\n\trequestId: z.string().min(1).optional(),\n\tdetails: z.unknown().optional()\n});\nconst errorResponseSchema = z.strictObject({\n\tok: z.literal(false),\n\terror: commonErrorSchema,\n\trequestId: z.string().min(1).optional()\n});\n\n//#endregion\n//#region src/schemas/http/space-route-params.ts\nconst spaceRouteParamsSchema = z.strictObject({ spaceId: nonEmptyTrimmedStringFromUnknown });\n\n//#endregion\n//#region src/schemas/http/space-conversation-status.ts\nconst isoDateTimeSchema$3 = z.iso.datetime({ offset: true });\nconst nullableNonEmptyStringSchema$2 = z.union([z.string().min(1), z.null()]);\nconst spaceConversationUpstreamConversationBindingMissingSchema = z.strictObject({\n\tstatus: z.literal(\"missing\"),\n\tbindingSource: z.null(),\n\tconversationRef: z.null(),\n\tcontrollerRef: z.null(),\n\ttransportMode: z.null()\n});\nconst spaceConversationUpstreamConversationBindingPresentSchema = z.strictObject({\n\tstatus: z.literal(\"present\"),\n\tbindingSource: conversationBindingSourceSchema,\n\tconversationRef: upstreamConversationRefSchema,\n\tcontrollerRef: z.string().min(1),\n\ttransportMode: runtimeTransportModeSchema\n});\nconst spaceConversationUpstreamConversationBindingSchema = z.discriminatedUnion(\"status\", [spaceConversationUpstreamConversationBindingMissingSchema, spaceConversationUpstreamConversationBindingPresentSchema]);\nconst spaceConversationLocalRuntimeContextStatusSchema = z.enum([\n\t\"missing\",\n\t\"mismatch\",\n\t\"ready\"\n]);\nconst spaceConversationLocalRuntimeContextSchema = z.strictObject({\n\tagentContextLookupKey: z.string().min(1),\n\truntimeWorkspaceFingerprint: nullableNonEmptyStringSchema$2,\n\tstatus: spaceConversationLocalRuntimeContextStatusSchema\n});\nconst spaceConversationLiveResumeCheckStatusSchema = z.enum([\n\t\"failed\",\n\t\"not_run\",\n\t\"passed\",\n\t\"skipped\"\n]);\nconst spaceConversationLiveResumeCheckSchema = z.strictObject({\n\tcheckedAt: z.union([isoDateTimeSchema$3, z.null()]),\n\terrorCode: nullableNonEmptyStringSchema$2,\n\terrorMessage: nullableNonEmptyStringSchema$2,\n\terrorType: nullableNonEmptyStringSchema$2,\n\tmessage: z.string().min(1),\n\tstatus: spaceConversationLiveResumeCheckStatusSchema\n});\nconst spaceConversationRuntimeWorkspaceSchema = z.strictObject({\n\tconfigPath: z.string().min(1),\n\tconfiguredWorkspacePath: nullableNonEmptyStringSchema$2,\n\tfingerprint: nullableNonEmptyStringSchema$2,\n\tpath: nullableNonEmptyStringSchema$2,\n\treasonCode: nullableNonEmptyStringSchema$2,\n\treasonText: nullableNonEmptyStringSchema$2,\n\tstatus: z.enum([\n\t\t\"ready\",\n\t\t\"missing\",\n\t\t\"invalid\"\n\t]),\n\tworkspaceMode: z.union([profileWorkspaceModeSchema, z.null()])\n});\nconst spaceConversationLatestRemoteObservationMissingSchema = z.strictObject({\n\tagentContextId: z.null(),\n\tbootstrap: z.null(),\n\tdispatchId: z.null(),\n\tlastDispatchExecution: z.null(),\n\tlastRuntimeWorkspaceFingerprint: z.null(),\n\tlastRuntimeWorkspacePath: z.null(),\n\tobservedAt: z.null(),\n\tstatus: z.literal(\"missing\"),\n\tupstreamConversation: z.null()\n});\nconst spaceConversationLatestRemoteObservationObservedSchema = z.strictObject({\n\tagentContextId: nullableNonEmptyStringSchema$2,\n\tbootstrap: z.union([z.strictObject({\n\t\treason: z.null(),\n\t\tstatus: z.literal(\"applied\")\n\t}), z.strictObject({\n\t\treason: z.string().min(1),\n\t\tstatus: z.literal(\"pending\")\n\t})]),\n\tdispatchId: z.string().min(1),\n\tlastDispatchExecution: dispatchExecutionSchema,\n\tlastRuntimeWorkspaceFingerprint: nullableNonEmptyStringSchema$2,\n\tlastRuntimeWorkspacePath: nullableNonEmptyStringSchema$2,\n\tobservedAt: isoDateTimeSchema$3,\n\tstatus: z.literal(\"observed\"),\n\tupstreamConversation: z.union([upstreamConversationRefSchema, z.null()])\n});\nconst spaceConversationLatestRemoteObservationSchema = z.discriminatedUnion(\"status\", [spaceConversationLatestRemoteObservationMissingSchema, spaceConversationLatestRemoteObservationObservedSchema]);\nconst spaceConversationWakeReadinessSchema = z.enum([\n\t\"blocked\",\n\t\"needs_validate\",\n\t\"ready\"\n]);\nconst getSpaceConversationStatusInputSchema = spaceRouteParamsSchema.extend({\n\tagentProfileId: agentProfileIdSchema,\n\tvalidate: z.boolean().optional()\n});\nconst getSpaceConversationRemoteStatusInputSchema = spaceRouteParamsSchema.extend({ agentProfileId: agentProfileIdSchema });\nconst getSpaceConversationStatusResponseSchema = z.strictObject({\n\tlatestRemoteObservation: spaceConversationLatestRemoteObservationSchema,\n\tlocalRuntimeContext: spaceConversationLocalRuntimeContextSchema,\n\tliveResumeCheck: spaceConversationLiveResumeCheckSchema,\n\tnextDispatchPlan: nextDispatchPlanSchema.nullable(),\n\tprofileId: agentProfileIdSchema,\n\tprofileName: profileLabelSchema,\n\truntimeWorkspace: spaceConversationRuntimeWorkspaceSchema,\n\tspaceId: nonEmptyTrimmedStringFromUnknown,\n\tupstreamConversationBinding: spaceConversationUpstreamConversationBindingSchema,\n\tvalidate: z.boolean(),\n\twakeReadiness: spaceConversationWakeReadinessSchema\n});\nconst getSpaceConversationRemoteStatusResponseSchema = z.strictObject({\n\tcurrentUpstreamConversationBinding: z.union([conversationBindingRecordSchema, z.null()]),\n\tlatestRemoteObservation: spaceConversationLatestRemoteObservationSchema,\n\tprofileId: agentProfileIdSchema,\n\tspaceId: nonEmptyTrimmedStringFromUnknown\n});\n\n//#endregion\n//#region src/schemas/daemon/provider-runtime-context.ts\nconst providerDispatchRuntimeContextSchema = z.strictObject({ providerRuntimeWorkingDirectory: z.string().trim().min(1).max(MAX_PROFILE_WORKING_DIRECTORY_LENGTH).refine((value) => !value.includes(\"\\0\"), { message: \"providerRuntimeWorkingDirectory must not contain NUL bytes\" }) });\n\n//#endregion\n//#region src/schemas/daemon/control-plane.ts\nconst ATSD_CONTROL_PLANE_SCHEMA_VERSION = 1;\nconst atsdControlPlaneCommandSchema = z.enum([\n\t\"status\",\n\t\"health\",\n\t\"history\",\n\t\"interrupt\",\n\t\"cancel\",\n\t\"bind_imported_upstream_conversation\",\n\t\"clear_imported_upstream_conversation_local_state\",\n\t\"conversation_execution_status\",\n\t\"sync_route_catalog\",\n\t\"shutdown\"\n]);\nconst atsdHealthStateSchema = z.enum([\n\t\"ok\",\n\t\"degraded\",\n\t\"down\"\n]);\nconst atsdRuntimeHealthStateSchema = z.enum([\n\t\"healthy\",\n\t\"idle\",\n\t\"suspect\",\n\t\"down\"\n]);\nconst atsdControlTargetSelectorSchema = z.discriminatedUnion(\"by\", [z.strictObject({\n\tby: z.literal(\"dispatch\"),\n\tdispatchId: z.string().min(1)\n}), z.strictObject({\n\tby: z.literal(\"task\"),\n\ttaskId: z.string().min(1)\n})]);\nconst atsdInterruptRequestPayloadSchema = z.strictObject({\n\ttarget: atsdControlTargetSelectorSchema,\n\treason: z.string().min(1).optional()\n});\nconst atsdCancelRequestPayloadSchema = z.strictObject({\n\ttarget: atsdControlTargetSelectorSchema,\n\treason: z.string().min(1).optional()\n});\nconst atsdShutdownRequestPayloadSchema = z.strictObject({\n\tmode: z.enum([\"graceful\", \"force\"]).default(\"graceful\"),\n\tgracePeriodMs: z.number().int().nonnegative().default(5e3)\n});\nconst atsdConversationExecutionControllerKindSchema = z.enum([\"builtin\", \"custom\"]);\nconst atsdConversationExecutionControllerLaunchStatusSchema = z.enum([\n\t\"missing\",\n\t\"disabled\",\n\t\"repair_required\",\n\t\"ready\"\n]);\nconst nullableControllerRefSchema = z.union([z.string().min(1), z.null()]);\nconst nullableNonEmptyStringSchema$1 = z.union([z.string().min(1), z.null()]);\nconst atsdConversationExecutionStatusRequestPayloadSchema = z.strictObject({\n\tboundControllerRef: nullableControllerRefSchema,\n\tboundUpstreamConversationRef: upstreamConversationRefSchema.nullable(),\n\tcontrollerKind: atsdConversationExecutionControllerKindSchema,\n\tcontrollerRef: z.string().min(1),\n\tspaceId: nonEmptyTrimmedStringFromUnknown,\n\ttargetProfileId: agentProfileIdSchema,\n\ttransportMode: runtimeTransportModeSchema,\n\tvalidate: z.boolean()\n});\nconst atsdBindImportedUpstreamConversationRequestPayloadSchema = z.strictObject({\n\tcontrollerKind: atsdConversationExecutionControllerKindSchema,\n\tcontrollerRef: z.string().min(1),\n\tupstreamConversationRef: upstreamConversationRefSchema,\n\tspaceId: nonEmptyTrimmedStringFromUnknown,\n\ttargetProfileId: agentProfileIdSchema,\n\ttransportMode: runtimeTransportModeSchema\n});\nconst atsdClearImportedUpstreamConversationLocalStateRequestPayloadSchema = z.strictObject({\n\tcontrollerKind: atsdConversationExecutionControllerKindSchema,\n\tcontrollerRef: z.string().min(1),\n\tspaceId: nonEmptyTrimmedStringFromUnknown,\n\ttargetProfileId: agentProfileIdSchema,\n\ttransportMode: runtimeTransportModeSchema\n});\nconst atsdSyncRouteCatalogRequestPayloadSchema = z.strictObject({ reason: z.string().min(1) });\nconst atsdConversationExecutionRuntimeWorkspaceReadySchema = z.strictObject({\n\tconfigPath: z.string().min(1),\n\tconfiguredWorkspacePath: z.string().min(1),\n\tfingerprint: z.string().min(1),\n\tpath: z.string().min(1),\n\treasonCode: z.null(),\n\treasonText: z.null(),\n\truntimeContext: providerDispatchRuntimeContextSchema,\n\tstatus: z.literal(\"ready\"),\n\tworkspaceMode: profileWorkspaceModeSchema\n});\nconst atsdConversationExecutionRuntimeWorkspaceMissingSchema = z.strictObject({\n\tconfigPath: z.string().min(1),\n\tconfiguredWorkspacePath: z.null(),\n\tfingerprint: z.null(),\n\tpath: z.null(),\n\treasonCode: z.literal(\"workspace.missing\"),\n\treasonText: z.string().min(1),\n\truntimeContext: z.null(),\n\tstatus: z.literal(\"missing\"),\n\tworkspaceMode: z.null()\n});\nconst atsdConversationExecutionRuntimeWorkspaceInvalidSchema = z.strictObject({\n\tconfigPath: z.string().min(1),\n\tconfiguredWorkspacePath: z.union([z.string().min(1), z.null()]),\n\tfingerprint: z.null(),\n\tpath: z.null(),\n\treasonCode: z.literal(\"workspace.invalid\"),\n\treasonText: z.string().min(1),\n\truntimeContext: z.null(),\n\tstatus: z.literal(\"invalid\"),\n\tworkspaceMode: z.union([profileWorkspaceModeSchema, z.null()])\n});\nconst atsdConversationExecutionRuntimeWorkspaceSchema = z.discriminatedUnion(\"status\", [\n\tatsdConversationExecutionRuntimeWorkspaceReadySchema,\n\tatsdConversationExecutionRuntimeWorkspaceMissingSchema,\n\tatsdConversationExecutionRuntimeWorkspaceInvalidSchema\n]);\nconst atsdConversationExecutionStatusPayloadSchema = z.strictObject({\n\tagentContextLookupKey: z.string().min(1),\n\tcontrollerLaunchStatus: atsdConversationExecutionControllerLaunchStatusSchema,\n\texecutionState: conversationExecutionStateSchema.nullable(),\n\tlocalRuntimeContext: z.strictObject({\n\t\tagentContextLookupKey: z.string().min(1),\n\t\truntimeWorkspaceFingerprint: nullableNonEmptyStringSchema$1,\n\t\tstatus: spaceConversationLocalRuntimeContextStatusSchema\n\t}),\n\tliveResumeCheck: spaceConversationLiveResumeCheckSchema,\n\truntimeWorkspace: atsdConversationExecutionRuntimeWorkspaceSchema\n});\nconst atsdBindImportedUpstreamConversationPayloadSchema = z.strictObject({\n\tagentContextId: z.string().min(1),\n\tagentContextLookupKey: z.string().min(1)\n});\nconst atsdClearImportedUpstreamConversationLocalStatePayloadSchema = z.strictObject({ removedLocalRuntimeContextsCount: z.number().int().min(0) });\nconst atsdSyncRouteCatalogStatusSchema = z.enum([\n\t\"changed\",\n\t\"registered\",\n\t\"unchanged\",\n\t\"failed\",\n\t\"deferred\"\n]);\nconst DAEMON_PROFILE_SKIP_REASON_VALUES = [\n\t\"projection.missing\",\n\t\"controller.registry.disabled\",\n\t\"controller.launch.needs_repair\",\n\t\"runtime.adapter.unsupported\",\n\t\"controller.binding.disabled\",\n\t\"controller.binding.incomplete\",\n\t\"profile.status.inactive\",\n\t\"profile.binding.unbound\",\n\t\"workspace.missing\",\n\t\"workspace.invalid\"\n];\nconst daemonProfileSkipReasonSchema = z.enum(DAEMON_PROFILE_SKIP_REASON_VALUES);\nconst skippedDaemonProfileSchema = z.strictObject({\n\tprofileId: agentProfileIdSchema,\n\tprofileName: nullableNonEmptyStringSchema$1,\n\tskipReason: daemonProfileSkipReasonSchema\n});\nconst atsdSyncRouteCatalogPayloadSchema = z.strictObject({\n\taccepted: z.boolean(),\n\tsyncStatus: atsdSyncRouteCatalogStatusSchema,\n\tprofileIds: z.array(agentProfileIdSchema),\n\taddedProfileIds: z.array(agentProfileIdSchema).optional(),\n\tkeptProfileIds: z.array(agentProfileIdSchema).optional(),\n\tremovedProfileIds: z.array(agentProfileIdSchema).optional(),\n\tskippedProfiles: z.array(skippedDaemonProfileSchema).optional(),\n\tnote: z.string().min(1).optional(),\n\terrorMessage: z.string().min(1).optional()\n});\nconst atsdControlPlaneRequestBaseSchema = z.strictObject({\n\tv: z.literal(ATSD_CONTROL_PLANE_SCHEMA_VERSION),\n\trequestId: z.string().min(1).optional(),\n\tauthToken: z.string().min(1).optional()\n});\nconst atsdControlPlaneRequestSchema = z.discriminatedUnion(\"command\", [\n\tatsdControlPlaneRequestBaseSchema.extend({ command: z.literal(\"status\") }),\n\tatsdControlPlaneRequestBaseSchema.extend({ command: z.literal(\"health\") }),\n\tatsdControlPlaneRequestBaseSchema.extend({ command: z.literal(\"history\") }),\n\tatsdControlPlaneRequestBaseSchema.extend({\n\t\tcommand: z.literal(\"interrupt\"),\n\t\tpayload: atsdInterruptRequestPayloadSchema\n\t}),\n\tatsdControlPlaneRequestBaseSchema.extend({\n\t\tcommand: z.literal(\"cancel\"),\n\t\tpayload: atsdCancelRequestPayloadSchema\n\t}),\n\tatsdControlPlaneRequestBaseSchema.extend({\n\t\tcommand: z.literal(\"bind_imported_upstream_conversation\"),\n\t\tpayload: atsdBindImportedUpstreamConversationRequestPayloadSchema\n\t}),\n\tatsdControlPlaneRequestBaseSchema.extend({\n\t\tcommand: z.literal(\"clear_imported_upstream_conversation_local_state\"),\n\t\tpayload: atsdClearImportedUpstreamConversationLocalStateRequestPayloadSchema\n\t}),\n\tatsdControlPlaneRequestBaseSchema.extend({\n\t\tcommand: z.literal(\"conversation_execution_status\"),\n\t\tpayload: atsdConversationExecutionStatusRequestPayloadSchema\n\t}),\n\tatsdControlPlaneRequestBaseSchema.extend({\n\t\tcommand: z.literal(\"sync_route_catalog\"),\n\t\tpayload: atsdSyncRouteCatalogRequestPayloadSchema\n\t}),\n\tatsdControlPlaneRequestBaseSchema.extend({\n\t\tcommand: z.literal(\"shutdown\"),\n\t\tpayload: atsdShutdownRequestPayloadSchema.optional()\n\t})\n]);\nconst atsdStatusPayloadSchema = z.strictObject({\n\tinstalled: z.boolean(),\n\trunning: z.boolean(),\n\tdaemonVersion: z.string().min(1),\n\truntimeRoot: z.string().min(1),\n\tcheckedAt: z.string().min(1)\n});\nconst atsdHealthPayloadSchema = z.strictObject({\n\tstate: atsdHealthStateSchema,\n\truntimeState: atsdRuntimeHealthStateSchema.optional(),\n\treasonCode: z.string().min(1),\n\tcheckedAt: z.string().min(1)\n});\nconst atsdHistoryEntrySchema = z.strictObject({\n\tid: z.string().min(1),\n\tts: z.string().min(1),\n\tcode: z.string().min(1),\n\tmessage: z.string().min(1)\n});\nconst atsdHistoryPayloadSchema = z.strictObject({\n\tentries: z.array(atsdHistoryEntrySchema),\n\tnextCursor: z.string().min(1).optional()\n});\nconst atsdInterruptPayloadSchema = z.strictObject({\n\taccepted: z.boolean(),\n\ttarget: atsdControlTargetSelectorSchema,\n\tresolvedDispatchId: z.string().min(1).optional(),\n\tresolvedTaskId: z.string().min(1).optional(),\n\tnote: z.string().min(1).optional()\n});\nconst atsdCancelPayloadSchema = z.strictObject({\n\taccepted: z.boolean(),\n\ttarget: atsdControlTargetSelectorSchema,\n\tresolvedDispatchId: z.string().min(1).optional(),\n\tresolvedTaskId: z.string().min(1).optional(),\n\tnote: z.string().min(1).optional()\n});\nconst atsdControlPlaneErrorPayloadSchema = z.strictObject({\n\terrorCode: z.string().min(1),\n\terrorMessage: z.string().min(1),\n\tnote: z.string().min(1).optional()\n});\nconst atsdShutdownPayloadSchema = z.strictObject({\n\taccepted: z.boolean(),\n\tmode: z.enum([\"graceful\", \"force\"]),\n\tgracePeriodMs: z.number().int().nonnegative()\n});\nconst atsdControlPlaneResponseBaseSchema = z.strictObject({\n\tv: z.literal(ATSD_CONTROL_PLANE_SCHEMA_VERSION),\n\trequestId: z.string().min(1).optional()\n});\nconst atsdStatusResponseSchema = atsdControlPlaneResponseBaseSchema.extend({\n\tcode: z.literal(\"service.status\"),\n\tpayload: atsdStatusPayloadSchema\n});\nconst atsdHealthResponseSchema = atsdControlPlaneResponseBaseSchema.extend({\n\tcode: z.literal(\"service.health\"),\n\tpayload: atsdHealthPayloadSchema\n});\nconst atsdHistoryResponseSchema = atsdControlPlaneResponseBaseSchema.extend({\n\tcode: z.literal(\"service.history\"),\n\tpayload: atsdHistoryPayloadSchema\n});\nconst atsdInterruptResponseSchema = atsdControlPlaneResponseBaseSchema.extend({\n\tcode: z.literal(\"service.interrupt\"),\n\tpayload: atsdInterruptPayloadSchema\n});\nconst atsdCancelResponseSchema = atsdControlPlaneResponseBaseSchema.extend({\n\tcode: z.literal(\"service.cancel\"),\n\tpayload: atsdCancelPayloadSchema\n});\nconst atsdConversationExecutionStatusResponseSchema = atsdControlPlaneResponseBaseSchema.extend({\n\tcode: z.literal(\"service.conversation_execution_status\"),\n\tpayload: atsdConversationExecutionStatusPayloadSchema\n});\nconst atsdBindImportedUpstreamConversationResponseSchema = atsdControlPlaneResponseBaseSchema.extend({\n\tcode: z.literal(\"service.bind_imported_upstream_conversation\"),\n\tpayload: atsdBindImportedUpstreamConversationPayloadSchema\n});\nconst atsdClearImportedUpstreamConversationLocalStateResponseSchema = atsdControlPlaneResponseBaseSchema.extend({\n\tcode: z.literal(\"service.clear_imported_upstream_conversation_local_state\"),\n\tpayload: atsdClearImportedUpstreamConversationLocalStatePayloadSchema\n});\nconst atsdSyncRouteCatalogResponseSchema = atsdControlPlaneResponseBaseSchema.extend({\n\tcode: z.literal(\"service.sync_route_catalog\"),\n\tpayload: atsdSyncRouteCatalogPayloadSchema\n});\nconst atsdShutdownResponseSchema = atsdControlPlaneResponseBaseSchema.extend({\n\tcode: z.literal(\"service.shutdown\"),\n\tpayload: atsdShutdownPayloadSchema\n});\nconst atsdControlPlaneErrorResponseSchema = atsdControlPlaneResponseBaseSchema.extend({\n\tcode: z.literal(\"service.error\"),\n\tpayload: atsdControlPlaneErrorPayloadSchema\n});\nconst atsdControlPlaneResponseSchema = z.discriminatedUnion(\"code\", [\n\tatsdStatusResponseSchema,\n\tatsdHealthResponseSchema,\n\tatsdHistoryResponseSchema,\n\tatsdInterruptResponseSchema,\n\tatsdCancelResponseSchema,\n\tatsdBindImportedUpstreamConversationResponseSchema,\n\tatsdClearImportedUpstreamConversationLocalStateResponseSchema,\n\tatsdConversationExecutionStatusResponseSchema,\n\tatsdSyncRouteCatalogResponseSchema,\n\tatsdShutdownResponseSchema,\n\tatsdControlPlaneErrorResponseSchema\n]);\n\n//#endregion\n//#region src/schemas/daemon/dispatch-storage-readiness.ts\nconst dispatchStorageReadinessSchema = z.strictObject({\n\tready: z.boolean(),\n\tdetail: z.string().nullable(),\n\tcheckedAt: z.iso.datetime()\n});\n\n//#endregion\n//#region src/schemas/daemon/mention-dispatch-decision.ts\nconst MENTION_DISPATCH_ERROR_CODES = {\n\tbindingDisabled: \"controller.binding.disabled\",\n\tbindingMissing: \"controller.binding.missing\",\n\tdispatchPolicyUnsupported: \"dispatch.policy.unsupported\",\n\tdispatchRulesDenied: \"dispatch.rules.denied\",\n\tinvalidTarget: \"controller.ref.invalid\",\n\tselfTrigger: \"dispatch.blocked.self_trigger\"\n};\nconst DEFAULT_RULE = {\n\truleId: \"registry.default.all_members.v1\",\n\truleReason: \"default allow all members mention\",\n\truleSource: \"registry\"\n};\nconst createDefaultDispatchId = () => {\n\tconst entropy = Math.random().toString(36).slice(2, 10);\n\treturn `dispatch-${Date.now()}-${entropy}`;\n};\nconst normalizeProfileIdForComparison = (value) => String(value ?? \"\").trim();\nconst extractMentionLabels = (text) => {\n\treturn collectCanonicalMentionTextFragments(text).flatMap((fragment) => {\n\t\tif (fragment.parsedLiteral?.type !== \"wake\") return [];\n\t\treturn [fragment.parsedLiteral.name];\n\t});\n};\nconst resolveMentionTargetWithFallback = (input) => {\n\tconst rawMentionLabel = String(input.mentionLabel ?? \"\").trim();\n\tif (rawMentionLabel.length === 0) return null;\n\tconst resolvedTarget = input.resolveMentionTargetLabel(rawMentionLabel);\n\tif (resolvedTarget) return {\n\t\tresolvedTarget,\n\t\tresolvedMentionLabel: rawMentionLabel\n\t};\n\treturn null;\n};\nconst createDecision = (input) => {\n\tconst base = {\n\t\tdispatchId: input.createDispatchId(),\n\t\truleId: input.ruleId,\n\t\truleReason: input.ruleReason,\n\t\truleSource: input.ruleSource,\n\t\tsourceEventId: input.sourceEventId,\n\t\ttargetProfileId: input.targetProfileId\n\t};\n\tif (input.status === \"dispatch_ready\") return {\n\t\t...base,\n\t\tstatus: \"dispatch_ready\"\n\t};\n\treturn {\n\t\t...base,\n\t\terrorCode: input.errorCode ?? MENTION_DISPATCH_ERROR_CODES.invalidTarget,\n\t\tstatus: input.status\n\t};\n};\nconst markSeenOrSkip = (seenKeys, dedupeKey) => {\n\tif (seenKeys.has(dedupeKey)) return true;\n\tseenKeys.add(dedupeKey);\n\treturn false;\n};\nconst buildSystemRuleMetadata = (input) => ({\n\truleId: input.ruleId,\n\truleReason: input.ruleReason,\n\truleSource: \"system\"\n});\nconst resolveEffectiveDispatchRule = (ruleSet) => {\n\tif (ruleSet?.space) return {\n\t\tallow: ruleSet.space.allow,\n\t\truleId: ruleSet.space.ruleId,\n\t\truleReason: ruleSet.space.ruleReason,\n\t\truleSource: \"space\"\n\t};\n\tif (ruleSet?.profile) return {\n\t\tallow: ruleSet.profile.allow,\n\t\truleId: ruleSet.profile.ruleId,\n\t\truleReason: ruleSet.profile.ruleReason,\n\t\truleSource: \"profile\"\n\t};\n\tif (ruleSet?.registry) return {\n\t\tallow: ruleSet.registry.allow,\n\t\truleId: ruleSet.registry.ruleId,\n\t\truleReason: ruleSet.registry.ruleReason,\n\t\truleSource: \"registry\"\n\t};\n\treturn {\n\t\tallow: true,\n\t\truleId: DEFAULT_RULE.ruleId,\n\t\truleReason: DEFAULT_RULE.ruleReason,\n\t\truleSource: DEFAULT_RULE.ruleSource\n\t};\n};\nconst resolveDecisionForMissingTarget = (input) => {\n\tconst dedupeKey = `invalid:${input.missingTargetKind}:${input.mentionLabel}`;\n\tif (markSeenOrSkip(input.seenKeys, dedupeKey)) return null;\n\tconst ruleReason = input.missingTargetKind === \"profile_target\" ? \"profile target cannot be resolved\" : \"mention label cannot be resolved\";\n\treturn createDecision({\n\t\tcreateDispatchId: input.createDispatchId,\n\t\tsourceEventId: input.sourceEventId,\n\t\tstatus: \"failed\",\n\t\ttargetProfileId: input.mentionLabel,\n\t\terrorCode: MENTION_DISPATCH_ERROR_CODES.invalidTarget,\n\t\t...buildSystemRuleMetadata({\n\t\t\truleId: \"system.target_resolution.invalid\",\n\t\t\truleReason\n\t\t})\n\t});\n};\nconst resolveDecisionForTarget = (input) => {\n\tconst targetProfileId = normalizeProfileIdForComparison(input.resolvedTarget.targetProfileId);\n\tconst normalizedTarget = targetProfileId.length > 0 ? targetProfileId : input.mentionLabel;\n\tif (markSeenOrSkip(input.seenKeys, normalizedTarget)) return null;\n\tif (normalizedTarget === input.normalizedSenderProfileId) return createDecision({\n\t\tcreateDispatchId: input.createDispatchId,\n\t\tsourceEventId: input.sourceEventId,\n\t\tstatus: \"blocked\",\n\t\ttargetProfileId: normalizedTarget,\n\t\terrorCode: MENTION_DISPATCH_ERROR_CODES.selfTrigger,\n\t\t...buildSystemRuleMetadata({\n\t\t\truleId: \"system.self_trigger.guard\",\n\t\t\truleReason: \"sender and target are the same profile\"\n\t\t})\n\t});\n\tconst effectiveRule = resolveEffectiveDispatchRule(input.dispatchRules);\n\tif (!effectiveRule.allow) return createDecision({\n\t\tcreateDispatchId: input.createDispatchId,\n\t\tsourceEventId: input.sourceEventId,\n\t\tstatus: \"blocked\",\n\t\ttargetProfileId: normalizedTarget,\n\t\terrorCode: MENTION_DISPATCH_ERROR_CODES.dispatchRulesDenied,\n\t\truleSource: effectiveRule.ruleSource,\n\t\truleId: effectiveRule.ruleId,\n\t\truleReason: effectiveRule.ruleReason\n\t});\n\tif (input.dispatchPolicy !== \"mention_only\") return createDecision({\n\t\tcreateDispatchId: input.createDispatchId,\n\t\tsourceEventId: input.sourceEventId,\n\t\tstatus: \"blocked\",\n\t\ttargetProfileId: normalizedTarget,\n\t\terrorCode: MENTION_DISPATCH_ERROR_CODES.dispatchPolicyUnsupported,\n\t\t...buildSystemRuleMetadata({\n\t\t\truleId: \"system.dispatch_policy.unsupported\",\n\t\t\truleReason: `unsupported dispatchPolicy: ${input.dispatchPolicy}`\n\t\t})\n\t});\n\tif (!input.resolvedTarget.enabled) return createDecision({\n\t\tcreateDispatchId: input.createDispatchId,\n\t\tsourceEventId: input.sourceEventId,\n\t\tstatus: \"failed\",\n\t\ttargetProfileId: normalizedTarget,\n\t\terrorCode: MENTION_DISPATCH_ERROR_CODES.bindingDisabled,\n\t\t...buildSystemRuleMetadata({\n\t\t\truleId: \"system.binding.disabled\",\n\t\t\truleReason: \"target binding exists but is disabled\"\n\t\t})\n\t});\n\tif (input.resolvedTarget.bindingState === \"missing\") return createDecision({\n\t\tcreateDispatchId: input.createDispatchId,\n\t\tsourceEventId: input.sourceEventId,\n\t\tstatus: \"failed\",\n\t\ttargetProfileId: normalizedTarget,\n\t\terrorCode: MENTION_DISPATCH_ERROR_CODES.bindingMissing,\n\t\t...buildSystemRuleMetadata({\n\t\t\truleId: \"system.binding.missing\",\n\t\t\truleReason: \"target profile has no controller binding\"\n\t\t})\n\t});\n\treturn createDecision({\n\t\tcreateDispatchId: input.createDispatchId,\n\t\tsourceEventId: input.sourceEventId,\n\t\tstatus: \"dispatch_ready\",\n\t\ttargetProfileId: normalizedTarget,\n\t\truleSource: effectiveRule.ruleSource,\n\t\truleId: effectiveRule.ruleId,\n\t\truleReason: effectiveRule.ruleReason\n\t});\n};\nconst planMentionDispatchDecisions = (input) => {\n\tconst mentions = extractMentionLabels(input.text);\n\tif (mentions.length === 0) return [];\n\tconst dispatchPolicy = input.dispatchPolicy ?? \"mention_only\";\n\tconst seenKeys = /* @__PURE__ */ new Set();\n\tconst decisions = [];\n\tconst createDispatchId = input.createDispatchId ?? createDefaultDispatchId;\n\tconst normalizedSenderProfileId = normalizeProfileIdForComparison(input.senderProfileId);\n\tfor (const mentionLabel of mentions) {\n\t\tconst resolvedMention = resolveMentionTargetWithFallback({\n\t\t\tmentionLabel,\n\t\t\tresolveMentionTargetLabel: input.resolveMentionTargetLabel\n\t\t});\n\t\tif (!resolvedMention) {\n\t\t\tconst normalizedMissingMentionLabel = String(mentionLabel ?? \"\").trim();\n\t\t\tconst invalidDecision = resolveDecisionForMissingTarget({\n\t\t\t\tcreateDispatchId,\n\t\t\t\tmissingTargetKind: \"mention_label\",\n\t\t\t\tmentionLabel: normalizedMissingMentionLabel.length > 0 ? normalizedMissingMentionLabel : mentionLabel,\n\t\t\t\tseenKeys,\n\t\t\t\tsourceEventId: input.sourceEventId\n\t\t\t});\n\t\t\tif (invalidDecision) decisions.push(invalidDecision);\n\t\t\tcontinue;\n\t\t}\n\t\tconst decision = resolveDecisionForTarget({\n\t\t\tcreateDispatchId,\n\t\t\tdispatchPolicy,\n\t\t\tdispatchRules: input.dispatchRules,\n\t\t\tmentionLabel: resolvedMention.resolvedMentionLabel,\n\t\t\tnormalizedSenderProfileId,\n\t\t\tresolvedTarget: resolvedMention.resolvedTarget,\n\t\t\tseenKeys,\n\t\t\tsourceEventId: input.sourceEventId\n\t\t});\n\t\tif (decision) decisions.push(decision);\n\t}\n\treturn decisions;\n};\nconst planTargetDispatchDecisions = (input) => {\n\tif (input.targetProfileIds.length === 0) return [];\n\tconst dispatchPolicy = input.dispatchPolicy ?? \"mention_only\";\n\tconst seenKeys = /* @__PURE__ */ new Set();\n\tconst decisions = [];\n\tconst createDispatchId = input.createDispatchId ?? createDefaultDispatchId;\n\tconst normalizedSenderProfileId = normalizeProfileIdForComparison(input.senderProfileId);\n\tfor (const targetProfileId of input.targetProfileIds) {\n\t\tconst normalizedTargetProfileId = normalizeProfileIdForComparison(targetProfileId);\n\t\tif (normalizedTargetProfileId.length === 0) continue;\n\t\tconst resolvedTarget = input.resolveTargetProfile(normalizedTargetProfileId);\n\t\tif (!resolvedTarget) {\n\t\t\tconst invalidDecision = resolveDecisionForMissingTarget({\n\t\t\t\tcreateDispatchId,\n\t\t\t\tmissingTargetKind: \"profile_target\",\n\t\t\t\tmentionLabel: normalizedTargetProfileId,\n\t\t\t\tseenKeys,\n\t\t\t\tsourceEventId: input.sourceEventId\n\t\t\t});\n\t\t\tif (invalidDecision) decisions.push(invalidDecision);\n\t\t\tcontinue;\n\t\t}\n\t\tconst decision = resolveDecisionForTarget({\n\t\t\tcreateDispatchId,\n\t\t\tdispatchPolicy,\n\t\t\tdispatchRules: input.dispatchRules,\n\t\t\tmentionLabel: normalizedTargetProfileId,\n\t\t\tnormalizedSenderProfileId,\n\t\t\tresolvedTarget,\n\t\t\tseenKeys,\n\t\t\tsourceEventId: input.sourceEventId\n\t\t});\n\t\tif (decision) decisions.push(decision);\n\t}\n\treturn decisions;\n};\nconst buildMentionDispatchResultEnvelope = (payload) => {\n\tconst parsed = atsdMentionDispatchResultEnvelopeSchema.safeParse({\n\t\tv: ATSD_MENTION_DISPATCH_RESULT_SCHEMA_VERSION,\n\t\tcode: \"service.mention_dispatch_result\",\n\t\tpayload\n\t});\n\tif (!parsed.success) throw new Error(\"invalid mention dispatch result envelope\");\n\treturn parsed.data;\n};\n\n//#endregion\n//#region src/schemas/daemon/profile-identity.ts\nconst nonEmptyTextSchema = z.string().transform((value) => value.trim()).refine((value) => value.length > 0, \"Expected non-blank text\");\nconst ATS_SYSTEM_PROFILE_ID = \"ats-system\";\nconst atsSystemProfileIdSchema = z.literal(ATS_SYSTEM_PROFILE_ID);\nconst atsActorProfileIdSchema = z.union([atsRuntimeProfileIdSchema, atsSystemProfileIdSchema]);\nconst visitedProfileIdsSchema = z.array(atsRuntimeProfileIdSchema).max(256);\nconst atsProfileIdSchema = atsRuntimeProfileIdSchema;\nconst resolvedAtsProfileSchema = z.strictObject({\n\tatsProfileId: atsProfileIdSchema,\n\tprofileKind: profileKindSchema,\n\tprofileName: profileLabelSchema,\n\townerUserId: nonEmptyTextSchema,\n\tprofileHandle: profileHandleSchema.optional(),\n\townerName: profileLabelSchema.optional(),\n\tcontrollerRef: nonEmptyTextSchema.optional()\n});\nconst atsActorContextSchema = z.strictObject({\n\trequestId: nonEmptyTextSchema,\n\tcallerPrincipalId: nonEmptyTextSchema.optional(),\n\tatsProfileId: atsActorProfileIdSchema,\n\tprofileKind: profileKindSchema,\n\tprofileHandle: profileHandleSchema.optional(),\n\tprofileName: profileLabelSchema.optional(),\n\townerUserId: nonEmptyTextSchema.optional(),\n\townerName: profileLabelSchema.optional(),\n\tcontrollerRef: nonEmptyTextSchema.optional(),\n\tdispatchChainId: nonEmptyTextSchema.optional(),\n\tautoRelayDepth: z.number().int().nonnegative().optional(),\n\tvisitedProfileIds: visitedProfileIdsSchema.optional(),\n\tvisitedProfileIdsHash: nonEmptyTextSchema.optional()\n}).superRefine((value, ctx) => {\n\tif (value.profileKind === \"system\") {\n\t\tif (value.atsProfileId !== ATS_SYSTEM_PROFILE_ID) ctx.addIssue({\n\t\t\tcode: \"custom\",\n\t\t\tmessage: \"system actor context must use ats-system as atsProfileId\",\n\t\t\tpath: [\"atsProfileId\"]\n\t\t});\n\t\treturn;\n\t}\n\tif (!atsRuntimeProfileIdSchema.safeParse(value.atsProfileId).success) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"human/agent actor context must use an auth-backed ATS runtime profile ID\",\n\t\tpath: [\"atsProfileId\"]\n\t});\n});\nconst atsRequestContextSchema = z.strictObject({\n\tactorContext: atsActorContextSchema,\n\tagentContextId: nonEmptyTextSchema.optional()\n});\n\n//#endregion\n//#region src/schemas/daemon/reply-readiness.ts\nconst REPLY_READINESS_LEVEL_VALUES = [\n\t\"blocked\",\n\t\"degraded\",\n\t\"ready\",\n\t\"unknown\"\n];\nconst REPLY_READINESS_REASON_CODE_VALUES = [\n\t\"service.not_installed\",\n\t\"service.drifted\",\n\t\"service.not_running\",\n\t\"service.account_mismatch\",\n\t\"service.auth_missing\",\n\t\"service.auth_stale\",\n\t\"dispatch.storage_not_ready\",\n\t\"service.gateway_chain_unhealthy\",\n\t\"profile.not_selected\",\n\t\"profile.inactive\",\n\t\"profile.unbound\",\n\t\"controller.binding.disabled\",\n\t\"projection.missing\",\n\t\"controller.registry.disabled\",\n\t\"controller.launch.choice_required\",\n\t\"controller.launch.needs_repair\",\n\t\"workspace.missing\",\n\t\"workspace.invalid\",\n\t\"runtime.adapter.unsupported\",\n\t\"controller.bootstrap.failed\",\n\t\"controller.gateway.unhealthy\",\n\t\"local_agents.none_needed\",\n\t\"route.offline\",\n\t\"route.not_registered\"\n];\nconst replyReadinessLevelSchema = z.enum(REPLY_READINESS_LEVEL_VALUES);\nconst replyReadinessReasonCodeSchema = z.enum(REPLY_READINESS_REASON_CODE_VALUES);\n\n//#endregion\n//#region src/schemas/daemon/runtime-coordinator-failure-publication-command.ts\nconst RUNTIME_COORDINATOR_FAILURE_PUBLICATION_COMMAND_MODEL_VERSION = \"ats.runtime_coordinator.failure_publication_command.v1\";\nconst boundedIdentifierSchema$4 = z.string().trim().min(1).max(2048);\nconst boundedCommandIdentifierSchema = z.string().trim().min(1).max(4096);\nconst boundedNullableIdentifierSchema$1 = boundedIdentifierSchema$4.nullable();\nconst boundedReasonCodeSchema$1 = z.string().trim().min(1).max(160);\nconst timestampMsSchema$1 = z.number().int().nonnegative();\nconst runtimeCoordinatorFailurePublicationCommandSchema = z.strictObject({\n\tcreatedAtMs: timestampMsSchema$1,\n\tdispatchId: boundedIdentifierSchema$4,\n\tfailurePublicationCommandId: boundedCommandIdentifierSchema,\n\tmodelVersion: z.literal(RUNTIME_COORDINATOR_FAILURE_PUBLICATION_COMMAND_MODEL_VERSION),\n\townerUserId: boundedIdentifierSchema$4,\n\tpublicationCategory: daemonHubRuntimeCoordinatorHeadNoExecutionPublicationCategorySchema,\n\tpublicationIntentId: boundedCommandIdentifierSchema,\n\treasonCode: daemonHubRuntimeCoordinatorHeadNoExecutionReasonCodeSchema,\n\tspaceId: boundedIdentifierSchema$4,\n\ttargetProfileMentionLabel: spaceMentionLabelSchema.nullable(),\n\ttargetProfileId: boundedIdentifierSchema$4,\n\ttargetProfileName: z.string().trim().min(1).max(MAX_PROFILE_NAME_LENGTH).nullable(),\n\ttargetWakeLifecycleIdentity: targetWakeLifecycleIdentitySchema,\n\ttargetWakeLifecycleId: boundedCommandIdentifierSchema,\n\tuserRecoveryAction: daemonHubRuntimeCoordinatorHeadNoExecutionRecoveryActionSchema\n});\nconst runtimeCoordinatorFailurePublicationFinalMessageKindSchema = z.enum([\n\t\"failure_notice\",\n\t\"status\",\n\t\"success_reply\",\n\t\"unknown\"\n]);\nconst runtimeCoordinatorFailurePublicationOutcomeSchema = z.discriminatedUnion(\"status\", [\n\tz.strictObject({\n\t\tfailurePublicationCommandId: boundedCommandIdentifierSchema,\n\t\tfinalMessageKind: z.literal(\"failure_notice\"),\n\t\tok: z.literal(true),\n\t\tpublicationAction: z.enum([\"created\", \"already_visible\"]),\n\t\tpublicationErrorCode: z.null(),\n\t\tpublishedSignalId: boundedIdentifierSchema$4,\n\t\tstatus: z.literal(\"failure_published\")\n\t}),\n\tz.strictObject({\n\t\tfailurePublicationCommandId: boundedCommandIdentifierSchema,\n\t\tfinalMessageKind: runtimeCoordinatorFailurePublicationFinalMessageKindSchema,\n\t\tok: z.literal(true),\n\t\tpublicationErrorCode: z.null(),\n\t\tpublishedSignalId: boundedIdentifierSchema$4,\n\t\tstatus: z.literal(\"already_final\")\n\t}),\n\tz.strictObject({\n\t\tfailurePublicationCommandId: boundedCommandIdentifierSchema,\n\t\tfinalMessageKind: z.null(),\n\t\tok: z.literal(false),\n\t\tpublicationErrorCode: boundedReasonCodeSchema$1,\n\t\tpublishedSignalId: boundedNullableIdentifierSchema$1,\n\t\tstatus: z.literal(\"failure_publication_failed\")\n\t})\n]);\nconst buildRuntimeCoordinatorFailurePublicationCommandId = (input) => {\n\tconst publicationIntentId = input.publicationIntentId.trim();\n\tif (!publicationIntentId) throw new Error(\"runtime_coordinator.failure_publication_command_intent_id_empty\");\n\treturn `rcfpc:no_execution:${publicationIntentId.length}.${publicationIntentId}`;\n};\n\n//#endregion\n//#region src/schemas/daemon/runtime-coordinator-finalization-command.ts\nconst RUNTIME_COORDINATOR_FINALIZATION_COMMAND_MODEL_VERSION = \"ats.runtime_coordinator.finalization_command.v1\";\nconst boundedIdentifierSchema$3 = z.string().trim().min(1).max(512);\nconst boundedNullableIdentifierSchema = boundedIdentifierSchema$3.nullable();\nconst boundedReasonCodeSchema = z.string().trim().min(1).max(160);\nconst nullableBoundedLabelSchema = z.string().trim().min(1).max(200).nullable();\nconst timestampMsSchema = z.number().int().nonnegative();\nconst runtimeCoordinatorFinalizationDispatchOwnerSchema = z.strictObject({\n\tid: boundedIdentifierSchema$3,\n\tkind: z.literal(\"owner_account\")\n}).nullable();\nconst runtimeCoordinatorFinalizationDispatchFactSchema = z.strictObject({\n\tattemptId: boundedIdentifierSchema$3,\n\tdispatchId: boundedIdentifierSchema$3,\n\tdispatchOwner: runtimeCoordinatorFinalizationDispatchOwnerSchema,\n\tenqueuedAtMs: timestampMsSchema,\n\tidempotencyKey: boundedIdentifierSchema$3,\n\tsourceClientMessageId: boundedNullableIdentifierSchema,\n\tsourceEventId: boundedIdentifierSchema$3,\n\tspaceId: boundedIdentifierSchema$3,\n\ttargetProfileId: boundedIdentifierSchema$3,\n\ttaskId: boundedIdentifierSchema$3\n});\nconst runtimeCoordinatorFinalizationAcceptedResultSchema = z.strictObject({\n\tacceptedAtMs: timestampMsSchema,\n\tattemptId: boundedIdentifierSchema$3,\n\tdaemonSessionId: boundedIdentifierSchema$3,\n\tdispatchId: boundedIdentifierSchema$3,\n\texecutionTokenFingerprint: boundedIdentifierSchema$3,\n\texecutionTokenRunId: boundedIdentifierSchema$3,\n\tleaseEpoch: z.number().int().positive(),\n\truntimeCoordinatorExecutionId: boundedIdentifierSchema$3,\n\tsubmittedConnectionGeneration: z.number().int().positive(),\n\ttargetProfileId: boundedIdentifierSchema$3,\n\ttaskId: boundedIdentifierSchema$3,\n\ttaskResult: atsdTaskResultEnvelopeSchema\n});\nconst runtimeCoordinatorFinalizationCommandSchema = z.strictObject({\n\tacceptedResult: runtimeCoordinatorFinalizationAcceptedResultSchema,\n\tcreatedAtMs: timestampMsSchema,\n\tdispatchFact: runtimeCoordinatorFinalizationDispatchFactSchema,\n\tdispatchId: boundedIdentifierSchema$3,\n\texecutionTokenRunId: boundedIdentifierSchema$3,\n\tfinalizationCommandId: boundedIdentifierSchema$3,\n\tmodelVersion: z.literal(RUNTIME_COORDINATOR_FINALIZATION_COMMAND_MODEL_VERSION),\n\tpublicationIdempotencyKey: boundedIdentifierSchema$3,\n\tresultIdempotencyKey: boundedIdentifierSchema$3,\n\truntimeCoordinatorExecutionId: boundedIdentifierSchema$3,\n\tspaceId: boundedIdentifierSchema$3,\n\ttargetOwnerUserId: boundedIdentifierSchema$3,\n\ttargetProfileId: boundedIdentifierSchema$3,\n\ttargetProfileMentionLabel: nullableBoundedLabelSchema,\n\ttargetProfileName: nullableBoundedLabelSchema\n});\nconst runtimeCoordinatorFinalizationOutcomeSchema = z.discriminatedUnion(\"ok\", [z.strictObject({\n\tok: z.literal(true),\n\tfinalizationCommandId: boundedIdentifierSchema$3,\n\tpublicationErrorCode: z.null(),\n\tpublishedSignalId: boundedNullableIdentifierSchema,\n\tpublishState: z.enum([\"reply_published\", \"invalid_space_action\"]),\n\tstatus: z.enum([\"already_final\", \"finalized\"])\n}), z.strictObject({\n\tok: z.literal(false),\n\tfinalizationCommandId: boundedIdentifierSchema$3,\n\tpublicationErrorCode: boundedReasonCodeSchema,\n\tpublishedSignalId: z.null(),\n\tpublishState: z.literal(\"reply_publication_failed\"),\n\tstatus: z.literal(\"retry_later\")\n})]);\nconst buildRuntimeCoordinatorFinalizationCommandId = (input) => {\n\treturn [\n\t\t\"rcfc\",\n\t\tencodeLengthPrefixedPart(input.runtimeCoordinatorExecutionId),\n\t\tencodeLengthPrefixedPart(input.executionTokenRunId)\n\t].join(\":\");\n};\nconst encodeLengthPrefixedPart = (value) => {\n\tconst normalized = value.trim();\n\tif (!normalized) throw new Error(\"runtime_coordinator.finalization_command_id_part_empty\");\n\treturn `${normalized.length}.${normalized}`;\n};\n\n//#endregion\n//#region src/schemas/daemon/runtime-lease.ts\nconst DAEMON_RUNTIME_LEASE_SCHEMA_VERSION = 1;\nconst daemonRuntimeLeaseModeSchema = z.enum([\"foreground\", \"background\"]);\nconst daemonRuntimeLeaseSchema = z.strictObject({\n\tschema: z.literal(\"ats-daemon-runtime-lease-v1\"),\n\tv: z.literal(DAEMON_RUNTIME_LEASE_SCHEMA_VERSION),\n\tgeneration: z.int().nonnegative(),\n\tbundleId: z.string().min(1),\n\tpid: z.int().positive(),\n\tmode: daemonRuntimeLeaseModeSchema,\n\tstartedAt: z.string().min(1),\n\tupdatedAt: z.string().min(1),\n\theartbeatAt: z.string().nullable(),\n\tserviceController: daemonServiceControllerSchema,\n\tmanagedBySystemService: z.boolean()\n});\n\n//#endregion\n//#region src/schemas/daemon/service-recommendation.ts\nconst daemonBootstrapAutoInstallModeSchema = z.enum([\n\t\"always\",\n\t\"ask\",\n\t\"never\"\n]);\nconst daemonBootstrapRecommendationPayloadSchema = z.strictObject({\n\trecommended: z.boolean(),\n\treason: z.literal(\"service_missing\"),\n\tautoInstallMode: daemonBootstrapAutoInstallModeSchema,\n\tinstallCommand: z.string().min(1),\n\tconfigureAlwaysFlag: z.string().min(1),\n\tconfigureSkipFlag: z.string().min(1),\n\tnote: z.string().min(1)\n});\nconst daemonBootstrapRecommendationResultSchema = z.strictObject({\n\ttype: z.literal(\"result\"),\n\tcode: z.literal(\"daemon.bootstrap.recommended\"),\n\tpayload: daemonBootstrapRecommendationPayloadSchema\n});\n\n//#endregion\n//#region src/schemas/db/fact.ts\nconst trimmedNonEmptyStringSchema$5 = z.string().trim().min(1);\nconst nullableTrimmedStringSchema$4 = z.union([trimmedNonEmptyStringSchema$5, z.null()]);\nconst DB_FACT_SCHEMA_VERSION = 3;\nconst dbFactModeSchema = z.enum([\"runtime\", \"tooling\"]);\nconst dbFactPhaseSchema = z.enum([\"refactor_no_physical_change\", \"migration_phase\"]);\nconst dbFactResultSchema = z.enum([\n\t\"no_diff\",\n\t\"diff_detected\",\n\t\"blocked\",\n\t\"applied\"\n]);\nconst dbInspectionCheckStatusSchema = z.enum([\n\t\"ok\",\n\t\"drift_detected\",\n\t\"blocked\"\n]);\nconst dbInspectionModeSchema = z.enum([\"dev\", \"prod\"]);\nconst dbInspectionResultSchema = z.enum([\n\t\"ready\",\n\t\"drift_detected\",\n\t\"blocked\"\n]);\nconst dbFactServiceSchema = z.enum([\"auth\", \"core\"]);\nconst dbFactSubjectSchema = z.enum([\n\t\"auth\",\n\t\"core\",\n\t\"shared\"\n]);\nconst dbFactSourceSchema = z.strictObject({\n\tkind: trimmedNonEmptyStringSchema$5,\n\towner: trimmedNonEmptyStringSchema$5,\n\tpath: trimmedNonEmptyStringSchema$5,\n\tnote: nullableTrimmedStringSchema$4\n});\nconst dbFactTargetSchema = z.strictObject({\n\ttargetKind: z.enum([\n\t\t\"worker_binding\",\n\t\t\"d1_local_sqlite\",\n\t\t\"d1_http\"\n\t]),\n\tbindingName: trimmedNonEmptyStringSchema$5,\n\tdatabaseId: nullableTrimmedStringSchema$4,\n\tdatabaseName: nullableTrimmedStringSchema$4,\n\tlocalPath: nullableTrimmedStringSchema$4,\n\tresolvedFrom: nullableTrimmedStringSchema$4\n});\nconst dbDebtRegistryItemSchema = z.strictObject({\n\tid: trimmedNonEmptyStringSchema$5,\n\tservice: dbFactServiceSchema,\n\tpath: trimmedNonEmptyStringSchema$5,\n\tmarker: trimmedNonEmptyStringSchema$5,\n\towner: trimmedNonEmptyStringSchema$5,\n\tkeepReason: trimmedNonEmptyStringSchema$5,\n\treplacementDirection: trimmedNonEmptyStringSchema$5,\n\tnote: nullableTrimmedStringSchema$4\n});\nconst dbFactSnapshotSchema = z.strictObject({\n\tsubject: dbFactSubjectSchema,\n\tmode: dbFactModeSchema,\n\tbindingName: trimmedNonEmptyStringSchema$5,\n\tschemaSources: z.array(dbFactSourceSchema),\n\tmigrationSources: z.array(dbFactSourceSchema),\n\ttarget: dbFactTargetSchema,\n\td1LocalDbPath: nullableTrimmedStringSchema$4,\n\tnotes: z.array(trimmedNonEmptyStringSchema$5)\n});\nconst dbDiagnosticsPayloadSchema = z.strictObject({\n\tcontractVersion: z.literal(DB_FACT_SCHEMA_VERSION),\n\tauth: dbFactSnapshotSchema.extend({ subject: z.literal(\"auth\") }),\n\tcore: dbFactSnapshotSchema.extend({ subject: z.literal(\"core\") })\n});\nconst dbCommandFactSummarySchema = z.strictObject({\n\tcontractVersion: z.literal(DB_FACT_SCHEMA_VERSION),\n\tcommand: trimmedNonEmptyStringSchema$5,\n\tcwd: trimmedNonEmptyStringSchema$5,\n\tphase: dbFactPhaseSchema,\n\tsubject: dbFactSubjectSchema,\n\tresult: dbFactResultSchema,\n\tblockedReason: nullableTrimmedStringSchema$4,\n\tsnapshot: dbFactSnapshotSchema\n});\nconst dbInspectionCheckSchema = z.strictObject({\n\tstatus: dbInspectionCheckStatusSchema,\n\tdetail: nullableTrimmedStringSchema$4\n});\nconst dbInspectionSummarySchema = z.strictObject({\n\tcontractVersion: z.literal(DB_FACT_SCHEMA_VERSION),\n\tcommand: trimmedNonEmptyStringSchema$5,\n\tcwd: trimmedNonEmptyStringSchema$5,\n\tsubject: z.literal(\"shared\"),\n\tmode: dbInspectionModeSchema,\n\tresult: dbInspectionResultSchema,\n\tblockedReason: nullableTrimmedStringSchema$4,\n\tsnapshot: dbFactSnapshotSchema.extend({\n\t\tsubject: z.literal(\"shared\"),\n\t\tmode: z.literal(\"tooling\")\n\t}),\n\tchecks: z.strictObject({\n\t\tlegacyCoreDispatchShape: dbInspectionCheckSchema,\n\t\tsharedCoreDispatchPhysicalContract: dbInspectionCheckSchema\n\t}),\n\tnotes: z.array(trimmedNonEmptyStringSchema$5)\n});\n\n//#endregion\n//#region src/schemas/http/agent-profile-binding.ts\nconst boundedIdentifierSchema$2 = z.string().trim().min(1).max(256);\nconst reasonCodeSchema$2 = z.string().trim().min(1).max(256);\nconst agentProfileBindingRouteParamsSchema = z.strictObject({ agentProfileId: boundedIdentifierSchema$2 });\nconst agentProfileBindingRuntimeIdSchema = z.strictObject({\n\tsource: z.literal(\"runtime_registry_authority\"),\n\tvalue: z.string().trim().min(1).max(512)\n});\nconst agentProfileBindingWriteModeSchema = z.enum([\"ensure\", \"reconnect\"]);\nconst ensureAgentProfilePrimaryBindingBodySchema = z.strictObject({\n\tcapabilityRef: boundedIdentifierSchema$2,\n\tdeviceId: boundedIdentifierSchema$2,\n\tlane: boundedIdentifierSchema$2,\n\truntimeId: agentProfileBindingRuntimeIdSchema,\n\twriteMode: agentProfileBindingWriteModeSchema.optional()\n});\nconst notifyAgentProfileRouteCatalogChangedBodySchema = z.strictObject({ reason: z.string().trim().min(1).max(100).optional() });\nconst notifyAgentProfileRouteCatalogChangedResponseSchema = z.strictObject({\n\tok: z.boolean(),\n\tnotifiedSessions: z.number().int().nonnegative()\n});\nconst agentProfileBindingStateSchema = z.enum([\n\t\"missing\",\n\t\"enabled_primary\",\n\t\"disabled_historical\",\n\t\"conflict\",\n\t\"owner_mismatch\"\n]);\nconst agentProfileBindingResolutionSourceSchema = z.enum([\n\t\"binding_truth\",\n\t\"missing_projection\",\n\t\"conflict_evidence\"\n]);\nconst agentProfileBindingAuthoritySourceSchema = z.enum([\n\t\"binding_truth\",\n\t\"none\",\n\t\"blocked\"\n]);\nconst agentProfileBindingRuntimeCapabilitySchema = z.strictObject({\n\tcapabilityRef: boundedIdentifierSchema$2,\n\truntimeId: agentProfileBindingRuntimeIdSchema\n});\nconst agentProfileBindingDispatchEligibilitySchema = z.strictObject({\n\treasonCodes: z.array(reasonCodeSchema$2),\n\troutable: z.boolean(),\n\tstatus: z.enum([\"routable\", \"not_routable\"])\n});\nconst agentProfileBindingProjectionSchema = z.strictObject({\n\tagentProfileId: boundedIdentifierSchema$2,\n\tauthoritySource: agentProfileBindingAuthoritySourceSchema,\n\tbindingId: boundedIdentifierSchema$2.optional(),\n\tbindingState: agentProfileBindingStateSchema,\n\tdispatchEligibility: agentProfileBindingDispatchEligibilitySchema,\n\tgrantsClaimSuccess: z.literal(false),\n\treasonCodes: z.array(reasonCodeSchema$2),\n\tresolutionSource: agentProfileBindingResolutionSourceSchema,\n\troutable: z.boolean(),\n\truntimeCapability: agentProfileBindingRuntimeCapabilitySchema.nullable()\n}).superRefine(validateAgentProfileBindingProjection);\nconst getAgentProfilePrimaryBindingResponseSchema = z.strictObject({\n\tbinding: agentProfileBindingProjectionSchema,\n\tgrantsClaimSuccess: z.literal(false),\n\tstatus: z.enum([\n\t\t\"found\",\n\t\t\"missing\",\n\t\t\"unavailable\"\n\t])\n}).superRefine((value, context) => {\n\tif (value.binding.bindingState !== \"missing\") {\n\t\tif (value.status !== \"found\") context.addIssue({\n\t\t\tcode: \"custom\",\n\t\t\tmessage: \"Binding read status must match Binding projection\",\n\t\t\tpath: [\"status\"]\n\t\t});\n\t\treturn;\n\t}\n\tif (value.status === \"found\") {\n\t\tcontext.addIssue({\n\t\t\tcode: \"custom\",\n\t\t\tmessage: \"Binding read status must match Binding projection\",\n\t\t\tpath: [\"status\"]\n\t\t});\n\t\treturn;\n\t}\n\tconst unavailable = hasUnavailableBindingReadReason(value.binding.reasonCodes);\n\tif (value.status === \"unavailable\" && !unavailable) context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"unavailable Binding read requires unavailable reason code\",\n\t\tpath: [\"binding\", \"reasonCodes\"]\n\t});\n\tif (value.status === \"missing\" && unavailable) context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"unavailable Binding read cannot be reported as missing\",\n\t\tpath: [\"status\"]\n\t});\n});\nconst ensureAgentProfilePrimaryBindingResponseSchema = z.strictObject({\n\tbinding: agentProfileBindingProjectionSchema.optional(),\n\tgrantsClaimSuccess: z.literal(false),\n\toutcome: z.enum([\n\t\t\"created\",\n\t\t\"reused\",\n\t\t\"reconnected\"\n\t]).optional(),\n\treasonCodes: z.array(reasonCodeSchema$2),\n\troutable: z.boolean(),\n\tstatus: z.enum([\"accepted\", \"rejected\"])\n}).superRefine((value, context) => {\n\tif (value.status === \"accepted\") {\n\t\tif (!value.binding) context.addIssue({\n\t\t\tcode: \"custom\",\n\t\t\tmessage: \"accepted Binding command response requires Binding truth\",\n\t\t\tpath: [\"binding\"]\n\t\t});\n\t\tif (!value.outcome) context.addIssue({\n\t\t\tcode: \"custom\",\n\t\t\tmessage: \"accepted Binding command response requires an outcome\",\n\t\t\tpath: [\"outcome\"]\n\t\t});\n\t\tif (!value.routable) context.addIssue({\n\t\t\tcode: \"custom\",\n\t\t\tmessage: \"accepted Binding command response must be routable\",\n\t\t\tpath: [\"routable\"]\n\t\t});\n\t\tif (value.binding) requireAcceptedBindingCommandProjection(value.binding, context);\n\t\treturn;\n\t}\n\tif (value.outcome) context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"rejected Binding command response cannot include outcome\",\n\t\tpath: [\"outcome\"]\n\t});\n\tif (value.routable) context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"rejected Binding command response cannot be routable\",\n\t\tpath: [\"routable\"]\n\t});\n});\nfunction validateAgentProfileBindingProjection(value, context) {\n\tvalidateBindingDispatchEligibility(value, context);\n\tbindingProjectionValidators[value.bindingState](value, context);\n}\nconst bindingProjectionValidators = {\n\tconflict: validateConflictProjection,\n\tdisabled_historical: validateDisabledHistoricalProjection,\n\tenabled_primary: validateEnabledPrimaryProjection,\n\tmissing: validateMissingProjection,\n\towner_mismatch: validateOwnerMismatchProjection\n};\nfunction validateBindingDispatchEligibility(value, context) {\n\tif (value.dispatchEligibility.routable !== value.routable) context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"Binding routable fields must agree\",\n\t\tpath: [\"dispatchEligibility\", \"routable\"]\n\t});\n\tif (value.dispatchEligibility.status !== (value.routable ? \"routable\" : \"not_routable\")) context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"Binding dispatch status must match routable state\",\n\t\tpath: [\"dispatchEligibility\", \"status\"]\n\t});\n}\nfunction validateEnabledPrimaryProjection(value, context) {\n\trequireBindingTruthProjection(value, context);\n\tif (!value.routable) context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"enabled primary Binding must be routable\",\n\t\tpath: [\"routable\"]\n\t});\n}\nfunction validateDisabledHistoricalProjection(value, context) {\n\trequireBindingTruthProjection(value, context);\n\tif (value.routable) context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"disabled historical Binding cannot be routable\",\n\t\tpath: [\"routable\"]\n\t});\n}\nfunction validateMissingProjection(value, context) {\n\tif (value.authoritySource !== \"none\") context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"missing Binding projection cannot have authority source\",\n\t\tpath: [\"authoritySource\"]\n\t});\n\tif (value.resolutionSource !== \"missing_projection\") context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"missing Binding projection requires missing source\",\n\t\tpath: [\"resolutionSource\"]\n\t});\n\trejectMissingProjectionEvidence(value, context);\n}\nfunction rejectMissingProjectionEvidence(value, context) {\n\tif (value.bindingId) context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"missing Binding projection cannot include bindingId\",\n\t\tpath: [\"bindingId\"]\n\t});\n\tif (value.runtimeCapability) context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"missing Binding projection cannot include Runtime capability\",\n\t\tpath: [\"runtimeCapability\"]\n\t});\n\tif (value.routable) context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"missing Binding projection cannot be routable\",\n\t\tpath: [\"routable\"]\n\t});\n}\nfunction validateConflictProjection(value, context) {\n\tif (value.authoritySource !== \"blocked\") context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"conflict Binding projection must be blocked\",\n\t\tpath: [\"authoritySource\"]\n\t});\n\tif (value.resolutionSource !== \"conflict_evidence\") context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"conflict Binding projection requires conflict evidence\",\n\t\tpath: [\"resolutionSource\"]\n\t});\n\tif (value.routable) context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"conflict Binding projection cannot be routable\",\n\t\tpath: [\"routable\"]\n\t});\n}\nfunction validateOwnerMismatchProjection(value, context) {\n\tif (value.authoritySource !== \"blocked\") context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"owner mismatch Binding projection must be blocked\",\n\t\tpath: [\"authoritySource\"]\n\t});\n\tif (value.routable) context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"owner mismatch Binding projection cannot be routable\",\n\t\tpath: [\"routable\"]\n\t});\n}\nfunction requireBindingTruthProjection(value, context) {\n\tif (value.authoritySource !== \"binding_truth\") context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"Binding truth projection requires binding authority\",\n\t\tpath: [\"authoritySource\"]\n\t});\n\tif (value.resolutionSource !== \"binding_truth\") context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"Binding truth projection requires binding resolution source\",\n\t\tpath: [\"resolutionSource\"]\n\t});\n\tif (!value.bindingId) context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"Binding truth projection requires bindingId\",\n\t\tpath: [\"bindingId\"]\n\t});\n\tif (!value.runtimeCapability) context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"Binding truth projection requires Runtime capability\",\n\t\tpath: [\"runtimeCapability\"]\n\t});\n}\nfunction requireAcceptedBindingCommandProjection(binding, context) {\n\tif (binding.bindingState !== \"enabled_primary\") context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"accepted Binding command response requires enabled primary truth\",\n\t\tpath: [\"binding\", \"bindingState\"]\n\t});\n\tif (binding.authoritySource !== \"binding_truth\") context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"accepted Binding command response requires Binding authority\",\n\t\tpath: [\"binding\", \"authoritySource\"]\n\t});\n\tif (binding.resolutionSource !== \"binding_truth\") context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"accepted Binding command response requires Binding truth source\",\n\t\tpath: [\"binding\", \"resolutionSource\"]\n\t});\n\tif (!binding.bindingId) context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"accepted Binding command response requires bindingId\",\n\t\tpath: [\"binding\", \"bindingId\"]\n\t});\n\tif (!binding.runtimeCapability) context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"accepted Binding command response requires Runtime capability\",\n\t\tpath: [\"binding\", \"runtimeCapability\"]\n\t});\n\tif (!(binding.routable && binding.dispatchEligibility.routable)) context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"accepted Binding command response requires routable Binding truth\",\n\t\tpath: [\"binding\", \"routable\"]\n\t});\n\tif (binding.dispatchEligibility.status !== \"routable\") context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"accepted Binding command response requires routable status\",\n\t\tpath: [\n\t\t\t\"binding\",\n\t\t\t\"dispatchEligibility\",\n\t\t\t\"status\"\n\t\t]\n\t});\n}\nfunction hasUnavailableBindingReadReason(reasonCodes) {\n\treturn reasonCodes.some((reasonCode) => reasonCode === \"agent_profile_binding.lookup_failed\" || reasonCode === \"agent_profile_binding.owner_mismatch\" || reasonCode === \"agent_profile_binding.profile_owner_invalid\" || reasonCode === \"agent_profile_binding.profile_owner_unavailable\" || reasonCode === \"agent_profile_binding.read_unavailable\" || reasonCode === \"agent_profile_binding.store_unavailable\");\n}\n\n//#endregion\n//#region src/schemas/http/auth-password.ts\nconst setAuthPasswordBodySchema = z.strictObject({ newPassword: z.string() });\nconst setAuthPasswordResponseSchema = z.strictObject({ status: z.boolean() });\n\n//#endregion\n//#region src/schemas/http/catchup-response.ts\nconst pagedCatchupSchema = z.strictObject({\n\tsignals: z.array(z.unknown()),\n\tnextCursor: z.union([z.string().refine((value) => value.trim().length > 0), z.null()]).optional()\n});\n/**\n* Canonical catch-up response shape across Core/Gateway/CLI.\n* `nextCursor` is nullable; invalid cursor types fail fast.\n*/\nconst catchupResponseSchema = pagedCatchupSchema.transform((value) => {\n\tconst nextCursor = value.nextCursor ?? null;\n\treturn {\n\t\tsignals: value.signals,\n\t\tnextCursor\n\t};\n});\n\n//#endregion\n//#region src/schemas/http/claim-execution-diagnostics.ts\nconst boundedIdentifierSchema$1 = z.string().trim().min(1).max(512);\nconst boundedStatusSchema = z.string().trim().min(1).max(256);\nconst nullableBoundedIdentifierSchema = boundedIdentifierSchema$1.nullable();\nconst claimExecutionDiagnosticsQuerySchema = z.strictObject({\n\tclaimLeaseId: boundedIdentifierSchema$1.optional(),\n\tdispatchId: boundedIdentifierSchema$1.optional(),\n\tsourceClientMessageId: boundedIdentifierSchema$1.optional(),\n\tspaceId: boundedIdentifierSchema$1.optional(),\n\ttargetProfileId: boundedIdentifierSchema$1.optional()\n}).superRefine((value, context) => {\n\tconst hasDispatchAnchor = Boolean(value.dispatchId);\n\tconst hasClaimLeaseAnchor = Boolean(value.claimLeaseId);\n\tconst hasBoundedSourceAnchor = Boolean(value.sourceClientMessageId && value.spaceId && value.targetProfileId);\n\tif (hasDispatchAnchor || hasClaimLeaseAnchor || hasBoundedSourceAnchor) return;\n\tcontext.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: value.sourceClientMessageId === void 0 ? \"claim execution diagnostics lookup requires dispatchId, claimLeaseId, or sourceClientMessageId with spaceId and targetProfileId\" : \"sourceClientMessageId diagnostics lookup requires spaceId and targetProfileId unless paired with dispatchId or claimLeaseId\",\n\t\tpath: [\"sourceClientMessageId\"]\n\t});\n});\nconst claimExecutionDispatchOwnerSchema = z.strictObject({\n\tid: boundedIdentifierSchema$1,\n\tkind: boundedIdentifierSchema$1\n});\nconst claimExecutionDiagnosticsDispatchSchema = z.strictObject({\n\tdispatchId: boundedIdentifierSchema$1,\n\towner: claimExecutionDispatchOwnerSchema.nullable(),\n\tsourceClientMessageId: nullableBoundedIdentifierSchema,\n\tsourceEventId: boundedIdentifierSchema$1,\n\tstatus: boundedStatusSchema,\n\ttargetProfileId: boundedIdentifierSchema$1\n});\nconst claimExecutionDiagnosticsClaimLeaseSchema = z.strictObject({\n\tclaimLeaseId: boundedIdentifierSchema$1,\n\tdispatchId: boundedIdentifierSchema$1,\n\tsourceEventId: boundedIdentifierSchema$1,\n\tleaseState: boundedStatusSchema,\n\tsourceClientMessageId: nullableBoundedIdentifierSchema,\n\ttargetProfileId: boundedIdentifierSchema$1,\n\tbindingId: boundedIdentifierSchema$1,\n\truntimeId: boundedIdentifierSchema$1,\n\tcapabilityRef: boundedIdentifierSchema$1,\n\tclaimTraceReason: nullableBoundedIdentifierSchema,\n\tstatus: z.literal(\"found\")\n});\nconst claimExecutionDiagnosticsResultSchema = z.strictObject({\n\tdispatchId: boundedIdentifierSchema$1,\n\tpublicOutcome: boundedStatusSchema,\n\tpublishedSignalId: nullableBoundedIdentifierSchema,\n\tresultRef: boundedIdentifierSchema$1,\n\tstatusType: nullableBoundedIdentifierSchema\n});\nconst claimExecutionDiagnosticsResponseSchema = z.strictObject({\n\tclaimLease: claimExecutionDiagnosticsClaimLeaseSchema.nullable(),\n\tdispatch: claimExecutionDiagnosticsDispatchSchema.nullable(),\n\tresult: claimExecutionDiagnosticsResultSchema.nullable(),\n\tstatus: z.enum([\n\t\t\"found\",\n\t\t\"mismatch\",\n\t\t\"missing\"\n\t])\n});\n\n//#endregion\n//#region src/schemas/start/shared.ts\nconst START_ISO_DATE_TIME_SCHEMA = z.iso.datetime({ offset: true });\nconst START_TRIMMED_NON_EMPTY_STRING_SCHEMA = z.string().trim().min(1);\nconst START_BOUNDED_ID_SCHEMA = START_TRIMMED_NON_EMPTY_STRING_SCHEMA.max(256);\nconst START_BOUNDED_LABEL_SCHEMA = START_TRIMMED_NON_EMPTY_STRING_SCHEMA.max(256);\nconst START_BOUNDED_VERSION_SCHEMA = START_TRIMMED_NON_EMPTY_STRING_SCHEMA.max(128);\nconst START_NULLABLE_COMPLETION_TIME_SCHEMA = z.union([START_ISO_DATE_TIME_SCHEMA, z.null()]);\nconst startReplyReadinessSummarySchema = z.strictObject({\n\tlevel: replyReadinessLevelSchema,\n\treasonCodes: z.array(replyReadinessReasonCodeSchema)\n});\nfunction toStartTimestampMs(value) {\n\treturn Date.parse(value);\n}\n\n//#endregion\n//#region src/schemas/http/current-device-target.ts\nconst currentDeviceTargetDeviceIdSchema = START_BOUNDED_ID_SCHEMA;\nconst currentDeviceTargetResolvedSchema = z.strictObject({\n\tavailability: z.literal(\"resolved\"),\n\tconnectedComputerId: START_BOUNDED_ID_SCHEMA.optional(),\n\tdeviceId: currentDeviceTargetDeviceIdSchema,\n\truntimeLane: daemonServiceLaneSchema\n});\nconst currentDeviceTargetMissingSchema = z.strictObject({\n\tavailability: z.literal(\"missing\"),\n\treasonCodes: z.array(z.string().trim().min(1).max(256)).optional()\n});\nconst currentDeviceTargetResponseSchema = z.discriminatedUnion(\"availability\", [currentDeviceTargetResolvedSchema, currentDeviceTargetMissingSchema]);\nconst currentDeviceTargetWriteModeSchema = z.enum([\"replace\", \"if_missing\"]);\nconst currentDeviceTargetActivationSourceSchema = z.enum([\"local_setup\"]);\nconst setCurrentDeviceTargetBodySchema = z.strictObject({\n\tdeviceId: currentDeviceTargetDeviceIdSchema,\n\tconnectedComputerId: START_BOUNDED_ID_SCHEMA.optional(),\n\truntimeLane: daemonServiceLaneSchema,\n\tactivationSource: currentDeviceTargetActivationSourceSchema.optional(),\n\twriteMode: currentDeviceTargetWriteModeSchema.optional()\n});\nconst forgetCurrentComputerStatusSchema = z.enum([\"forgotten\", \"already_missing\"]);\nconst forgetCurrentComputerResponseSchema = z.strictObject({\n\tstatus: forgetCurrentComputerStatusSchema,\n\tforgottenDeviceId: START_BOUNDED_ID_SCHEMA.nullable(),\n\tcurrentDeviceTarget: currentDeviceTargetMissingSchema\n});\nconst forgetComputerRouteParamsSchema = z.strictObject({ deviceId: currentDeviceTargetDeviceIdSchema });\nconst forgetComputerResponseSchema = z.strictObject({\n\tstatus: forgetCurrentComputerStatusSchema,\n\tforgottenDeviceId: START_BOUNDED_ID_SCHEMA.nullable(),\n\tcurrentDeviceTarget: currentDeviceTargetResponseSchema\n});\n\n//#endregion\n//#region src/schemas/http/daemon-route-observation.ts\nconst daemonRouteObservationResponseSchema = z.strictObject({\n\tobservedAt: z.string().trim().min(1),\n\tprofileId: z.string().trim().min(1),\n\troute: daemonHubLookupRouteResponseSchema\n});\n\n//#endregion\n//#region src/schemas/start/session.ts\nconst startSessionLifecycleStatusSchema = z.enum([\n\t\"active\",\n\t\"superseded\",\n\t\"completed\",\n\t\"failed\",\n\t\"cancelled\"\n]);\nconst startSessionInitiatorSchema = z.enum([\"standalone_cli\", \"web_handoff\"]);\nconst startOpaqueTokenSchema = START_TRIMMED_NON_EMPTY_STRING_SCHEMA.max(2048);\nconst startProfileChoiceModeSchema = z.enum([\n\t\"unresolved\",\n\t\"select_existing\",\n\t\"create_human\",\n\t\"create_agent\"\n]);\nconst startSpaceChoiceModeSchema = z.enum([\n\t\"unresolved\",\n\t\"create_new\",\n\t\"join_existing\"\n]);\nconst startLocalAgentPreparationModeSchema = z.enum([\n\t\"unresolved\",\n\t\"prepare_local_agents\",\n\t\"skip_local_agents\"\n]);\nconst startSpaceMemberSelectionModeSchema = z.enum([\n\t\"unresolved\",\n\t\"just_me\",\n\t\"selected_profiles\"\n]);\nconst startProfileChoiceSchema = z.strictObject({\n\tmode: startProfileChoiceModeSchema,\n\tprofileId: z.union([atsProfileIdSchema, z.null()])\n}).superRefine((value, ctx) => {\n\tif (value.mode === \"unresolved\" && value.profileId !== null) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"unresolved profile choice must use a null profileId\",\n\t\tpath: [\"profileId\"]\n\t});\n\tif (value.mode === \"select_existing\" && value.profileId === null) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"select_existing profile choice must provide a non-null profileId\",\n\t\tpath: [\"profileId\"]\n\t});\n});\nconst startSpaceChoiceSchema = z.strictObject({\n\tmode: startSpaceChoiceModeSchema,\n\tspaceId: z.union([START_BOUNDED_ID_SCHEMA, z.null()])\n}).superRefine((value, ctx) => {\n\tif (value.mode === \"unresolved\" && value.spaceId !== null) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"unresolved space choice must use a null spaceId\",\n\t\tpath: [\"spaceId\"]\n\t});\n\tif (value.mode === \"create_new\" && value.spaceId !== null) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"create_new space choice must use a null spaceId\",\n\t\tpath: [\"spaceId\"]\n\t});\n\tif (value.mode === \"join_existing\" && value.spaceId === null) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"join_existing space choice must provide a non-null spaceId\",\n\t\tpath: [\"spaceId\"]\n\t});\n});\nconst startTargetSpaceIdSchema = z.union([START_BOUNDED_ID_SCHEMA, z.null()]);\nfunction validateStartTargetSpaceId(input) {\n\tif (input.spaceChoice.mode === \"unresolved\" && input.targetSpaceId !== null) {\n\t\tinput.ctx.addIssue({\n\t\t\tcode: \"custom\",\n\t\t\tmessage: \"unresolved space choice must use a null targetSpaceId\",\n\t\t\tpath: [\"targetSpaceId\"]\n\t\t});\n\t\treturn;\n\t}\n\tif (input.spaceChoice.mode === \"join_existing\" && input.targetSpaceId !== null && input.targetSpaceId !== input.spaceChoice.spaceId) input.ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"join_existing space choice must use a targetSpaceId that matches spaceChoice.spaceId\",\n\t\tpath: [\"targetSpaceId\"]\n\t});\n}\nconst startLocalAgentIdsSchema = z.array(START_BOUNDED_ID_SCHEMA).superRefine((value, ctx) => {\n\tif (new Set(value).size !== value.length) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"localAgentIds must not contain duplicates\"\n\t});\n});\nconst startLocalAgentPreparationSchema = z.strictObject({\n\tmode: startLocalAgentPreparationModeSchema,\n\tlocalAgentIds: startLocalAgentIdsSchema\n}).superRefine((value, ctx) => {\n\tconst hasLocalAgentIds = value.localAgentIds.length > 0;\n\tif (value.mode === \"prepare_local_agents\" && !hasLocalAgentIds) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"prepare_local_agents local agent preparation must provide at least one localAgentId\",\n\t\tpath: [\"localAgentIds\"]\n\t});\n\tif (value.mode !== \"prepare_local_agents\" && hasLocalAgentIds) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"unresolved and skip_local_agents local agent preparation must use an empty localAgentIds list\",\n\t\tpath: [\"localAgentIds\"]\n\t});\n});\nconst startSelectedSpaceMemberProfileIdsSchema = z.array(atsProfileIdSchema).superRefine((value, ctx) => {\n\tif (new Set(value).size !== value.length) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"selectedProfileIds must not contain duplicates\"\n\t});\n});\nconst startSpaceMemberSelectionSchema = z.strictObject({\n\tmode: startSpaceMemberSelectionModeSchema,\n\tselectedProfileIds: startSelectedSpaceMemberProfileIdsSchema\n}).superRefine((value, ctx) => {\n\tconst hasSelectedProfileIds = value.selectedProfileIds.length > 0;\n\tif (value.mode === \"selected_profiles\" && !hasSelectedProfileIds) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"selected_profiles space member selection must provide at least one selectedProfileId\",\n\t\tpath: [\"selectedProfileIds\"]\n\t});\n\tif (value.mode !== \"selected_profiles\" && hasSelectedProfileIds) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"unresolved and just_me space member selection must use an empty selectedProfileIds list\",\n\t\tpath: [\"selectedProfileIds\"]\n\t});\n});\nconst startSessionSchema = z.strictObject({\n\tsessionId: START_BOUNDED_ID_SCHEMA,\n\tuserId: START_BOUNDED_ID_SCHEMA,\n\tdeviceId: START_BOUNDED_ID_SCHEMA,\n\tinitiator: startSessionInitiatorSchema,\n\tlifecycleStatus: startSessionLifecycleStatusSchema,\n\tprofileChoice: startProfileChoiceSchema,\n\tlocalAgentPreparation: startLocalAgentPreparationSchema,\n\tspaceMemberSelection: startSpaceMemberSelectionSchema.default({\n\t\tmode: \"unresolved\",\n\t\tselectedProfileIds: []\n\t}),\n\tspaceChoice: startSpaceChoiceSchema,\n\ttargetSpaceId: startTargetSpaceIdSchema,\n\tstartedAt: START_ISO_DATE_TIME_SCHEMA,\n\tupdatedAt: START_ISO_DATE_TIME_SCHEMA,\n\tclosedAt: START_NULLABLE_COMPLETION_TIME_SCHEMA\n}).superRefine((value, ctx) => {\n\tconst startedAtMs = toStartTimestampMs(value.startedAt);\n\tconst updatedAtMs = toStartTimestampMs(value.updatedAt);\n\tif (value.lifecycleStatus === \"active\" && value.closedAt !== null) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"active lifecycle status must use a null closedAt\",\n\t\tpath: [\"closedAt\"]\n\t});\n\tif (value.lifecycleStatus !== \"active\" && value.closedAt === null) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"terminal lifecycle status requires closedAt\",\n\t\tpath: [\"closedAt\"]\n\t});\n\tif (updatedAtMs < startedAtMs) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"updatedAt must not be earlier than startedAt\",\n\t\tpath: [\"updatedAt\"]\n\t});\n\tif (value.closedAt !== null) {\n\t\tif (toStartTimestampMs(value.closedAt) < updatedAtMs) ctx.addIssue({\n\t\t\tcode: \"custom\",\n\t\t\tmessage: \"closedAt must not be earlier than updatedAt\",\n\t\t\tpath: [\"closedAt\"]\n\t\t});\n\t}\n\tvalidateStartTargetSpaceId({\n\t\tspaceChoice: value.spaceChoice,\n\t\ttargetSpaceId: value.targetSpaceId,\n\t\tctx\n\t});\n\tconst selectedProfileId = value.profileChoice.profileId;\n\tif (selectedProfileId && value.spaceMemberSelection.selectedProfileIds.includes(selectedProfileId)) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"space member selection must not include the selected profileChoice.profileId\",\n\t\tpath: [\"spaceMemberSelection\", \"selectedProfileIds\"]\n\t});\n});\n\n//#endregion\n//#region src/schemas/runtime/local-agent-catalog.ts\nconst LOCAL_AGENT_CATALOG_BOUNDED_ID_SCHEMA = z.string().trim().min(1).max(256);\nconst LOCAL_AGENT_CATALOG_BOUNDED_LABEL_SCHEMA = z.string().trim().min(1).max(256);\nconst localAgentCatalogTargetKindSchema = z.enum([\"builtin\", \"custom\"]);\nconst localAgentCatalogSelectableReasonSchema = z.enum([\n\t\"not_detected\",\n\t\"not_supported_yet\",\n\t\"needs_repair\",\n\t\"custom_coming_soon\"\n]);\nconst localAgentCatalogLaunchStatusSchema = z.enum([\n\t\"ready\",\n\t\"needs_choice\",\n\t\"needs_repair\",\n\t\"not_available\"\n]);\nconst localAgentCatalogEntrySchema = z.strictObject({\n\tagentId: LOCAL_AGENT_CATALOG_BOUNDED_ID_SCHEMA,\n\tdisplayName: LOCAL_AGENT_CATALOG_BOUNDED_LABEL_SCHEMA,\n\ttargetKind: localAgentCatalogTargetKindSchema,\n\tdetected: z.boolean(),\n\tenabled: z.boolean(),\n\tlaunchStatus: localAgentCatalogLaunchStatusSchema,\n\tselectable: z.boolean(),\n\tselectableReason: z.union([localAgentCatalogSelectableReasonSchema, z.null()])\n}).superRefine((value, ctx) => {\n\tif (value.selectable && value.selectableReason !== null) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"selectableReason must be null when selectable is true\",\n\t\tpath: [\"selectableReason\"]\n\t});\n\tif (!value.selectable && value.selectableReason === null) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"selectableReason must be present when selectable is false\",\n\t\tpath: [\"selectableReason\"]\n\t});\n\tif (value.launchStatus === \"needs_choice\" && !(value.detected && value.targetKind === \"builtin\" && value.selectable)) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"needs_choice launchStatus only applies to detected selectable builtin entries\",\n\t\tpath: [\"launchStatus\"]\n\t});\n\tif (value.launchStatus === \"needs_repair\" && !(value.detected && value.targetKind === \"builtin\" && !value.selectable && value.selectableReason === \"needs_repair\")) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"needs_repair launchStatus requires detected builtin entries that need repair\",\n\t\tpath: [\"launchStatus\"]\n\t});\n\tif (value.selectableReason === \"not_detected\" && value.detected) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"not_detected selectableReason requires detected to be false\",\n\t\tpath: [\"detected\"]\n\t});\n\tif (value.selectableReason === \"not_supported_yet\" && (!value.detected || value.targetKind !== \"builtin\")) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"not_supported_yet selectableReason only applies to detected builtin entries\",\n\t\tpath: [\"selectableReason\"]\n\t});\n\tif (value.selectableReason === \"needs_repair\" && (!value.detected || value.targetKind !== \"builtin\")) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"needs_repair selectableReason only applies to detected builtin entries\",\n\t\tpath: [\"selectableReason\"]\n\t});\n\tif (value.selectableReason === \"custom_coming_soon\" && value.targetKind !== \"custom\") ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"custom_coming_soon selectableReason only applies to custom entries\",\n\t\tpath: [\"selectableReason\"]\n\t});\n});\nconst localAgentCatalogSchema = z.strictObject({\n\ttotalBuiltins: z.number().int().min(0),\n\tdetectedSupported: z.number().int().min(0),\n\tneedsChoice: z.number().int().min(0),\n\tneedsRepair: z.number().int().min(0),\n\tdetectedNotSupportedYet: z.number().int().min(0),\n\tnotDetected: z.number().int().min(0),\n\tentries: z.array(localAgentCatalogEntrySchema)\n}).superRefine((value, ctx) => {\n\tconst builtinEntries = value.entries.filter((entry) => entry.targetKind === \"builtin\");\n\tconst detectedSupported = builtinEntries.filter((entry) => entry.detected && entry.launchStatus === \"ready\").length;\n\tconst needsChoice = builtinEntries.filter((entry) => entry.detected && entry.launchStatus === \"needs_choice\").length;\n\tconst detectedNotSupportedYet = builtinEntries.filter((entry) => entry.detected && entry.launchStatus === \"not_available\" && entry.selectableReason === \"not_supported_yet\").length;\n\tconst needsRepair = builtinEntries.filter((entry) => entry.detected && entry.launchStatus === \"needs_repair\").length;\n\tconst notDetected = builtinEntries.filter((entry) => !entry.detected).length;\n\tconst expectations = [\n\t\t{\n\t\t\tactual: builtinEntries.length,\n\t\t\texpected: value.totalBuiltins,\n\t\t\tlabel: \"totalBuiltins\",\n\t\t\tpath: [\"totalBuiltins\"]\n\t\t},\n\t\t{\n\t\t\tactual: detectedSupported,\n\t\t\texpected: value.detectedSupported,\n\t\t\tlabel: \"detectedSupported\",\n\t\t\tpath: [\"detectedSupported\"]\n\t\t},\n\t\t{\n\t\t\tactual: needsChoice,\n\t\t\texpected: value.needsChoice,\n\t\t\tlabel: \"needsChoice\",\n\t\t\tpath: [\"needsChoice\"]\n\t\t},\n\t\t{\n\t\t\tactual: detectedNotSupportedYet,\n\t\t\texpected: value.detectedNotSupportedYet,\n\t\t\tlabel: \"detectedNotSupportedYet\",\n\t\t\tpath: [\"detectedNotSupportedYet\"]\n\t\t},\n\t\t{\n\t\t\tactual: needsRepair,\n\t\t\texpected: value.needsRepair,\n\t\t\tlabel: \"needsRepair\",\n\t\t\tpath: [\"needsRepair\"]\n\t\t},\n\t\t{\n\t\t\tactual: notDetected,\n\t\t\texpected: value.notDetected,\n\t\t\tlabel: \"notDetected\",\n\t\t\tpath: [\"notDetected\"]\n\t\t}\n\t];\n\tfor (const expectation of expectations) {\n\t\tif (expectation.actual === expectation.expected) continue;\n\t\tctx.addIssue({\n\t\t\tcode: \"custom\",\n\t\t\tmessage: `${expectation.label} must match the builtin entry summary`,\n\t\t\tpath: expectation.path\n\t\t});\n\t}\n});\n\n//#endregion\n//#region src/schemas/http/local-runtimes.ts\nconst ISO_DATE_TIME_SCHEMA$4 = z.iso.datetime({ offset: true });\nconst reasonCodeSchema$1 = z.string().trim().min(1).max(256);\nconst localRuntimeDisplayNameSourceSchema = z.enum([\n\t\"user\",\n\t\"observed\",\n\t\"placeholder\"\n]);\nconst localRuntimePlatformFamilySchema = z.enum([\n\t\"macOS\",\n\t\"Windows\",\n\t\"Linux\",\n\t\"Unknown\"\n]);\nconst localRuntimeDeviceTypeSchema = z.enum([\n\t\"laptop\",\n\t\"desktop\",\n\t\"server\",\n\t\"unknown\"\n]);\nconst localRuntimeExecutionTargetCapabilitySchema = z.strictObject({\n\tcapabilityRef: z.string().trim().min(1).max(256),\n\treasonCodes: z.array(reasonCodeSchema$1),\n\tstatus: z.enum([\n\t\t\"ready\",\n\t\t\"not_ready\",\n\t\t\"stale\",\n\t\t\"unknown\"\n\t])\n});\nconst localRuntimeExecutionTargetStatusSchema = z.enum([\n\t\"ready\",\n\t\"partial\",\n\t\"not_ready\",\n\t\"stale\",\n\t\"unknown\"\n]);\nconst localRuntimeExecutionTargetSchema = z.strictObject({\n\tdeviceId: START_BOUNDED_ID_SCHEMA,\n\truntimeLane: daemonServiceLaneSchema,\n\tuserFacingCommand: z.enum([\n\t\t\"ats\",\n\t\t\"ats-dev\",\n\t\t\"ats-canary\"\n\t]),\n\truntimeId: prepareReadinessRuntimeIdSchema.nullable(),\n\tstatus: localRuntimeExecutionTargetStatusSchema,\n\tcapabilities: z.array(localRuntimeExecutionTargetCapabilitySchema),\n\tlocalAgentCatalog: localAgentCatalogSchema,\n\treasonCodes: z.array(reasonCodeSchema$1),\n\tlastObservedAtMs: z.number().int().nonnegative().nullable(),\n\tisCurrent: z.boolean()\n});\nconst localRuntimeConnectionStatusSchema = z.enum([\"connected\", \"legacy_disconnected\"]);\nconst localRuntimeComputerSchema = z.strictObject({\n\tconnectedComputerId: START_BOUNDED_ID_SCHEMA.optional(),\n\tconnectionStatus: localRuntimeConnectionStatusSchema.optional(),\n\tdeviceId: START_BOUNDED_ID_SCHEMA,\n\tdeviceDisplayName: z.string().min(1),\n\tdeviceDisplayNameSource: localRuntimeDisplayNameSourceSchema,\n\tplatformFamily: localRuntimePlatformFamilySchema,\n\tosVersion: z.string().trim().min(1).max(120).nullable(),\n\tdeviceType: localRuntimeDeviceTypeSchema,\n\tfirstSeenAtMs: z.number().int().nonnegative(),\n\tlastObservedAtMs: z.number().int().nonnegative().nullable(),\n\tisCurrent: z.boolean(),\n\tlegacyDeviceIds: z.array(START_BOUNDED_ID_SCHEMA).optional(),\n\texecutionTargets: z.array(localRuntimeExecutionTargetSchema)\n});\nconst localRuntimeLegacyDeviceEvidenceSchema = z.strictObject({\n\tconnectionStatus: z.literal(\"legacy_disconnected\"),\n\tdeviceId: START_BOUNDED_ID_SCHEMA,\n\tdeviceDisplayName: z.string().min(1),\n\tdeviceDisplayNameSource: localRuntimeDisplayNameSourceSchema,\n\tplatformFamily: localRuntimePlatformFamilySchema,\n\tosVersion: z.string().trim().min(1).max(120).nullable(),\n\tdeviceType: localRuntimeDeviceTypeSchema,\n\tfirstSeenAtMs: z.number().int().nonnegative(),\n\tlastObservedAtMs: z.number().int().nonnegative().nullable(),\n\texecutionTargets: z.array(localRuntimeExecutionTargetSchema)\n});\nconst localRuntimesConnectionIdentityAdoptionSchema = z.enum([\"safe_legacy_current\"]);\nconst localRuntimesQuerySchema = z.strictObject({ connectionIdentityAdoption: localRuntimesConnectionIdentityAdoptionSchema.optional() });\nconst localRuntimesResponseSchema = z.strictObject({\n\tcurrentConnectedComputerId: START_BOUNDED_ID_SCHEMA.nullable().optional(),\n\tcurrentDeviceId: START_BOUNDED_ID_SCHEMA.nullable(),\n\tcurrentRuntimeLane: daemonServiceLaneSchema.nullable(),\n\tlocalRuntimes: z.array(localRuntimeComputerSchema),\n\tlegacyDeviceEvidence: z.array(localRuntimeLegacyDeviceEvidenceSchema).optional()\n});\nconst setLocalRuntimeDisplayNameBodySchema = z.strictObject({ displayName: z.string().trim().min(1).max(80).nullable() });\nconst localRuntimeReplyReadinessStatusSchema = z.enum([\n\t\"ready\",\n\t\"blocked\",\n\t\"checking\",\n\t\"unknown\"\n]);\nconst localRuntimeReplyReadinessPrimaryBlockerSchema = z.enum([\n\t\"none\",\n\t\"current_runtime_missing\",\n\t\"runtime_capability_not_ready\",\n\t\"runtime_capability_stale\",\n\t\"runtime_capability_unknown\",\n\t\"service_not_connected\",\n\t\"service_update_required\",\n\t\"service_unavailable\"\n]);\nconst localRuntimeReplyReadinessNextActionSchema = z.enum([\n\t\"none\",\n\t\"connect_service\",\n\t\"reconnect_service\",\n\t\"run_setup\",\n\t\"check_status\",\n\t\"update_service\"\n]);\nconst currentLocalRuntimeReplyReadinessResponseSchema = z.strictObject({\n\tcanReplyFromThisComputer: z.boolean(),\n\tgeneratedAt: ISO_DATE_TIME_SCHEMA$4,\n\tmessage: z.string().trim().min(1).max(500),\n\tnextAction: localRuntimeReplyReadinessNextActionSchema,\n\tprimaryBlocker: localRuntimeReplyReadinessPrimaryBlockerSchema,\n\tstatus: localRuntimeReplyReadinessStatusSchema,\n\tcurrentTarget: z.discriminatedUnion(\"availability\", [z.strictObject({ availability: z.literal(\"missing\") }), z.strictObject({\n\t\tavailability: z.literal(\"resolved\"),\n\t\tdeviceId: START_BOUNDED_ID_SCHEMA,\n\t\truntimeLane: daemonServiceLaneSchema\n\t})]),\n\truntime: z.strictObject({\n\t\tdeviceDisplayName: z.string().trim().min(1).nullable(),\n\t\tdeviceId: START_BOUNDED_ID_SCHEMA.nullable(),\n\t\texecutionTargetStatus: localRuntimeExecutionTargetStatusSchema.nullable(),\n\t\tlastObservedAtMs: z.number().int().nonnegative().nullable(),\n\t\treasonCodes: z.array(reasonCodeSchema$1),\n\t\truntimeId: prepareReadinessRuntimeIdSchema.nullable(),\n\t\truntimeLane: daemonServiceLaneSchema.nullable()\n\t}),\n\tservice: z.strictObject({\n\t\tconnected: z.boolean(),\n\t\texecutionCompatibility: daemonExecutionCompatibilitySchema.nullable(),\n\t\tmatchingCurrentRuntime: z.boolean(),\n\t\treasonCodes: z.array(reasonCodeSchema$1),\n\t\tsessionDeviceId: START_BOUNDED_ID_SCHEMA.nullable(),\n\t\tsessionLane: daemonServiceLaneSchema.nullable()\n\t})\n});\n\n//#endregion\n//#region src/schemas/http/device-metadata.ts\nconst observedDeviceTypeSchema = localRuntimeDeviceTypeSchema;\nconst observedDeviceMetadataSchema = z.strictObject({\n\tobservedDisplayName: z.string().trim().min(1).max(200).nullable(),\n\tplatformFamily: localRuntimePlatformFamilySchema,\n\tosVersion: z.string().trim().min(1).max(120).nullable(),\n\tdeviceType: observedDeviceTypeSchema,\n\tobservedAtMs: z.number().int().nonnegative()\n});\nconst writeCurrentDeviceObservedMetadataBodySchema = z.strictObject({ metadata: observedDeviceMetadataSchema });\nconst writeCurrentDeviceObservedMetadataResponseSchema = writeCurrentDeviceObservedMetadataBodySchema;\nconst writeSetupTokenLocalRuntimeObservedMetadataBodySchema = z.strictObject({\n\topaqueToken: startOpaqueTokenSchema,\n\tmetadata: observedDeviceMetadataSchema\n});\nconst writeSetupTokenLocalRuntimeObservedMetadataResponseSchema = writeCurrentDeviceObservedMetadataResponseSchema;\n\n//#endregion\n//#region src/schemas/http/gateway-error.ts\nconst trimmedNonEmptyStringSchema$4 = z.string().trim().min(1);\nconst gatewayErrorCodeSchema = z.enum([\n\t\"bad_request\",\n\t\"upstream_error\",\n\t\"upstream_unreachable\",\n\t\"invalid_json\",\n\t\"invalid_payload\",\n\t\"invalid_device_id\",\n\t\"invalid_space_id\",\n\t\"hello_required\",\n\t\"gateway.misconfigured\",\n\t\"auth.unauthenticated\",\n\t\"profile.not_found\",\n\t\"profile.invalid_input\",\n\t\"connected_computer.enrollment_invalid\",\n\t\"device.forgotten\",\n\t\"invalid_password_payload\",\n\t\"space.not_found\",\n\t\"space.forbidden\",\n\t\"space.human_confirmation_required\",\n\t\"space.leave_space.creator_forbidden\",\n\t\"space.members.creator_forbidden\",\n\t\"space.members.current_profile_forbidden\",\n\t\"space.wake.client_message_id_required\",\n\t\"space.wake.handoff_seed_failed\",\n\t\"space.wake.target_invalid\",\n\t\"space.password_required\",\n\t\"space.password_invalid\",\n\t\"space.password_too_short\",\n\t\"space.publication_mode.owner_required\",\n\t\"space.publication_mode.password_not_configured\",\n\t\"diagnostic_report.reported_signal_not_found\",\n\t\"diagnostic_report.store_unavailable\",\n\t\"start.session.not_found\",\n\t\"start.session.store_unavailable\",\n\t\"start.session.space_choice_already_finalized\",\n\t\"start.session.space_choice_in_progress\",\n\t\"start.session.space_choice_not_pending\",\n\t\"start.session.profile_unavailable\",\n\t\"start.session.profile_unresolved\",\n\t\"start.session.token_invalid\",\n\t\"start.session.token_stale\",\n\t\"start.session.token_unavailable\",\n\t\"prepare.session.not_found\",\n\t\"prepare.session.revision_conflict\",\n\t\"prepare.session.store_unavailable\",\n\t\"prepare.session.terminal_stale\",\n\t\"prepare.session.token_invalid\"\n]);\nconst gatewayErrorSchema = commonErrorSchema.extend({\n\tcode: gatewayErrorCodeSchema,\n\trequestId: trimmedNonEmptyStringSchema$4,\n\tupstreamCode: trimmedNonEmptyStringSchema$4.optional()\n});\nconst gatewayErrorEnvelopeSchema = z.strictObject({\n\tok: z.literal(false),\n\terror: gatewayErrorSchema\n});\n\n//#endregion\n//#region src/schemas/http/list-signals-query.ts\nconst CATCHUP_DEFAULT_LIMIT = 200;\nconst CATCHUP_MAX_LIMIT = 500;\nconst MAX_DATE_TIMESTAMP_MS = 864e13;\nconst NON_NEGATIVE_INT_RE$1 = /^\\d+$/;\nconst SIGNAL_TYPE_SET = new Set([\n\t\"signal.text\",\n\t\"signal.status\",\n\t\"signal.system_notice\"\n]);\nconst listSignalsQueryInputSchema = z.strictObject({\n\tafterTs: z.string().nullable(),\n\tcursor: z.string().nullable(),\n\tlimit: z.string().nullable(),\n\trecent: z.string().nullable(),\n\tafterSignalId: z.string().nullable(),\n\taroundSignalId: z.string().nullable(),\n\tbeforeCount: z.string().nullable(),\n\tafterCount: z.string().nullable(),\n\tfromProfileIds: z.array(z.string()),\n\tsignalTypes: z.array(z.string()),\n\thasLimit: z.boolean()\n});\nfunction readListSignalsQueryRawValues(searchParams) {\n\treturn {\n\t\tafterTs: searchParams.get(\"afterTs\"),\n\t\tcursor: searchParams.get(\"cursor\"),\n\t\tlimit: searchParams.get(\"limit\"),\n\t\trecent: searchParams.get(\"recent\"),\n\t\tafterSignalId: searchParams.get(\"afterSignalId\"),\n\t\taroundSignalId: searchParams.get(\"aroundSignalId\"),\n\t\tbeforeCount: searchParams.get(\"beforeCount\"),\n\t\tafterCount: searchParams.get(\"afterCount\"),\n\t\tfromProfileIds: searchParams.getAll(\"fromProfileId\"),\n\t\tsignalTypes: searchParams.getAll(\"signalType\"),\n\t\thasLimit: searchParams.has(\"limit\")\n\t};\n}\nconst parseOptionalNonNegativeInt = (value) => {\n\tif (value === null) return null;\n\tconst normalized = value.trim();\n\tif (normalized === \"\") return null;\n\tif (!NON_NEGATIVE_INT_RE$1.test(normalized)) return null;\n\tconst parsed = Number.parseInt(normalized, 10);\n\tif (!Number.isFinite(parsed) || parsed < 0) return null;\n\treturn parsed;\n};\nconst hasNonEmptyQueryValue = (value) => value !== null && value.trim() !== \"\";\n/** `null` and `0` both map to default page size; other values are capped. */\nconst parseLimit = (parsed) => {\n\tif (parsed === null || parsed === 0) return CATCHUP_DEFAULT_LIMIT;\n\treturn Math.min(parsed, CATCHUP_MAX_LIMIT);\n};\nconst normalizeCursor = (value) => {\n\tconst cursor = String(value ?? \"\").trim();\n\treturn cursor.length > 0 ? cursor : null;\n};\nconst normalizeIdentifier = (value) => {\n\tconst normalized = String(value ?? \"\").trim();\n\treturn normalized.length > 0 ? normalized : null;\n};\nconst parseRecentQuery = (value) => {\n\tconst normalized = String(value ?? \"\").trim().toLowerCase();\n\treturn normalized === \"1\" || normalized === \"true\";\n};\nconst normalizeUniqueStrings = (values) => {\n\tconst deduped = /* @__PURE__ */ new Set();\n\tfor (const value of values) {\n\t\tconst normalized = String(value ?? \"\").trim();\n\t\tif (normalized.length > 0) deduped.add(normalized);\n\t}\n\treturn [...deduped];\n};\nconst normalizeSignalTypes = (values) => {\n\tconst deduped = /* @__PURE__ */ new Set();\n\tfor (const value of values) {\n\t\tconst normalized = String(value ?? \"\").trim();\n\t\tif (SIGNAL_TYPE_SET.has(normalized)) deduped.add(normalized);\n\t}\n\treturn [...deduped];\n};\nconst addQueryIssue = (ctx, path, message) => {\n\tctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage,\n\t\tpath: [path]\n\t});\n};\nconst buildListSignalsQueryValidationState = (value) => ({\n\tafterTs: parseOptionalNonNegativeInt(value.afterTs),\n\tparsedLimit: parseOptionalNonNegativeInt(value.limit),\n\tafterSignalId: normalizeIdentifier(value.afterSignalId),\n\taroundSignalId: normalizeIdentifier(value.aroundSignalId),\n\tbeforeCount: parseOptionalNonNegativeInt(value.beforeCount),\n\tafterCount: parseOptionalNonNegativeInt(value.afterCount),\n\trecentOnly: parseRecentQuery(value.recent),\n\tcursor: normalizeCursor(value.cursor)\n});\nfunction resolveListSignalsReadQuerySemantics(input) {\n\tconst issues = [];\n\tif (input.afterSignalId && input.aroundSignalId) issues.push({\n\t\tpath: \"afterSignalId\",\n\t\tmessage: \"Cannot use both afterSignalId and aroundSignalId.\"\n\t});\n\tif (input.recentOnly && (input.afterSignalId || input.aroundSignalId)) issues.push({\n\t\tpath: \"recent\",\n\t\tmessage: \"Recent history mode cannot be combined with signal anchors.\"\n\t});\n\tif ((input.beforeCount !== null || input.afterCount !== null) && !input.aroundSignalId) issues.push({\n\t\tpath: input.beforeCount === null ? \"afterCount\" : \"beforeCount\",\n\t\tmessage: \"beforeCount and afterCount require aroundSignalId.\"\n\t});\n\tif (input.aroundSignalId && input.hasExplicitLimit) issues.push({\n\t\tpath: \"aroundSignalId\",\n\t\tmessage: \"aroundSignalId cannot be combined with limit.\"\n\t});\n\tif (input.aroundSignalId && (input.beforeCount ?? 0) <= 0 && (input.afterCount ?? 0) <= 0) issues.push({\n\t\tpath: \"aroundSignalId\",\n\t\tmessage: \"aroundSignalId requires beforeCount > 0 or afterCount > 0.\"\n\t});\n\tif (issues.length > 0) return {\n\t\tok: false,\n\t\tissues\n\t};\n\treturn {\n\t\tok: true,\n\t\tvalue: {\n\t\t\trecentOnly: input.recentOnly,\n\t\t\tincludeLimit: input.hasExplicitLimit,\n\t\t\tlimit: input.afterSignalId && input.limit === 0 ? 0 : parseLimit(input.limit),\n\t\t\tafterSignalId: input.afterSignalId,\n\t\t\taroundSignalId: input.aroundSignalId,\n\t\t\tbeforeCount: input.beforeCount,\n\t\t\tafterCount: input.afterCount\n\t\t}\n\t};\n}\nfunction normalizeListSignalsReadQuerySemantics(input) {\n\tconst result = resolveListSignalsReadQuerySemantics(input);\n\tif (!result.ok) throw new Error(result.issues[0]?.message ?? \"Invalid list signals query.\");\n\treturn result.value;\n}\nconst validateListSignalsPrimitiveValues = (value, state, ctx) => {\n\tif (hasNonEmptyQueryValue(value.afterTs) && (state.afterTs === null || state.afterTs > MAX_DATE_TIMESTAMP_MS)) addQueryIssue(ctx, \"afterTs\", \"Invalid afterTs\");\n\tif (hasNonEmptyQueryValue(value.limit) && state.parsedLimit === null) addQueryIssue(ctx, \"limit\", \"Invalid limit\");\n\tif (value.afterSignalId !== null && state.afterSignalId === null) addQueryIssue(ctx, \"afterSignalId\", \"Invalid afterSignalId\");\n\tif (value.aroundSignalId !== null && state.aroundSignalId === null) addQueryIssue(ctx, \"aroundSignalId\", \"Invalid aroundSignalId\");\n\tif (hasNonEmptyQueryValue(value.beforeCount) && state.beforeCount === null) addQueryIssue(ctx, \"beforeCount\", \"Invalid beforeCount\");\n\tif (hasNonEmptyQueryValue(value.afterCount) && state.afterCount === null) addQueryIssue(ctx, \"afterCount\", \"Invalid afterCount\");\n};\nconst validateListSignalsSignalTypes = (signalTypes, ctx) => {\n\tfor (const signalType of signalTypes) {\n\t\tconst normalized = signalType.trim();\n\t\tif (normalized.length === 0 || !SIGNAL_TYPE_SET.has(normalized)) {\n\t\t\taddQueryIssue(ctx, \"signalTypes\", \"Invalid signalType\");\n\t\t\tbreak;\n\t\t}\n\t}\n};\nconst validateListSignalsQueryCombinations = (value, state, ctx) => {\n\tif ((state.afterSignalId || state.aroundSignalId) && (state.afterTs !== null || state.cursor !== null)) addQueryIssue(ctx, state.afterSignalId ? \"afterSignalId\" : \"aroundSignalId\", \"signal anchors cannot be combined with afterTs or cursor\");\n\tconst resolvedSemantics = resolveListSignalsReadQuerySemantics({\n\t\trecentOnly: state.recentOnly,\n\t\thasExplicitLimit: value.hasLimit,\n\t\tlimit: state.parsedLimit,\n\t\tafterSignalId: state.afterSignalId,\n\t\taroundSignalId: state.aroundSignalId,\n\t\tbeforeCount: state.beforeCount,\n\t\tafterCount: state.afterCount\n\t});\n\tif (!resolvedSemantics.ok) for (const issue of resolvedSemantics.issues) addQueryIssue(ctx, issue.path, issue.message);\n};\n/**\n* Normalizes list-signals query into one execution shape.\n* `hasLimit` keeps cursor-response mode explicit even without cursor/afterTs.\n*/\nconst listSignalsQuerySchema = listSignalsQueryInputSchema.superRefine((value, ctx) => {\n\tconst state = buildListSignalsQueryValidationState(value);\n\tvalidateListSignalsPrimitiveValues(value, state, ctx);\n\tvalidateListSignalsSignalTypes(value.signalTypes, ctx);\n\tvalidateListSignalsQueryCombinations(value, state, ctx);\n}).transform((value) => {\n\tconst afterTs = parseOptionalNonNegativeInt(value.afterTs);\n\tconst cursor = normalizeCursor(value.cursor);\n\tconst afterSignalId = normalizeIdentifier(value.afterSignalId);\n\tconst aroundSignalId = normalizeIdentifier(value.aroundSignalId);\n\tconst parsedLimit = parseOptionalNonNegativeInt(value.limit);\n\tconst semantics = normalizeListSignalsReadQuerySemantics({\n\t\trecentOnly: parseRecentQuery(value.recent),\n\t\thasExplicitLimit: value.hasLimit,\n\t\tlimit: parsedLimit,\n\t\tafterSignalId,\n\t\taroundSignalId,\n\t\tbeforeCount: parseOptionalNonNegativeInt(value.beforeCount),\n\t\tafterCount: parseOptionalNonNegativeInt(value.afterCount)\n\t});\n\tconst useCursorResponse = afterTs !== null || cursor !== null || value.hasLimit;\n\treturn {\n\t\tafterTs,\n\t\tcursor,\n\t\tlimit: semantics.limit,\n\t\trecentOnly: semantics.recentOnly,\n\t\tuseCursorResponse,\n\t\tafterSignalId: semantics.afterSignalId,\n\t\taroundSignalId: semantics.aroundSignalId,\n\t\tbeforeCount: semantics.beforeCount,\n\t\tafterCount: semantics.afterCount,\n\t\tfromProfileIds: normalizeUniqueStrings(value.fromProfileIds),\n\t\tsignalTypes: normalizeSignalTypes(value.signalTypes)\n\t};\n});\n\n//#endregion\n//#region src/schemas/http/observability-correlation.ts\nconst OBSERVABILITY_WAKE_CORRELATION_MODEL_VERSION = \"ats.observability.wake.v1\";\nconst observabilityIdentifierSchema$1 = z.string().trim().min(1).max(512);\nconst nullableObservabilityIdentifierSchema$1 = observabilityIdentifierSchema$1.nullable();\nconst spaceScopedSelectorBaseSchema = z.strictObject({ spaceId: observabilityIdentifierSchema$1 });\nconst observabilityWakeTraceSelectorSchema = z.discriminatedUnion(\"kind\", [\n\tspaceScopedSelectorBaseSchema.extend({\n\t\tkind: z.literal(\"dispatch\"),\n\t\tdispatchId: observabilityIdentifierSchema$1\n\t}),\n\tspaceScopedSelectorBaseSchema.extend({\n\t\tkind: z.literal(\"client_message\"),\n\t\tclientMessageId: clientMessageIdSchema$1,\n\t\ttargetProfileId: observabilityIdentifierSchema$1\n\t}),\n\tspaceScopedSelectorBaseSchema.extend({\n\t\tkind: z.literal(\"source_signal\"),\n\t\tsourceSignalId: observabilityIdentifierSchema$1,\n\t\ttargetProfileId: observabilityIdentifierSchema$1\n\t}),\n\tz.strictObject({\n\t\tkind: z.literal(\"claim_lease\"),\n\t\tclaimLeaseId: observabilityIdentifierSchema$1\n\t})\n]);\nconst observabilityCloudflareRuntimeEvidenceSchema = z.strictObject({\n\tcfRayId: nullableObservabilityIdentifierSchema$1,\n\trequestId: nullableObservabilityIdentifierSchema$1,\n\ttraceId: nullableObservabilityIdentifierSchema$1\n});\nconst observabilityWakeCorrelationSchema = z.strictObject({\n\tmodelVersion: z.literal(OBSERVABILITY_WAKE_CORRELATION_MODEL_VERSION),\n\tselector: observabilityWakeTraceSelectorSchema,\n\tspaceId: nullableObservabilityIdentifierSchema$1,\n\tclientMessageId: clientMessageIdSchema$1.nullable(),\n\tsourceSignalId: nullableObservabilityIdentifierSchema$1,\n\ttargetProfileId: nullableObservabilityIdentifierSchema$1,\n\tdispatchId: nullableObservabilityIdentifierSchema$1,\n\truntimeCoordinatorExecutionId: nullableObservabilityIdentifierSchema$1,\n\tlatestAttemptId: nullableObservabilityIdentifierSchema$1,\n\tclaimLeaseId: nullableObservabilityIdentifierSchema$1,\n\tbindingId: nullableObservabilityIdentifierSchema$1,\n\truntimeId: nullableObservabilityIdentifierSchema$1,\n\tcapabilityRef: nullableObservabilityIdentifierSchema$1,\n\tresultRef: nullableObservabilityIdentifierSchema$1,\n\tpublishedSignalId: nullableObservabilityIdentifierSchema$1,\n\treplySignalId: nullableObservabilityIdentifierSchema$1,\n\tcloudflare: observabilityCloudflareRuntimeEvidenceSchema\n}).superRefine((value, context) => {\n\tconst addIssue = (path, message) => {\n\t\tcontext.addIssue({\n\t\t\tcode: \"custom\",\n\t\t\tmessage,\n\t\t\tpath\n\t\t});\n\t};\n\tswitch (value.selector.kind) {\n\t\tcase \"client_message\":\n\t\t\tif (value.spaceId !== value.selector.spaceId) addIssue([\"spaceId\"], \"spaceId must match selector.spaceId\");\n\t\t\tif (value.clientMessageId !== value.selector.clientMessageId) addIssue([\"clientMessageId\"], \"clientMessageId must match selector.clientMessageId\");\n\t\t\tif (value.targetProfileId !== value.selector.targetProfileId) addIssue([\"targetProfileId\"], \"targetProfileId must match selector.targetProfileId\");\n\t\t\treturn;\n\t\tcase \"source_signal\":\n\t\t\tif (value.spaceId !== value.selector.spaceId) addIssue([\"spaceId\"], \"spaceId must match selector.spaceId\");\n\t\t\tif (value.sourceSignalId !== value.selector.sourceSignalId) addIssue([\"sourceSignalId\"], \"sourceSignalId must match selector.sourceSignalId\");\n\t\t\tif (value.targetProfileId !== value.selector.targetProfileId) addIssue([\"targetProfileId\"], \"targetProfileId must match selector.targetProfileId\");\n\t\t\treturn;\n\t\tcase \"dispatch\":\n\t\t\tif (value.spaceId !== value.selector.spaceId) addIssue([\"spaceId\"], \"spaceId must match selector.spaceId\");\n\t\t\tif (value.dispatchId !== value.selector.dispatchId) addIssue([\"dispatchId\"], \"dispatchId must match selector.dispatchId\");\n\t\t\treturn;\n\t\tcase \"claim_lease\":\n\t\t\tif (value.claimLeaseId !== value.selector.claimLeaseId) addIssue([\"claimLeaseId\"], \"claimLeaseId must match selector.claimLeaseId\");\n\t\t\treturn;\n\t\tdefault: return;\n\t}\n});\nfunction buildObservabilityWakeCorrelation(input) {\n\tconst candidate = {\n\t\tmodelVersion: OBSERVABILITY_WAKE_CORRELATION_MODEL_VERSION,\n\t\tselector: input.selector,\n\t\tspaceId: normalizeOptionalObservabilityId$1(input.spaceId),\n\t\tclientMessageId: normalizeOptionalClientMessageId$1(input.clientMessageId),\n\t\tsourceSignalId: normalizeOptionalObservabilityId$1(input.sourceSignalId),\n\t\ttargetProfileId: normalizeOptionalObservabilityId$1(input.targetProfileId),\n\t\tdispatchId: normalizeOptionalObservabilityId$1(input.dispatchId),\n\t\truntimeCoordinatorExecutionId: normalizeOptionalObservabilityId$1(input.runtimeCoordinatorExecutionId),\n\t\tlatestAttemptId: normalizeOptionalObservabilityId$1(input.latestAttemptId),\n\t\tclaimLeaseId: normalizeOptionalObservabilityId$1(input.claimLeaseId),\n\t\tbindingId: normalizeOptionalObservabilityId$1(input.bindingId),\n\t\truntimeId: normalizeOptionalObservabilityId$1(input.runtimeId),\n\t\tcapabilityRef: normalizeOptionalObservabilityId$1(input.capabilityRef),\n\t\tresultRef: normalizeOptionalObservabilityId$1(input.resultRef),\n\t\tpublishedSignalId: normalizeOptionalObservabilityId$1(input.publishedSignalId),\n\t\treplySignalId: normalizeOptionalObservabilityId$1(input.replySignalId),\n\t\tcloudflare: {\n\t\t\tcfRayId: normalizeOptionalObservabilityId$1(input.cloudflare?.cfRayId),\n\t\t\trequestId: normalizeOptionalObservabilityId$1(input.cloudflare?.requestId),\n\t\t\ttraceId: normalizeOptionalObservabilityId$1(input.cloudflare?.traceId)\n\t\t}\n\t};\n\tconst parsed = observabilityWakeCorrelationSchema.safeParse(candidate);\n\tif (!parsed.success) throw new Error(\"invalid observability wake correlation evidence\");\n\treturn parsed.data;\n}\nfunction projectObservabilityWakeCorrelation(input) {\n\tconst selector = parseObservabilityWakeTraceSelector(input.selector);\n\tconst dispatch = input.facts?.dispatch ?? null;\n\tconst latestAttempt = input.facts?.latestAttempt ?? null;\n\tconst coordinatorExecution = input.facts?.coordinatorExecution ?? null;\n\tconst claimLease = input.facts?.claimLease ?? null;\n\tconst result = input.facts?.result ?? null;\n\tconst replySignal = input.facts?.replySignal ?? null;\n\treturn buildObservabilityWakeCorrelation({\n\t\tselector,\n\t\tspaceId: consistentObservabilityId(input.spaceId, getSelectorSpaceId(selector)),\n\t\tclientMessageId: consistentClientMessageId(dispatch?.sourceClientMessageId, coordinatorExecution?.sourceClientMessageId, claimLease?.sourceClientMessageId, input.clientMessageId, getSelectorClientMessageId(selector)),\n\t\tsourceSignalId: consistentObservabilityId(dispatch?.sourceEventId, claimLease?.sourceEventId, input.sourceSignalId, getSelectorSourceSignalId(selector)),\n\t\ttargetProfileId: consistentObservabilityId(dispatch?.targetProfileId, coordinatorExecution?.targetProfileId, claimLease?.targetProfileId, input.targetProfileId, getSelectorTargetProfileId(selector)),\n\t\tdispatchId: consistentObservabilityId(dispatch?.dispatchId, coordinatorExecution?.dispatchId, latestAttempt?.dispatchId, claimLease?.dispatchId, result?.dispatchId, input.dispatchId, getSelectorDispatchId(selector)),\n\t\tlatestAttemptId: consistentObservabilityId(latestAttempt?.attemptId, dispatch?.latestAttemptId, input.latestAttemptId),\n\t\truntimeCoordinatorExecutionId: consistentObservabilityId(coordinatorExecution?.runtimeCoordinatorExecutionId, input.runtimeCoordinatorExecutionId),\n\t\tclaimLeaseId: consistentObservabilityId(claimLease?.claimLeaseId, input.claimLeaseId, getSelectorClaimLeaseId(selector)),\n\t\tbindingId: consistentObservabilityId(coordinatorExecution?.bindingId, claimLease?.bindingId, input.bindingId),\n\t\truntimeId: consistentObservabilityId(coordinatorExecution?.runtimeId, claimLease?.runtimeId, input.runtimeId),\n\t\tcapabilityRef: consistentObservabilityId(coordinatorExecution?.capabilityRef, claimLease?.capabilityRef, input.capabilityRef),\n\t\tresultRef: consistentObservabilityId(result?.resultRef, input.resultRef),\n\t\tpublishedSignalId: consistentObservabilityId(result?.publishedSignalId, input.publishedSignalId),\n\t\treplySignalId: consistentObservabilityId(replySignal?.signalId, input.replySignalId),\n\t\tcloudflare: projectCloudflareRuntimeEvidence(input.cloudflare)\n\t});\n}\nfunction parseObservabilityWakeTraceSelector(value) {\n\tconst parsed = observabilityWakeTraceSelectorSchema.safeParse(value);\n\tif (!parsed.success) throw new Error(\"invalid observability wake trace selector\");\n\treturn parsed.data;\n}\nfunction getSelectorSpaceId(selector) {\n\tswitch (selector.kind) {\n\t\tcase \"client_message\":\n\t\tcase \"dispatch\":\n\t\tcase \"source_signal\": return selector.spaceId;\n\t\tcase \"claim_lease\": return null;\n\t\tdefault: return null;\n\t}\n}\nfunction getSelectorClientMessageId(selector) {\n\treturn selector.kind === \"client_message\" ? selector.clientMessageId : null;\n}\nfunction getSelectorSourceSignalId(selector) {\n\treturn selector.kind === \"source_signal\" ? selector.sourceSignalId : null;\n}\nfunction getSelectorTargetProfileId(selector) {\n\tswitch (selector.kind) {\n\t\tcase \"client_message\":\n\t\tcase \"source_signal\": return selector.targetProfileId;\n\t\tcase \"claim_lease\":\n\t\tcase \"dispatch\": return null;\n\t\tdefault: return null;\n\t}\n}\nfunction getSelectorDispatchId(selector) {\n\treturn selector.kind === \"dispatch\" ? selector.dispatchId : null;\n}\nfunction getSelectorClaimLeaseId(selector) {\n\treturn selector.kind === \"claim_lease\" ? selector.claimLeaseId : null;\n}\nfunction consistentObservabilityId(...values) {\n\tlet projected = null;\n\tfor (const value of values) {\n\t\tconst normalized = projectOptionalObservabilityId(value);\n\t\tif (normalized === null) continue;\n\t\tif (projected === null) {\n\t\t\tprojected = normalized;\n\t\t\tcontinue;\n\t\t}\n\t\tif (projected !== normalized) throw new Error(\"invalid observability wake correlation evidence\");\n\t}\n\treturn projected;\n}\nfunction consistentClientMessageId(...values) {\n\tlet projected = null;\n\tfor (const value of values) {\n\t\tconst normalized = projectOptionalClientMessageId(value);\n\t\tif (normalized === null) continue;\n\t\tif (projected === null) {\n\t\t\tprojected = normalized;\n\t\t\tcontinue;\n\t\t}\n\t\tif (projected !== normalized) throw new Error(\"invalid observability wake correlation evidence\");\n\t}\n\treturn projected;\n}\nfunction projectCloudflareRuntimeEvidence(value) {\n\tif (value === null || value === void 0) return null;\n\treturn {\n\t\tcfRayId: projectOptionalObservabilityId(value.cfRayId),\n\t\trequestId: projectOptionalObservabilityId(value.requestId),\n\t\ttraceId: projectOptionalObservabilityId(value.traceId)\n\t};\n}\nfunction projectOptionalObservabilityId(value) {\n\tif (value === null || value === void 0) return null;\n\tconst parsed = observabilityIdentifierSchema$1.safeParse(value);\n\tif (!parsed.success) throw new Error(\"invalid observability wake correlation evidence\");\n\treturn parsed.data;\n}\nfunction projectOptionalClientMessageId(value) {\n\tif (value === null || value === void 0) return null;\n\tconst parsed = clientMessageIdSchema$1.safeParse(value);\n\tif (!parsed.success) throw new Error(\"invalid observability wake correlation evidence\");\n\treturn parsed.data;\n}\nfunction normalizeOptionalObservabilityId$1(value) {\n\tconst parsed = observabilityIdentifierSchema$1.safeParse(value);\n\treturn parsed.success ? parsed.data : null;\n}\nfunction normalizeOptionalClientMessageId$1(value) {\n\tconst parsed = clientMessageIdSchema$1.safeParse(value);\n\treturn parsed.success ? parsed.data : null;\n}\n\n//#endregion\n//#region src/schemas/http/observability-runtime-event.ts\nconst OBSERVABILITY_CLOUDFLARE_RUNTIME_EVENT_MODEL_VERSION = \"ats.cloudflare.runtime_evidence.v1\";\nconst OBSERVABILITY_CLOUDFLARE_ANALYTICS_BLOBS = [\n\t\"event\",\n\t\"workerName\",\n\t\"runtimeKind\",\n\t\"status\",\n\t\"reasonCode\",\n\t\"spaceId\",\n\t\"clientMessageId\",\n\t\"sourceSignalId\",\n\t\"targetProfileId\",\n\t\"dispatchId\",\n\t\"runtimeCoordinatorExecutionId\",\n\t\"latestAttemptId\",\n\t\"claimLeaseId\",\n\t\"bindingId\",\n\t\"runtimeId\",\n\t\"capabilityRef\",\n\t\"resultRef\",\n\t\"publishedSignalId\",\n\t\"replySignalId\",\n\t\"requestId\"\n];\nconst OBSERVABILITY_CLOUDFLARE_ANALYTICS_DOUBLES = [\n\t\"count\",\n\t\"durationMs\",\n\t\"statusCode\",\n\t\"messageCount\",\n\t\"activationTargetCount\"\n];\nconst observabilityIdentifierSchema = z.string().trim().min(1).max(512);\nconst nullableObservabilityIdentifierSchema = observabilityIdentifierSchema.nullable();\nconst nullableShortTextSchema = z.string().trim().min(1).max(160).nullable();\nconst nullableRouteTextSchema = z.string().trim().min(1).max(512).nullable();\nconst invalidRuntimeEventEvidenceMessage = \"invalid observability cloudflare runtime event evidence\";\nconst ANALYTICS_INDEX_HASH_MODULUS = 36 ** 10;\nconst observabilityCloudflareWorkerNameSchema = z.enum([\n\t\"ats-auth\",\n\t\"ats-core\",\n\t\"ats-gateway\",\n\t\"ats-web\"\n]);\nconst observabilityCloudflareRuntimeKindSchema = z.enum([\n\t\"durable_object\",\n\t\"http\",\n\t\"queue\",\n\t\"rpc\"\n]);\nconst observabilityRuntimeEvidenceStatusSchema = z.enum([\n\t\"failed\",\n\t\"started\",\n\t\"succeeded\"\n]);\nconst observabilityCloudflareRuntimeEventSchema = z.strictObject({\n\tmodelVersion: z.literal(OBSERVABILITY_CLOUDFLARE_RUNTIME_EVENT_MODEL_VERSION),\n\tcorrelationModelVersion: z.literal(OBSERVABILITY_WAKE_CORRELATION_MODEL_VERSION),\n\tevent: observabilityIdentifierSchema,\n\tworkerName: observabilityCloudflareWorkerNameSchema,\n\tworkerEnvironment: nullableShortTextSchema,\n\truntime: z.literal(\"cloudflare_workers\"),\n\truntimeKind: observabilityCloudflareRuntimeKindSchema,\n\tstatus: observabilityRuntimeEvidenceStatusSchema,\n\toperation: nullableRouteTextSchema,\n\troute: nullableRouteTextSchema,\n\tmethod: nullableShortTextSchema,\n\tstatusCode: z.number().int().min(100).max(599).nullable(),\n\tdurationMs: z.number().finite().nonnegative().nullable(),\n\tmessageCount: z.number().int().nonnegative().nullable(),\n\tactivationTargetCount: z.number().int().nonnegative().nullable(),\n\treasonCode: nullableShortTextSchema,\n\terrorName: nullableShortTextSchema,\n\tcfRayId: nullableObservabilityIdentifierSchema,\n\trequestId: nullableObservabilityIdentifierSchema,\n\ttraceId: nullableObservabilityIdentifierSchema,\n\tspaceId: nullableObservabilityIdentifierSchema,\n\tclientMessageId: clientMessageIdSchema$1.nullable(),\n\tsourceSignalId: nullableObservabilityIdentifierSchema,\n\ttargetProfileId: nullableObservabilityIdentifierSchema,\n\tdispatchId: nullableObservabilityIdentifierSchema,\n\truntimeCoordinatorExecutionId: nullableObservabilityIdentifierSchema,\n\tlatestAttemptId: nullableObservabilityIdentifierSchema,\n\tclaimLeaseId: nullableObservabilityIdentifierSchema,\n\tbindingId: nullableObservabilityIdentifierSchema,\n\truntimeId: nullableObservabilityIdentifierSchema,\n\tcapabilityRef: nullableObservabilityIdentifierSchema,\n\tresultRef: nullableObservabilityIdentifierSchema,\n\tpublishedSignalId: nullableObservabilityIdentifierSchema,\n\treplySignalId: nullableObservabilityIdentifierSchema\n});\nconst observabilityCloudflareAnalyticsDataPointSchema = z.strictObject({\n\tblobs: z.array(z.string()).length(OBSERVABILITY_CLOUDFLARE_ANALYTICS_BLOBS.length),\n\tdoubles: z.array(z.number().finite()).length(OBSERVABILITY_CLOUDFLARE_ANALYTICS_DOUBLES.length),\n\tindexes: z.array(z.string().min(1)).length(1)\n});\nconst OBSERVABILITY_CLOUDFLARE_ANALYTICS_BLOB_READERS = [\n\t(event) => event.event,\n\t(event) => event.workerName,\n\t(event) => event.runtimeKind,\n\t(event) => event.status,\n\t(event) => optionalAnalyticsString(event.reasonCode),\n\t(event) => optionalAnalyticsString(event.spaceId),\n\t(event) => optionalAnalyticsString(event.clientMessageId),\n\t(event) => optionalAnalyticsString(event.sourceSignalId),\n\t(event) => optionalAnalyticsString(event.targetProfileId),\n\t(event) => optionalAnalyticsString(event.dispatchId),\n\t(event) => optionalAnalyticsString(event.runtimeCoordinatorExecutionId),\n\t(event) => optionalAnalyticsString(event.latestAttemptId),\n\t(event) => optionalAnalyticsString(event.claimLeaseId),\n\t(event) => optionalAnalyticsString(event.bindingId),\n\t(event) => optionalAnalyticsString(event.runtimeId),\n\t(event) => optionalAnalyticsString(event.capabilityRef),\n\t(event) => optionalAnalyticsString(event.resultRef),\n\t(event) => optionalAnalyticsString(event.publishedSignalId),\n\t(event) => optionalAnalyticsString(event.replySignalId),\n\t(event) => optionalAnalyticsString(event.requestId)\n];\nconst OBSERVABILITY_CLOUDFLARE_ANALYTICS_DOUBLE_READERS = [\n\t() => 1,\n\t(event) => optionalAnalyticsNumber(event.durationMs),\n\t(event) => optionalAnalyticsNumber(event.statusCode),\n\t(event) => optionalAnalyticsNumber(event.messageCount),\n\t(event) => optionalAnalyticsNumber(event.activationTargetCount)\n];\nfunction projectObservabilityCloudflareRuntimeEvent(input) {\n\tconst candidate = {\n\t\tmodelVersion: OBSERVABILITY_CLOUDFLARE_RUNTIME_EVENT_MODEL_VERSION,\n\t\tcorrelationModelVersion: OBSERVABILITY_WAKE_CORRELATION_MODEL_VERSION,\n\t\tevent: input.event,\n\t\tworkerName: input.workerName,\n\t\tworkerEnvironment: normalizeOptionalShortText(input.workerEnvironment),\n\t\truntime: \"cloudflare_workers\",\n\t\truntimeKind: input.runtimeKind,\n\t\tstatus: input.status,\n\t\toperation: normalizeOptionalRouteText(input.operation),\n\t\troute: normalizeOptionalRouteText(input.route),\n\t\tmethod: normalizeOptionalShortText(input.method),\n\t\tstatusCode: normalizeOptionalStatusCode(input.statusCode),\n\t\tdurationMs: normalizeOptionalNonnegativeNumber(input.durationMs),\n\t\tmessageCount: normalizeOptionalNonnegativeInteger(input.messageCount),\n\t\tactivationTargetCount: normalizeOptionalNonnegativeInteger(input.activationTargetCount),\n\t\treasonCode: normalizeOptionalShortText(input.reasonCode),\n\t\terrorName: normalizeOptionalShortText(input.errorName),\n\t\tcfRayId: normalizeOptionalObservabilityId(input.cfRayId),\n\t\trequestId: normalizeOptionalObservabilityId(input.requestId),\n\t\ttraceId: normalizeOptionalObservabilityId(input.traceId),\n\t\tspaceId: normalizeOptionalObservabilityId(input.spaceId),\n\t\tclientMessageId: normalizeOptionalClientMessageId(input.clientMessageId),\n\t\tsourceSignalId: normalizeOptionalObservabilityId(input.sourceSignalId),\n\t\ttargetProfileId: normalizeOptionalObservabilityId(input.targetProfileId),\n\t\tdispatchId: normalizeOptionalObservabilityId(input.dispatchId),\n\t\truntimeCoordinatorExecutionId: normalizeOptionalObservabilityId(input.runtimeCoordinatorExecutionId),\n\t\tlatestAttemptId: normalizeOptionalObservabilityId(input.latestAttemptId),\n\t\tclaimLeaseId: normalizeOptionalObservabilityId(input.claimLeaseId),\n\t\tbindingId: normalizeOptionalObservabilityId(input.bindingId),\n\t\truntimeId: normalizeOptionalObservabilityId(input.runtimeId),\n\t\tcapabilityRef: normalizeOptionalObservabilityId(input.capabilityRef),\n\t\tresultRef: normalizeOptionalObservabilityId(input.resultRef),\n\t\tpublishedSignalId: normalizeOptionalObservabilityId(input.publishedSignalId),\n\t\treplySignalId: normalizeOptionalObservabilityId(input.replySignalId)\n\t};\n\tconst parsed = observabilityCloudflareRuntimeEventSchema.safeParse(candidate);\n\tif (!parsed.success) throw new Error(\"invalid observability cloudflare runtime event evidence\");\n\treturn parsed.data;\n}\nfunction projectObservabilityCloudflareAnalyticsDataPoint(event) {\n\tconst point = {\n\t\tblobs: projectObservabilityCloudflareAnalyticsBlobs(event),\n\t\tdoubles: projectObservabilityCloudflareAnalyticsDoubles(event),\n\t\tindexes: [selectObservabilityCloudflareAnalyticsIndex(event)]\n\t};\n\tconst parsed = observabilityCloudflareAnalyticsDataPointSchema.safeParse(point);\n\tif (!parsed.success) throw new Error(\"invalid observability cloudflare analytics data point\");\n\treturn parsed.data;\n}\nfunction selectObservabilityCloudflareAnalyticsIndex(event) {\n\treturn normalizeCloudflareAnalyticsIndex(event.clientMessageId ?? event.runtimeCoordinatorExecutionId ?? event.dispatchId ?? event.sourceSignalId ?? event.requestId ?? event.spaceId ?? event.workerName);\n}\nfunction projectObservabilityCloudflareAnalyticsBlobs(event) {\n\treturn OBSERVABILITY_CLOUDFLARE_ANALYTICS_BLOB_READERS.map((read) => read(event));\n}\nfunction projectObservabilityCloudflareAnalyticsDoubles(event) {\n\treturn OBSERVABILITY_CLOUDFLARE_ANALYTICS_DOUBLE_READERS.map((read) => read(event));\n}\nfunction optionalAnalyticsString(value) {\n\treturn value ?? \"\";\n}\nfunction optionalAnalyticsNumber(value) {\n\treturn value ?? 0;\n}\nfunction normalizeCloudflareAnalyticsIndex(value) {\n\tconst trimmed = value.trim();\n\tif (trimmed.length <= 96) return trimmed;\n\tconst hash = hashAnalyticsIndex(trimmed);\n\treturn `${trimmed.slice(0, 82)}:${hash}`.slice(0, 96);\n}\nfunction hashAnalyticsIndex(value) {\n\tlet hash = 2166136261;\n\tfor (let index = 0; index < value.length; index += 1) hash = (Math.imul(hash, 16777619) + value.charCodeAt(index)) % ANALYTICS_INDEX_HASH_MODULUS;\n\treturn Math.abs(hash).toString(36);\n}\nfunction shouldLogObservabilityCloudflareRuntimeEvent(event) {\n\tconst parsed = observabilityCloudflareRuntimeEventSchema.safeParse(event);\n\tif (!parsed.success) throw new Error(invalidRuntimeEventEvidenceMessage);\n\tconst canonicalEvent = parsed.data;\n\tif (canonicalEvent.status === \"failed\") return true;\n\tif (canonicalEvent.errorName) return true;\n\tif (canonicalEvent.statusCode !== null && canonicalEvent.statusCode >= 500) return true;\n\tif (canonicalEvent.status === \"started\") return false;\n\treturn canonicalEvent.runtimeKind !== \"http\";\n}\nfunction projectObservabilityCloudflareRuntimeConsoleEvent(event) {\n\tconst parsed = observabilityCloudflareRuntimeEventSchema.safeParse(event);\n\tif (!parsed.success) throw new Error(invalidRuntimeEventEvidenceMessage);\n\tconst canonicalEvent = parsed.data;\n\tconst output = {\n\t\tevent: canonicalEvent.event,\n\t\tworkerName: canonicalEvent.workerName,\n\t\truntimeKind: canonicalEvent.runtimeKind,\n\t\tstatus: canonicalEvent.status\n\t};\n\tappendConsoleText(output, \"workerEnvironment\", canonicalEvent.workerEnvironment);\n\tappendConsoleText(output, \"operation\", canonicalEvent.operation);\n\tappendConsoleText(output, \"route\", canonicalEvent.route);\n\tappendConsoleText(output, \"method\", canonicalEvent.method);\n\tappendConsoleNumber(output, \"statusCode\", canonicalEvent.statusCode);\n\tappendConsoleNumber(output, \"durationMs\", canonicalEvent.durationMs);\n\tappendConsoleNumber(output, \"messageCount\", canonicalEvent.messageCount);\n\tappendConsoleNumber(output, \"activationTargetCount\", canonicalEvent.activationTargetCount);\n\tappendConsoleText(output, \"reasonCode\", canonicalEvent.reasonCode);\n\tappendConsoleText(output, \"errorName\", canonicalEvent.errorName);\n\tappendConsoleText(output, \"cfRayId\", canonicalEvent.cfRayId);\n\tappendConsoleText(output, \"requestId\", canonicalEvent.requestId);\n\tappendConsoleText(output, \"traceId\", canonicalEvent.traceId);\n\tappendConsoleText(output, \"spaceId\", canonicalEvent.spaceId);\n\tappendConsoleText(output, \"clientMessageId\", canonicalEvent.clientMessageId);\n\tappendConsoleText(output, \"sourceSignalId\", canonicalEvent.sourceSignalId);\n\tappendConsoleText(output, \"targetProfileId\", canonicalEvent.targetProfileId);\n\tappendConsoleText(output, \"dispatchId\", canonicalEvent.dispatchId);\n\tappendConsoleText(output, \"runtimeCoordinatorExecutionId\", canonicalEvent.runtimeCoordinatorExecutionId);\n\tappendConsoleText(output, \"latestAttemptId\", canonicalEvent.latestAttemptId);\n\tappendConsoleText(output, \"claimLeaseId\", canonicalEvent.claimLeaseId);\n\tappendConsoleText(output, \"bindingId\", canonicalEvent.bindingId);\n\tappendConsoleText(output, \"runtimeId\", canonicalEvent.runtimeId);\n\tappendConsoleText(output, \"capabilityRef\", canonicalEvent.capabilityRef);\n\tappendConsoleText(output, \"resultRef\", canonicalEvent.resultRef);\n\tappendConsoleText(output, \"publishedSignalId\", canonicalEvent.publishedSignalId);\n\tappendConsoleText(output, \"replySignalId\", canonicalEvent.replySignalId);\n\treturn output;\n}\nfunction appendConsoleNumber(output, key, value) {\n\tif (value !== null) output[key] = value;\n}\nfunction appendConsoleText(output, key, value) {\n\tif (value) output[key] = value;\n}\nfunction normalizeOptionalObservabilityId(value) {\n\tif (value === null || value === void 0) return null;\n\tconst parsed = observabilityIdentifierSchema.safeParse(value);\n\tif (!parsed.success) throw new Error(invalidRuntimeEventEvidenceMessage);\n\treturn parsed.data;\n}\nfunction normalizeOptionalClientMessageId(value) {\n\tif (value === null || value === void 0) return null;\n\tconst parsed = clientMessageIdSchema$1.safeParse(value);\n\tif (!parsed.success) throw new Error(invalidRuntimeEventEvidenceMessage);\n\treturn parsed.data;\n}\nfunction normalizeOptionalShortText(value) {\n\tconst parsed = nullableShortTextSchema.safeParse(value);\n\tif (parsed.success) return parsed.data;\n\treturn typeof value === \"string\" && value.trim().length > 0 ? value.trim().slice(0, 160) : null;\n}\nfunction normalizeOptionalRouteText(value) {\n\tconst parsed = nullableRouteTextSchema.safeParse(value);\n\tif (parsed.success) return parsed.data;\n\treturn typeof value === \"string\" && value.trim().length > 0 ? value.trim().slice(0, 512) : null;\n}\nfunction normalizeOptionalStatusCode(value) {\n\tif (typeof value !== \"number\" || !Number.isFinite(value)) return null;\n\tconst normalized = Math.trunc(value);\n\treturn normalized >= 100 && normalized <= 599 ? normalized : null;\n}\nfunction normalizeOptionalNonnegativeNumber(value) {\n\treturn typeof value === \"number\" && Number.isFinite(value) && value >= 0 ? value : null;\n}\nfunction normalizeOptionalNonnegativeInteger(value) {\n\tif (typeof value !== \"number\" || !Number.isFinite(value)) return null;\n\treturn Math.max(0, Math.trunc(value));\n}\n\n//#endregion\n//#region src/schemas/http/profile-space-history.ts\nconst ISO_DATE_TIME_SCHEMA$3 = z.iso.datetime({ offset: true });\nconst GATEWAY_HOST_MAX_LENGTH$1 = 255;\nconst PROFILE_SPACE_HISTORY_MAX_LIMIT = 500;\nconst NON_NEGATIVE_INT_RE = /^\\d+$/;\nconst GATEWAY_HOST_PATH_CHARS_RE$1 = /[/?#]/;\nconst trimmedNonEmptyStringSchema$3 = z.string().trim().min(1);\nconst nullableTrimmedStringSchema$3 = z.union([trimmedNonEmptyStringSchema$3, z.null()]);\nconst nullableNonNegativeIntSchema = z.union([z.number().int().min(0), z.null()]);\nconst nullableIsoDateTimeSchema$2 = z.union([ISO_DATE_TIME_SCHEMA$3, z.null()]);\nconst gatewayHostSchema$1 = z.string().transform((value, ctx) => {\n\tconst normalized = value.trim().toLowerCase();\n\tif (normalized.length === 0) {\n\t\tctx.addIssue({\n\t\t\tcode: \"custom\",\n\t\t\tmessage: \"gatewayHost is required\"\n\t\t});\n\t\treturn z.NEVER;\n\t}\n\tif (normalized.includes(\"://\")) try {\n\t\tconst url = new URL(normalized);\n\t\tif (url.pathname !== \"/\" || url.search.length > 0 || url.hash.length > 0) {\n\t\t\tctx.addIssue({\n\t\t\t\tcode: \"custom\",\n\t\t\t\tmessage: \"gatewayHost must not include path/query/hash\"\n\t\t\t});\n\t\t\treturn z.NEVER;\n\t\t}\n\t\tif (url.host.length === 0) {\n\t\t\tctx.addIssue({\n\t\t\t\tcode: \"custom\",\n\t\t\t\tmessage: \"gatewayHost is required\"\n\t\t\t});\n\t\t\treturn z.NEVER;\n\t\t}\n\t\treturn url.host.toLowerCase();\n\t} catch {\n\t\tctx.addIssue({\n\t\t\tcode: \"custom\",\n\t\t\tmessage: \"gatewayHost must be a valid host\"\n\t\t});\n\t\treturn z.NEVER;\n\t}\n\tif (GATEWAY_HOST_PATH_CHARS_RE$1.test(normalized)) {\n\t\tctx.addIssue({\n\t\t\tcode: \"custom\",\n\t\t\tmessage: \"gatewayHost must not include path/query/hash\"\n\t\t});\n\t\treturn z.NEVER;\n\t}\n\treturn normalized;\n}).pipe(z.string().max(GATEWAY_HOST_MAX_LENGTH$1));\nconst profileSpaceHistoryLimitSchema = z.preprocess((value) => {\n\tif (typeof value === \"number\") return value;\n\tif (typeof value !== \"string\") return value;\n\tconst normalized = value.trim();\n\tif (!NON_NEGATIVE_INT_RE.test(normalized)) return NaN;\n\treturn Number.parseInt(normalized, 10);\n}, z.number().int().min(1).max(PROFILE_SPACE_HISTORY_MAX_LIMIT)).optional();\nconst profileSpaceHistoryPinnedFilterSchema = z.union([z.boolean(), z.enum([\"true\", \"false\"])]).optional().transform((value) => {\n\tif (value === void 0 || typeof value === \"boolean\") return value;\n\treturn value === \"true\";\n});\nconst profileSpaceHistoryStatusSchema = z.enum([\n\t\"active\",\n\t\"removed\",\n\t\"inaccessible\"\n]);\nconst profileSpaceCreatorKindSchema = z.enum([\n\t\"human\",\n\t\"agent\",\n\t\"system\"\n]);\nconst profileSpaceHistoryStatusListSchema = z.union([profileSpaceHistoryStatusSchema, z.array(profileSpaceHistoryStatusSchema)]).optional().transform((value) => {\n\tif (value === void 0) return;\n\treturn Array.isArray(value) ? value : [value];\n});\nconst profileSpaceHistoryRecordSchema = z.strictObject({\n\tprofileId: trimmedNonEmptyStringSchema$3,\n\tgatewayHost: gatewayHostSchema$1,\n\tspaceId: trimmedNonEmptyStringSchema$3,\n\tspaceName: nullableTrimmedStringSchema$3,\n\tcreatorProfileId: nullableTrimmedStringSchema$3,\n\tcreatorKind: z.union([profileSpaceCreatorKindSchema, z.null()]),\n\tspaceCreatedAt: nullableIsoDateTimeSchema$2,\n\tspaceUpdatedAt: nullableIsoDateTimeSchema$2,\n\tlastJoinedAt: ISO_DATE_TIME_SCHEMA$3,\n\tlastSeenTs: nullableNonNegativeIntSchema,\n\tpinnedAt: nullableIsoDateTimeSchema$2,\n\tstatus: profileSpaceHistoryStatusSchema,\n\tcreatedAt: ISO_DATE_TIME_SCHEMA$3,\n\tupdatedAt: ISO_DATE_TIME_SCHEMA$3\n});\nconst listProfileSpaceHistoryQuerySchema = z.strictObject({\n\tgatewayHost: gatewayHostSchema$1,\n\tstatus: profileSpaceHistoryStatusListSchema,\n\tlimit: profileSpaceHistoryLimitSchema,\n\tpinned: profileSpaceHistoryPinnedFilterSchema\n});\nconst listProfileSpaceHistoryResponseSchema = z.strictObject({ items: z.array(profileSpaceHistoryRecordSchema) });\nconst upsertProfileSpaceHistoryBodySchema = z.strictObject({\n\tgatewayHost: gatewayHostSchema$1,\n\tspaceName: nullableTrimmedStringSchema$3.optional(),\n\tcreatorProfileId: nullableTrimmedStringSchema$3.optional(),\n\tcreatorKind: z.union([profileSpaceCreatorKindSchema, z.null()]).optional(),\n\tspaceCreatedAt: nullableIsoDateTimeSchema$2.optional(),\n\tspaceUpdatedAt: nullableIsoDateTimeSchema$2.optional(),\n\tlastJoinedAt: ISO_DATE_TIME_SCHEMA$3.optional(),\n\tlastSeenTs: nullableNonNegativeIntSchema.optional(),\n\tpinnedAt: nullableIsoDateTimeSchema$2.optional(),\n\tstatus: profileSpaceHistoryStatusSchema.optional()\n});\nconst upsertProfileSpaceHistoryResponseSchema = z.strictObject({ item: profileSpaceHistoryRecordSchema });\nconst patchProfileSpaceHistoryStatusBodySchema = z.strictObject({\n\tgatewayHost: gatewayHostSchema$1,\n\tstatus: profileSpaceHistoryStatusSchema,\n\treason: z.string().trim().min(1).max(500).optional()\n});\nconst patchProfileSpaceHistoryStatusResponseSchema = z.strictObject({\n\tprofileId: trimmedNonEmptyStringSchema$3,\n\tgatewayHost: gatewayHostSchema$1,\n\tspaceId: trimmedNonEmptyStringSchema$3,\n\tstatus: profileSpaceHistoryStatusSchema,\n\tupdatedAt: ISO_DATE_TIME_SCHEMA$3\n});\n\n//#endregion\n//#region src/schemas/http/profiles.ts\nconst ISO_DATE_TIME_SCHEMA$2 = z.iso.datetime({ offset: true });\nconst authProfileKindSchema = z.enum([\"human\", \"agent\"]);\nconst authProfileStatusSchema = z.enum([\"active\", \"disabled\"]);\nconst authProfileViewSchema = z.strictObject({\n\tatsProfileId: z.string().min(1),\n\tprofileName: z.string().min(1),\n\tprofileHandle: z.string().min(1),\n\tprofileKind: authProfileKindSchema,\n\tisDefault: z.boolean(),\n\tstatus: authProfileStatusSchema,\n\townerUserId: z.string().min(1),\n\townerName: z.string().min(1).optional(),\n\tsource: z.string().min(1),\n\tcreatedByUserId: z.string().min(1).nullable(),\n\tcreatorProfileId: z.string().min(1).nullable(),\n\tlastUsedAt: ISO_DATE_TIME_SCHEMA$2.nullable(),\n\tcreatedAt: ISO_DATE_TIME_SCHEMA$2,\n\tupdatedAt: ISO_DATE_TIME_SCHEMA$2\n});\nconst createHumanProfileBodySchema = z.strictObject({\n\tprofileName: z.string().trim().min(1),\n\tcreatorProfileId: z.string().min(1).optional()\n});\nconst createAgentProfileBodySchema = z.strictObject({\n\tprofileName: z.string().trim().min(1),\n\tcreatorProfileId: z.string().min(1).optional()\n});\nconst listProfilesResponseSchema = z.strictObject({\n\tok: z.literal(true),\n\tprofiles: z.array(authProfileViewSchema)\n});\nconst resolveProfileResponseSchema = z.strictObject({\n\tok: z.literal(true),\n\tprofile: authProfileViewSchema\n});\nconst createHumanProfileResponseSchema = z.strictObject({\n\tok: z.literal(true),\n\tprofile: authProfileViewSchema\n});\nconst createAgentProfileResponseSchema = z.strictObject({\n\tok: z.literal(true),\n\tprofile: authProfileViewSchema\n});\nconst updateProfileResponseSchema = z.strictObject({\n\tok: z.literal(true),\n\tprofile: authProfileViewSchema\n});\nconst deleteProfileResponseSchema = z.strictObject({\n\tok: z.literal(true),\n\tprofile: authProfileViewSchema\n});\n\n//#endregion\n//#region src/schemas/http/runtime-reporting.ts\nconst boundedIdentifierSchema = z.string().trim().min(1).max(256);\nconst reasonCodeSchema = z.string().trim().min(1).max(256);\nconst runtimeReportingRouteParamsSchema = z.strictObject({ deviceId: boundedIdentifierSchema });\nconst runtimeReportingRuntimeIdSchema = z.strictObject({\n\tsource: z.literal(\"runtime_registry_authority\"),\n\tvalue: z.string().trim().min(1).max(512)\n});\nconst submitRuntimeRegistrationBodySchema = z.strictObject({ lane: boundedIdentifierSchema });\nconst runtimeRegistrationRejectedReasonSchema = z.enum([\n\t\"device_forgotten\",\n\t\"owner_authorization_denied\",\n\t\"owner_authorization_unknown\",\n\t\"owner_authorization_unavailable\",\n\t\"owner_kind_unsupported\",\n\t\"runtime_id_collision\",\n\t\"runtime_id_invalid\",\n\t\"runtime_id_not_opaque\",\n\t\"runtime_record_missing_after_conflict\",\n\t\"unknown\"\n]);\nconst submitRuntimeRegistrationResponseSchema = z.strictObject({\n\treason: runtimeRegistrationRejectedReasonSchema.optional(),\n\truntimeId: runtimeReportingRuntimeIdSchema.optional(),\n\tstatus: z.enum([\n\t\t\"created\",\n\t\t\"reused\",\n\t\t\"rejected\"\n\t])\n}).superRefine((value, context) => {\n\tif (value.status !== \"rejected\" && !value.runtimeId) context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"registered Runtime response requires authority runtimeId\",\n\t\tpath: [\"runtimeId\"]\n\t});\n\tif (value.status === \"rejected\" && !value.reason) context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"rejected Runtime registration requires a reason\",\n\t\tpath: [\"reason\"]\n\t});\n});\nconst runtimeCapabilityReportStatusSchema = z.enum([\n\t\"ready\",\n\t\"disabled\",\n\t\"unavailable\",\n\t\"unknown\"\n]);\nconst submitRuntimeCapabilityReportItemSchema = z.strictObject({\n\tcapabilityRef: boundedIdentifierSchema,\n\texpiresAtMs: z.int().positive(),\n\tobservedAtMs: z.int().positive(),\n\treasonCodes: z.array(reasonCodeSchema).optional(),\n\tstatus: runtimeCapabilityReportStatusSchema\n});\nconst submitRuntimeCapabilityReportsBodySchema = z.strictObject({\n\tlane: boundedIdentifierSchema,\n\treports: z.array(submitRuntimeCapabilityReportItemSchema).min(1).max(64),\n\truntimeId: runtimeReportingRuntimeIdSchema\n});\nconst runtimeCapabilityReportRejectedReasonSchema = z.enum([\n\t\"capability_ref_invalid\",\n\t\"conflict\",\n\t\"out_of_order\",\n\t\"report_status_invalid\",\n\t\"report_time_invalid\",\n\t\"runtime_id_invalid\",\n\t\"runtime_id_mismatch\",\n\t\"runtime_identity_invalid\",\n\t\"runtime_lookup_conflict\",\n\t\"runtime_missing\",\n\t\"stale\"\n]);\nconst submitRuntimeCapabilityReportResultSchema = z.strictObject({\n\tcapabilityRef: boundedIdentifierSchema,\n\toutcome: z.enum([\n\t\t\"created\",\n\t\t\"updated\",\n\t\t\"reused\"\n\t]).optional(),\n\treason: runtimeCapabilityReportRejectedReasonSchema.optional(),\n\tstatus: z.enum([\"accepted\", \"rejected\"])\n}).superRefine((value, context) => {\n\tif (value.status === \"accepted\" && !value.outcome) context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"accepted Runtime Capability Report requires an outcome\",\n\t\tpath: [\"outcome\"]\n\t});\n\tif (value.status === \"rejected\" && !value.reason) context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"rejected Runtime Capability Report requires a reason\",\n\t\tpath: [\"reason\"]\n\t});\n});\nconst submitRuntimeCapabilityReportsResponseSchema = z.strictObject({\n\treports: z.array(submitRuntimeCapabilityReportResultSchema),\n\truntimeId: runtimeReportingRuntimeIdSchema.optional(),\n\tstatus: z.enum([\n\t\t\"accepted\",\n\t\t\"partial\",\n\t\t\"rejected\"\n\t])\n}).superRefine((value, context) => {\n\tif (value.status !== \"rejected\" && !value.runtimeId) context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"accepted Runtime Capability Report response requires authority runtimeId\",\n\t\tpath: [\"runtimeId\"]\n\t});\n});\n\n//#endregion\n//#region src/schemas/http/space-contract.ts\nconst putSpaceContractBodySchema = spaceContractFieldsSchema;\nconst patchSpaceContractBodySchema = spaceContractFieldsSchema.pick({\n\tdispatchPolicy: true,\n\tpublicationMode: true,\n\tallowedActions: true,\n\tresultArchivePolicy: true,\n\tentryBrief: true,\n\tdispatchBrief: true\n}).partial().superRefine((value, ctx) => {\n\tif (Object.keys(value).length > 0) return;\n\tctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"at least one contract patch field is required\"\n\t});\n});\nconst getSpaceContractResponseSchema = spaceContractSchema;\nconst putSpaceContractResponseSchema = spaceContractSchema;\nconst patchSpaceContractResponseSchema = spaceContractSchema;\n\n//#endregion\n//#region src/schemas/http/space-conversation-binding.ts\nconst spaceConversationBindingResponseSchema = z.strictObject({ binding: conversationBindingRecordSchema.nullable() });\nconst spaceConversationBindingImportBodySchema = z.strictObject({\n\tbootstrapTemplateFacts: bootstrapTemplateFactsSchema,\n\tcontrollerRef: z.string().min(1),\n\tconversationRef: upstreamConversationRefSchema,\n\tforce: z.boolean().optional(),\n\tpolicy: conversationPolicySchema,\n\ttransportMode: runtimeTransportModeSchema\n});\nconst spaceConversationBindingImportResponseSchema = z.strictObject({\n\tbinding: conversationBindingRecordSchema,\n\treplacedExisting: z.boolean()\n});\nconst spaceConversationBindingConflictResponseSchema = z.strictObject({\n\tcurrentBinding: conversationBindingRecordSchema.nullable(),\n\terror: commonErrorSchema\n});\nconst spaceConversationBindingUpsertBodySchema = conversationBindingRecordSchema;\nconst spaceConversationBindingUpsertResponseSchema = z.strictObject({ binding: conversationBindingRecordSchema });\nconst spaceConversationBindingDeleteResponseSchema = z.strictObject({ removed: z.boolean() });\n\n//#endregion\n//#region src/schemas/http/space-create.ts\nconst createSpaceBodySchema = z.strictObject({\n\tname: z.unknown().optional(),\n\tpurpose: z.unknown().optional(),\n\tguide: z.unknown().optional(),\n\tpassword: z.unknown().optional()\n}).transform((value, ctx) => {\n\tconst next = {};\n\tif (typeof value.name === \"string\") {\n\t\tconst normalizedName = value.name.trim();\n\t\tif (normalizedName.length > 0) next.name = normalizedName;\n\t}\n\tif (Object.hasOwn(value, \"purpose\")) {\n\t\tif (typeof value.purpose !== \"string\") {\n\t\t\tctx.addIssue({\n\t\t\t\tcode: \"custom\",\n\t\t\t\tmessage: \"Invalid purpose\",\n\t\t\t\tpath: [\"purpose\"]\n\t\t\t});\n\t\t\treturn z.NEVER;\n\t\t}\n\t\tnext.purpose = value.purpose.trim();\n\t}\n\tif (Object.hasOwn(value, \"guide\")) {\n\t\tif (typeof value.guide !== \"string\") {\n\t\t\tctx.addIssue({\n\t\t\t\tcode: \"custom\",\n\t\t\t\tmessage: \"Invalid guide\",\n\t\t\t\tpath: [\"guide\"]\n\t\t\t});\n\t\t\treturn z.NEVER;\n\t\t}\n\t\tnext.guide = value.guide.trim();\n\t}\n\tif (Object.hasOwn(value, \"password\")) {\n\t\tconst parsedPassword = spacePasswordSchema.safeParse(value.password);\n\t\tif (!parsedPassword.success) {\n\t\t\tctx.addIssue({\n\t\t\t\tcode: \"custom\",\n\t\t\t\tmessage: \"Invalid password\",\n\t\t\t\tpath: [\"password\"]\n\t\t\t});\n\t\t\treturn z.NEVER;\n\t\t}\n\t\tnext.password = parsedPassword.data;\n\t}\n\treturn next;\n});\n\n//#endregion\n//#region src/schemas/http/space-meta.ts\nconst trimmedNonEmptyStringSchema$2 = z.string().trim().min(1);\nconst isoDateTimeSchema$2 = z.iso.datetime({ offset: true });\nconst spaceCreatorSchema = z.strictObject({\n\tprofileId: atsRuntimeProfileIdSchema,\n\tprofileName: trimmedNonEmptyStringSchema$2.optional(),\n\tkind: profileKindSchema.optional(),\n\tprofile: trimmedNonEmptyStringSchema$2.optional(),\n\townerUserId: trimmedNonEmptyStringSchema$2.optional(),\n\townerName: trimmedNonEmptyStringSchema$2.optional()\n}).superRefine((value, ctx) => {\n\tif (!value.kind) return;\n\tif ((value.kind === \"agent\" ? agentProfileIdSchema : uuidProfileIdSchema).safeParse(value.profileId).success) return;\n\tctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: value.kind === \"agent\" ? \"agent profileId must use agt_<UUID>\" : \"human/system profileId must be a UUID\",\n\t\tpath: [\"profileId\"]\n\t});\n});\nconst spaceStorageUsageSchema = z.strictObject({\n\tusedBytes: z.number().finite().min(0),\n\tsoftLimitBytes: z.number().finite().positive(),\n\tusagePercent: z.number().finite().min(0)\n});\nconst spaceMetaSchema = z.strictObject({\n\tspaceId: trimmedNonEmptyStringSchema$2,\n\tname: trimmedNonEmptyStringSchema$2.optional(),\n\tpurpose: trimmedNonEmptyStringSchema$2.optional(),\n\tcreator: spaceCreatorSchema.optional(),\n\tguide: trimmedNonEmptyStringSchema$2.optional(),\n\tpasswordProtected: z.boolean().optional(),\n\tcreatedAt: isoDateTimeSchema$2.optional(),\n\tupdatedAt: isoDateTimeSchema$2.optional(),\n\tstorageUsage: spaceStorageUsageSchema.optional()\n});\nconst patchSpaceMetaResponseSchema = spaceMetaSchema;\nconst getSpaceMetaResponseSchema = spaceMetaSchema;\nconst patchSpaceMetaBodySchema = z.strictObject({\n\tpurpose: z.string().optional(),\n\tguide: z.string().optional()\n}).superRefine((value, ctx) => {\n\tif (value.purpose !== void 0 || value.guide !== void 0) return;\n\tctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"Expected purpose or guide\"\n\t});\n}).transform((value) => ({\n\t...value.purpose === void 0 ? {} : { purpose: value.purpose },\n\t...value.guide === void 0 ? {} : { guide: value.guide }\n}));\n\n//#endregion\n//#region src/schemas/http/space-create-response.ts\nconst createSpaceResponseSchema = z.strictObject({\n\tspaceId: spaceMetaSchema.shape.spaceId,\n\tmeta: spaceMetaSchema.optional()\n});\n\n//#endregion\n//#region src/schemas/http/space-cursor.ts\nconst patchCursorLastSeenTsSchema = z.number().int().finite().min(0);\nconst patchCursorStringSchema = z.string().transform((value) => value.trim());\nconst patchCursorRoleSchema = patchCursorStringSchema.refine((value) => value.length <= MAX_TEXT_LENGTH, { message: \"Role too long\" });\nconst patchCursorRoleInstructionsSchema = patchCursorStringSchema.refine((value) => value.length <= MAX_TEXT_LENGTH, { message: \"RoleInstructions too long\" });\nconst MENTION_ALIAS_MAX_LENGTH = 128;\nconst MENTION_ALIAS_TOKEN_REGEX = /^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/;\nconst patchCursorMentionAliasSchema = patchCursorStringSchema.refine((value) => value.length <= MENTION_ALIAS_MAX_LENGTH, { message: \"MentionAlias too long\" }).refine((value) => value.length === 0 || MENTION_ALIAS_TOKEN_REGEX.test(value), { message: \"Invalid mentionAlias\" });\nconst patchSpaceCursorBodySchema = z.strictObject({\n\tlastSeenTs: patchCursorLastSeenTsSchema.optional(),\n\trole: patchCursorRoleSchema.optional(),\n\troleInstructions: patchCursorRoleInstructionsSchema.optional(),\n\tmentionAlias: patchCursorMentionAliasSchema.optional()\n});\nconst SPACE_CURSOR_PATCH_REQUIRED_MESSAGE = \"Expected lastSeenTs, role, roleInstructions or mentionAlias\";\nconst SPACE_CURSOR_STRING_PATCH_FIELDS = [\n\t\"role\",\n\t\"roleInstructions\",\n\t\"mentionAlias\"\n];\nfunction readNormalizedLastSeenTs(patch) {\n\tif (!Object.hasOwn(patch, \"lastSeenTs\")) return { ok: true };\n\tconst rawLastSeenTs = patch.lastSeenTs;\n\tif (rawLastSeenTs === void 0) return { ok: true };\n\tif (typeof rawLastSeenTs !== \"number\") return {\n\t\tok: false,\n\t\tmessage: \"Invalid lastSeenTs\"\n\t};\n\tif (!Number.isFinite(rawLastSeenTs)) return { ok: true };\n\treturn {\n\t\tok: true,\n\t\tvalue: Math.max(0, Math.trunc(rawLastSeenTs))\n\t};\n}\nfunction readNormalizedStringPatchField(patch, field) {\n\tif (!Object.hasOwn(patch, field)) return { ok: true };\n\tconst rawValue = patch[field];\n\tif (rawValue === void 0) return { ok: true };\n\tif (typeof rawValue !== \"string\") return {\n\t\tok: false,\n\t\tmessage: `Invalid ${field}`\n\t};\n\treturn {\n\t\tok: true,\n\t\tvalue: rawValue\n\t};\n}\nfunction normalizeSpaceCursorPatch(input) {\n\tif (!input || typeof input !== \"object\") return {\n\t\tok: false,\n\t\tmessage: \"Invalid JSON\"\n\t};\n\tconst rawPatch = input;\n\tconst patch = {};\n\tconst lastSeenTs = readNormalizedLastSeenTs(rawPatch);\n\tif (!lastSeenTs.ok) return lastSeenTs;\n\tif (lastSeenTs.value !== void 0) patch.lastSeenTs = lastSeenTs.value;\n\tfor (const field of SPACE_CURSOR_STRING_PATCH_FIELDS) {\n\t\tconst fieldValue = readNormalizedStringPatchField(rawPatch, field);\n\t\tif (!fieldValue.ok) return fieldValue;\n\t\tif (fieldValue.value !== void 0) patch[field] = fieldValue.value;\n\t}\n\tif (Object.keys(patch).length === 0) return {\n\t\tok: false,\n\t\tmessage: SPACE_CURSOR_PATCH_REQUIRED_MESSAGE\n\t};\n\tconst parsed = patchSpaceCursorBodySchema.safeParse(patch);\n\tif (!parsed.success) return {\n\t\tok: false,\n\t\tmessage: parsed.error.issues[0]?.message ?? \"Invalid cursor patch\"\n\t};\n\treturn {\n\t\tok: true,\n\t\tvalue: parsed.data\n\t};\n}\n\n//#endregion\n//#region src/schemas/http/space-delete.ts\nconst deleteSpaceResponseSchema = z.strictObject({\n\tspaceId: nonEmptyTrimmedStringFromUnknown,\n\tdeleted: z.literal(true)\n});\n\n//#endregion\n//#region src/schemas/http/space-deletion-tombstone.ts\nconst ISO_DATE_TIME_SCHEMA$1 = z.iso.datetime({ offset: true });\nconst GATEWAY_HOST_MAX_LENGTH = 255;\nconst SPACE_DELETION_TOMBSTONE_QUERY_MAX_SPACE_IDS = 500;\nconst GATEWAY_HOST_PATH_CHARS_RE = /[/?#]/;\nconst trimmedNonEmptyStringSchema$1 = z.string().trim().min(1);\nconst nullableTrimmedStringSchema$2 = z.union([trimmedNonEmptyStringSchema$1, z.null()]);\nconst gatewayHostSchema = z.string().transform((value, ctx) => {\n\tconst normalized = value.trim().toLowerCase();\n\tif (normalized.length === 0) {\n\t\tctx.addIssue({\n\t\t\tcode: \"custom\",\n\t\t\tmessage: \"gatewayHost is required\"\n\t\t});\n\t\treturn z.NEVER;\n\t}\n\tif (normalized.includes(\"://\")) try {\n\t\tconst url = new URL(normalized);\n\t\tif (url.pathname !== \"/\" || url.search.length > 0 || url.hash.length > 0) {\n\t\t\tctx.addIssue({\n\t\t\t\tcode: \"custom\",\n\t\t\t\tmessage: \"gatewayHost must not include path/query/hash\"\n\t\t\t});\n\t\t\treturn z.NEVER;\n\t\t}\n\t\tif (url.host.length === 0) {\n\t\t\tctx.addIssue({\n\t\t\t\tcode: \"custom\",\n\t\t\t\tmessage: \"gatewayHost is required\"\n\t\t\t});\n\t\t\treturn z.NEVER;\n\t\t}\n\t\treturn url.host.toLowerCase();\n\t} catch {\n\t\tctx.addIssue({\n\t\t\tcode: \"custom\",\n\t\t\tmessage: \"gatewayHost must be a valid host\"\n\t\t});\n\t\treturn z.NEVER;\n\t}\n\tif (GATEWAY_HOST_PATH_CHARS_RE.test(normalized)) {\n\t\tctx.addIssue({\n\t\t\tcode: \"custom\",\n\t\t\tmessage: \"gatewayHost must not include path/query/hash\"\n\t\t});\n\t\treturn z.NEVER;\n\t}\n\treturn normalized;\n}).pipe(z.string().max(GATEWAY_HOST_MAX_LENGTH));\nconst spaceDeletionTombstoneRecordSchema = z.strictObject({\n\tgatewayHost: gatewayHostSchema,\n\tspaceId: trimmedNonEmptyStringSchema$1,\n\tspaceName: nullableTrimmedStringSchema$2,\n\tcreatorProfileId: nullableTrimmedStringSchema$2,\n\tcreatorKind: z.union([profileSpaceCreatorKindSchema, z.null()]),\n\tdeletedByProfileId: nullableTrimmedStringSchema$2,\n\tdeletedByProfileName: nullableTrimmedStringSchema$2,\n\tdeletedByOwnerUserId: nullableTrimmedStringSchema$2,\n\tdeletedAt: ISO_DATE_TIME_SCHEMA$1,\n\tcreatedAt: ISO_DATE_TIME_SCHEMA$1,\n\tupdatedAt: ISO_DATE_TIME_SCHEMA$1\n});\nconst upsertSpaceDeletionTombstoneBodySchema = z.strictObject({\n\tgatewayHost: gatewayHostSchema,\n\tspaceName: nullableTrimmedStringSchema$2.optional(),\n\tcreatorProfileId: nullableTrimmedStringSchema$2.optional(),\n\tcreatorKind: z.union([profileSpaceCreatorKindSchema, z.null()]).optional(),\n\tdeletedByProfileId: nullableTrimmedStringSchema$2.optional(),\n\tdeletedByProfileName: nullableTrimmedStringSchema$2.optional(),\n\tdeletedByOwnerUserId: nullableTrimmedStringSchema$2.optional(),\n\tdeletedAt: ISO_DATE_TIME_SCHEMA$1.optional()\n});\nconst upsertSpaceDeletionTombstoneResponseSchema = z.strictObject({ item: spaceDeletionTombstoneRecordSchema });\nconst querySpaceDeletionTombstonesBodySchema = z.strictObject({\n\tgatewayHost: gatewayHostSchema,\n\tspaceIds: z.array(trimmedNonEmptyStringSchema$1).min(1).max(SPACE_DELETION_TOMBSTONE_QUERY_MAX_SPACE_IDS).transform((values) => Array.from(new Set(values)))\n});\nconst querySpaceDeletionTombstonesResponseSchema = z.strictObject({ items: z.array(spaceDeletionTombstoneRecordSchema) });\n\n//#endregion\n//#region src/schemas/http/space-diagnostic-report.ts\nconst diagnosticReportIdSchema = z.string().trim().min(1).max(128);\nconst diagnosticIdentifierSchema = z.string().trim().min(1).max(512);\nconst spaceDiagnosticReportProblemTypeSchema = z.enum([\n\t\"message_problem\",\n\t\"no_reply\",\n\t\"reply_problem\"\n]);\nconst spaceDiagnosticReportWakePointerDerivationStatusSchema = z.enum([\n\t\"exact\",\n\t\"source_multi_target\",\n\t\"fallback_multi_target\",\n\t\"not_wake\",\n\t\"unavailable\"\n]);\nconst spaceDiagnosticReportReasonCodeSchema = z.enum([\n\t\"diagnostic_report.reply_source_signal_not_found\",\n\t\"diagnostic_report.reply_target_exact\",\n\t\"diagnostic_report.reply_target_missing_fallback\",\n\t\"diagnostic_report.terminal_failure_source_signal_not_found\",\n\t\"diagnostic_report.terminal_failure_target_exact\",\n\t\"diagnostic_report.source_wake_targets\",\n\t\"diagnostic_report.not_wake_related\",\n\t\"diagnostic_report.wake_pointer_unavailable\"\n]);\nconst createSpaceDiagnosticReportRouteParamsSchema = z.strictObject({ spaceId: nonEmptyTrimmedStringFromUnknown });\nconst createSpaceDiagnosticReportBodySchema = z.strictObject({\n\treportedSignalId: diagnosticIdentifierSchema,\n\tproblemType: spaceDiagnosticReportProblemTypeSchema\n});\nconst spaceDiagnosticReportWakePointerSchema = z.strictObject({\n\tspaceId: diagnosticIdentifierSchema,\n\tclientMessageId: clientMessageIdSchema$1,\n\tsourceSignalId: diagnosticIdentifierSchema,\n\ttargetProfileId: diagnosticIdentifierSchema\n});\nconst spaceDiagnosticReportWakePointerDerivationSchema = z.strictObject({\n\tstatus: spaceDiagnosticReportWakePointerDerivationStatusSchema,\n\treasonCodes: z.array(spaceDiagnosticReportReasonCodeSchema).min(1).max(8)\n});\nconst createSpaceDiagnosticReportResponseSchema = z.strictObject({\n\tdiagnosticReportId: diagnosticReportIdSchema,\n\tspaceId: diagnosticIdentifierSchema,\n\treportedSignalId: diagnosticIdentifierSchema,\n\treplyToSignalId: diagnosticIdentifierSchema.nullable(),\n\tthreadId: diagnosticIdentifierSchema.nullable(),\n\tproblemType: spaceDiagnosticReportProblemTypeSchema,\n\treporterProfileId: diagnosticIdentifierSchema,\n\tcreatedAtMs: z.int().min(0),\n\twakePointers: z.array(spaceDiagnosticReportWakePointerSchema).max(64),\n\twakePointerDerivation: spaceDiagnosticReportWakePointerDerivationSchema\n}).superRefine((value, context) => {\n\tfor (const [pointerIndex, pointer] of value.wakePointers.entries()) {\n\t\tif (pointer.spaceId === value.spaceId) continue;\n\t\tcontext.addIssue({\n\t\t\tcode: \"custom\",\n\t\t\tmessage: \"wake pointer spaceId must match report spaceId\",\n\t\t\tpath: [\n\t\t\t\t\"wakePointers\",\n\t\t\t\tpointerIndex,\n\t\t\t\t\"spaceId\"\n\t\t\t]\n\t\t});\n\t}\n\tconst pointerCount = value.wakePointers.length;\n\tswitch (value.wakePointerDerivation.status) {\n\t\tcase \"exact\":\n\t\t\tif (pointerCount !== 1) context.addIssue({\n\t\t\t\tcode: \"custom\",\n\t\t\t\tmessage: \"exact diagnostic report must include one wake pointer\",\n\t\t\t\tpath: [\"wakePointers\"]\n\t\t\t});\n\t\t\tbreak;\n\t\tcase \"source_multi_target\":\n\t\tcase \"fallback_multi_target\":\n\t\t\tif (pointerCount < 1) context.addIssue({\n\t\t\t\tcode: \"custom\",\n\t\t\t\tmessage: \"multi-target diagnostic report must include at least one wake pointer\",\n\t\t\t\tpath: [\"wakePointers\"]\n\t\t\t});\n\t\t\tbreak;\n\t\tcase \"not_wake\":\n\t\tcase \"unavailable\":\n\t\t\tif (pointerCount !== 0) context.addIssue({\n\t\t\t\tcode: \"custom\",\n\t\t\t\tmessage: \"diagnostic report without wake evidence must not include wake pointers\",\n\t\t\t\tpath: [\"wakePointers\"]\n\t\t\t});\n\t\t\tbreak;\n\t\tdefault: return value.wakePointerDerivation.status;\n\t}\n});\n\n//#endregion\n//#region src/schemas/http/space-dispatch-trace.ts\nconst ISO_DATE_TIME_SCHEMA = z.iso.datetime({ offset: true });\nconst trimmedNonEmptyStringSchema = z.string().trim().min(1);\nconst SPACE_DISPATCH_TRACE_TIMEOUT_POLICY_MAX_MS = 6048e5;\nconst SPACE_DISPATCH_TRACE_PROMPT_LENGTH_MAX = 1e6;\nconst SPACE_DISPATCH_TRACE_PROMPT_PREVIEW_MAX_CHARS = 1200;\nconst SPACE_DISPATCH_TRACE_INVALID_OUTPUT_PREVIEW_MAX_CHARS = 180;\nconst boundedNullableTrimmedStringSchema = (maxLength) => z.union([trimmedNonEmptyStringSchema.max(maxLength), z.null()]);\nconst nullableTrimmedStringSchema$1 = boundedNullableTrimmedStringSchema(4096);\nconst nullableIsoDateTimeSchema$1 = z.union([ISO_DATE_TIME_SCHEMA, z.null()]);\nconst nullableIntegerSchema = z.union([z.int(), z.null()]);\nconst boundedNullableNonNegativeIntegerSchema = (maxValue) => z.union([z.int().min(0).max(maxValue), z.null()]);\nconst nullableProfileKindSchema = z.union([z.enum([\n\t\"human\",\n\t\"agent\",\n\t\"system\"\n]), z.null()]);\nconst dispatchTraceOwnerSchema = z.strictObject({\n\tid: trimmedNonEmptyStringSchema,\n\tkind: trimmedNonEmptyStringSchema\n});\nconst spaceDispatchTraceDispatchStatusSchema = z.enum([\n\t\"queued\",\n\t\"dispatching\",\n\t\"succeeded\",\n\t\"failed_retryable\",\n\t\"failed_terminal\",\n\t\"deduped\",\n\t\"blocked\"\n]);\nconst spaceDispatchTraceAttemptStatusSchema = z.enum([\n\t\"blocked\",\n\t\"dispatching\",\n\t\"failed_retryable\",\n\t\"failed_terminal\",\n\t\"succeeded\",\n\t\"superseded\",\n\t\"timed_out\",\n\t\"waiting_result\"\n]);\nconst spaceDispatchTraceQuerySchema = z.strictObject({\n\tspaceId: trimmedNonEmptyStringSchema,\n\tdispatchId: trimmedNonEmptyStringSchema\n});\nconst spaceDispatchTraceDispatchSchema = z.strictObject({\n\tfactSource: z.literal(\"dispatch_ledger\"),\n\tdispatchId: trimmedNonEmptyStringSchema,\n\tidempotencyKey: trimmedNonEmptyStringSchema,\n\tsourceEventId: trimmedNonEmptyStringSchema,\n\tsourceClientMessageId: nullableTrimmedStringSchema$1,\n\towner: z.union([dispatchTraceOwnerSchema, z.null()]),\n\ttargetProfileId: trimmedNonEmptyStringSchema,\n\tstatus: spaceDispatchTraceDispatchStatusSchema,\n\tfirstSeenAt: ISO_DATE_TIME_SCHEMA,\n\tlastAttemptAt: ISO_DATE_TIME_SCHEMA,\n\tattemptCount: z.int().min(0),\n\tlatestAttemptId: nullableTrimmedStringSchema$1\n});\nconst spaceDispatchTraceLatestAttemptSchema = z.strictObject({\n\tfactSource: z.literal(\"dispatch_attempt\"),\n\tattemptId: trimmedNonEmptyStringSchema,\n\tdispatchId: trimmedNonEmptyStringSchema,\n\tidempotencyKey: trimmedNonEmptyStringSchema,\n\tattemptNo: z.int().min(1),\n\tstatus: spaceDispatchTraceAttemptStatusSchema,\n\tdaemonSessionId: nullableTrimmedStringSchema$1,\n\tconnectionGeneration: nullableIntegerSchema,\n\tleaseEpoch: nullableIntegerSchema,\n\tcreatedAt: ISO_DATE_TIME_SCHEMA,\n\tstartedAt: nullableIsoDateTimeSchema$1,\n\tfinishedAt: nullableIsoDateTimeSchema$1,\n\terrorCode: nullableTrimmedStringSchema$1,\n\terrorMessage: nullableTrimmedStringSchema$1\n});\nconst spaceDispatchTraceOpsDecisionSchema = z.strictObject({\n\tfactSource: z.literal(\"ops_decision\"),\n\tid: trimmedNonEmptyStringSchema,\n\tdecisionCode: trimmedNonEmptyStringSchema,\n\tdecidedBy: trimmedNonEmptyStringSchema,\n\tsource: trimmedNonEmptyStringSchema,\n\tdecidedAt: ISO_DATE_TIME_SCHEMA,\n\tcorrelationId: nullableTrimmedStringSchema$1,\n\texpectedRecoveryCriteria: nullableTrimmedStringSchema$1\n});\nconst spaceDispatchTraceReplySignalSchema = z.strictObject({\n\tfactSource: z.enum([\"space_signal_by_published_signal_id\", \"space_signal_recent_window\"]),\n\tsignalId: trimmedNonEmptyStringSchema,\n\tprofileId: trimmedNonEmptyStringSchema,\n\tprofileKind: nullableProfileKindSchema,\n\tprofileName: nullableTrimmedStringSchema$1,\n\ttext: trimmedNonEmptyStringSchema,\n\tcreatedAt: ISO_DATE_TIME_SCHEMA\n});\nconst spaceDispatchTraceFinalVisibleMessageFactSourceSchema = z.enum([\"space_signal_by_published_signal_id\", \"space_final_reply_claim\"]);\nconst spaceDispatchTraceFinalVisibleMessageSchema = z.strictObject({\n\tfactSource: spaceDispatchTraceFinalVisibleMessageFactSourceSchema,\n\tsignalId: trimmedNonEmptyStringSchema,\n\tsignalType: z.enum([\n\t\t\"signal.text\",\n\t\t\"signal.status\",\n\t\t\"signal.system_notice\"\n\t]),\n\tdispatchId: trimmedNonEmptyStringSchema,\n\ttargetProfileId: trimmedNonEmptyStringSchema,\n\tprofileId: nullableTrimmedStringSchema$1,\n\tprofileKind: nullableProfileKindSchema,\n\tprofileName: nullableTrimmedStringSchema$1,\n\ttext: nullableTrimmedStringSchema$1,\n\treasonCode: nullableTrimmedStringSchema$1,\n\tnoticeType: z.union([z.enum([\n\t\t\"policy_blocked\",\n\t\t\"stay_silent\",\n\t\t\"terminal_failure\"\n\t]), z.null()]),\n\tstatusType: nullableTrimmedStringSchema$1,\n\tcreatedAt: ISO_DATE_TIME_SCHEMA\n});\nconst spaceDispatchTraceFinalVisibleMessageLinkageStatusSchema = z.enum([\n\t\"matched_published_signal\",\n\t\"matched_final_reply_claim\",\n\t\"projection_pending\",\n\t\"linkage_missing\",\n\t\"storage_inconsistent\"\n]);\nconst spaceDispatchTraceFinalVisibleMessageLinkageSourceFactSchema = z.enum([\n\t\"published_signal_candidate\",\n\t\"space_final_reply_claim\",\n\t\"none\"\n]);\nconst spaceDispatchTraceFinalVisibleMessageLinkageSchema = z.strictObject({\n\tstatus: spaceDispatchTraceFinalVisibleMessageLinkageStatusSchema,\n\treasonCode: nullableTrimmedStringSchema$1,\n\tsourceFact: spaceDispatchTraceFinalVisibleMessageLinkageSourceFactSchema,\n\tcandidateSignalIds: z.array(trimmedNonEmptyStringSchema).max(16),\n\tclaimSignalId: nullableTrimmedStringSchema$1,\n\tselectedSignalId: nullableTrimmedStringSchema$1\n});\nconst spaceDispatchTraceFinalVisibleOutcomeStatusSchema = z.enum([\n\t\"visible_reply\",\n\t\"visible_failure\",\n\t\"publication_pending\",\n\t\"publication_retrying\",\n\t\"publication_unresolved\",\n\t\"not_applicable\"\n]);\nconst spaceDispatchTraceFinalVisibleOutcomePublicationKindSchema = z.enum([\"success_reply\", \"failure_notice\"]);\nconst spaceDispatchTraceFinalVisibleOutcomeSourceFactSchema = z.enum([\n\t\"final_visible_message\",\n\t\"result_inbox\",\n\t\"runtime_coordinator_execution\",\n\t\"runtime_coordinator_event\",\n\t\"runtime_coordinator_head_lifecycle\",\n\t\"dispatch_result\",\n\t\"none\"\n]);\nconst spaceDispatchTraceFinalVisibleOutcomeSchema = z.strictObject({\n\tdelivered: z.boolean(),\n\tpublicationErrorCode: nullableTrimmedStringSchema$1,\n\tpublicationKind: z.union([spaceDispatchTraceFinalVisibleOutcomePublicationKindSchema, z.null()]),\n\treasonCode: nullableTrimmedStringSchema$1,\n\tsignalId: nullableTrimmedStringSchema$1,\n\tsourceFact: spaceDispatchTraceFinalVisibleOutcomeSourceFactSchema,\n\tsourceReasonCode: nullableTrimmedStringSchema$1,\n\tsourceStatus: nullableTrimmedStringSchema$1,\n\tstatus: spaceDispatchTraceFinalVisibleOutcomeStatusSchema\n});\nconst spaceDispatchTraceClaimLeaseSchema = z.strictObject({\n\tfactSource: z.literal(\"dispatch_claim_lease\"),\n\tclaimLeaseId: trimmedNonEmptyStringSchema,\n\tdispatchId: trimmedNonEmptyStringSchema,\n\tsourceEventId: trimmedNonEmptyStringSchema,\n\tsourceClientMessageId: nullableTrimmedStringSchema$1,\n\ttargetProfileId: trimmedNonEmptyStringSchema,\n\tbindingId: trimmedNonEmptyStringSchema,\n\truntimeId: trimmedNonEmptyStringSchema,\n\tcapabilityRef: trimmedNonEmptyStringSchema,\n\tleaseState: z.enum([\n\t\t\"active\",\n\t\t\"cancelled\",\n\t\t\"expired\",\n\t\t\"released\",\n\t\t\"superseded\"\n\t]),\n\tclaimTraceReason: nullableTrimmedStringSchema$1,\n\tcreatedAt: ISO_DATE_TIME_SCHEMA,\n\tupdatedAt: ISO_DATE_TIME_SCHEMA,\n\texpiresAt: ISO_DATE_TIME_SCHEMA\n});\nconst spaceDispatchTraceResultSchema = z.strictObject({\n\tfactSource: z.literal(\"dispatch_result\"),\n\tresultRef: trimmedNonEmptyStringSchema,\n\tdispatchId: trimmedNonEmptyStringSchema,\n\tresultKind: trimmedNonEmptyStringSchema,\n\tpublicOutcome: trimmedNonEmptyStringSchema,\n\tpublishedSignalId: nullableTrimmedStringSchema$1,\n\tstatusType: nullableTrimmedStringSchema$1,\n\tcreatedAt: ISO_DATE_TIME_SCHEMA\n});\nconst spaceDispatchTraceResultInboxPublishStateSchema = z.enum([\n\t\"result_accepted\",\n\t\"reply_published\",\n\t\"reply_publication_failed\",\n\t\"invalid_space_action\",\n\t\"legacy_result_quarantined\"\n]);\nconst spaceDispatchTraceResultInboxSchema = z.strictObject({\n\tfactSource: z.literal(\"dispatch_result_inbox\"),\n\tresultKey: trimmedNonEmptyStringSchema,\n\tdispatchId: trimmedNonEmptyStringSchema,\n\tattemptId: trimmedNonEmptyStringSchema,\n\ttaskId: trimmedNonEmptyStringSchema,\n\ttargetProfileId: trimmedNonEmptyStringSchema,\n\tdaemonSessionId: trimmedNonEmptyStringSchema,\n\tleaseEpoch: z.int(),\n\tsubmittedConnectionGeneration: z.int(),\n\tpublishState: spaceDispatchTraceResultInboxPublishStateSchema,\n\tpublishedSignalId: nullableTrimmedStringSchema$1,\n\tpublicationErrorCode: nullableTrimmedStringSchema$1,\n\tacceptedAt: ISO_DATE_TIME_SCHEMA,\n\tupdatedAt: ISO_DATE_TIME_SCHEMA\n});\nconst spaceDispatchTraceStreamingSchema = z.strictObject({\n\tstreamingMode: z.enum([\"final\", \"stream\"]),\n\tpreviewEmitted: z.boolean(),\n\tfirstStdoutAt: nullableIsoDateTimeSchema$1,\n\tfirstOutputAt: nullableIsoDateTimeSchema$1\n});\nconst spaceDispatchTraceRuntimeSchema = z.strictObject({\n\tprocessId: nullableIntegerSchema,\n\tprocessSpawnedAt: nullableIsoDateTimeSchema$1,\n\tstdinClosedAt: nullableIsoDateTimeSchema$1,\n\tfirstStderrAt: nullableIsoDateTimeSchema$1,\n\texitObservedAt: nullableIsoDateTimeSchema$1,\n\texitCode: nullableIntegerSchema,\n\texitSignal: nullableTrimmedStringSchema$1,\n\ttimeoutTriggeredAt: nullableIsoDateTimeSchema$1\n});\nconst spaceDispatchTraceExecutionSchema = z.strictObject({\n\tphase: z.enum([\n\t\t\"starting\",\n\t\t\"accepted_local\",\n\t\t\"running\",\n\t\t\"completed_local\",\n\t\t\"result_received\"\n\t]),\n\tphaseEnteredAt: nullableIsoDateTimeSchema$1,\n\tlastLifecycleAt: nullableIsoDateTimeSchema$1,\n\tleaseState: z.enum([\n\t\t\"active\",\n\t\t\"stalled\",\n\t\t\"unknown\"\n\t]),\n\ttimeoutPolicy: z.strictObject({\n\t\texecutionLeaseStaleAfterMs: boundedNullableNonNegativeIntegerSchema(SPACE_DISPATCH_TRACE_TIMEOUT_POLICY_MAX_MS),\n\t\tfinalizationTimeoutMs: boundedNullableNonNegativeIntegerSchema(SPACE_DISPATCH_TRACE_TIMEOUT_POLICY_MAX_MS),\n\t\tstartTimeoutMs: boundedNullableNonNegativeIntegerSchema(SPACE_DISPATCH_TRACE_TIMEOUT_POLICY_MAX_MS),\n\t\twaitWindowMs: boundedNullableNonNegativeIntegerSchema(SPACE_DISPATCH_TRACE_TIMEOUT_POLICY_MAX_MS)\n\t})\n});\nconst spaceDispatchTraceOriginSchema = z.strictObject({\n\tagentContextId: nullableTrimmedStringSchema$1,\n\tupstreamConversationProviderId: nullableTrimmedStringSchema$1,\n\tupstreamConversationRefKind: nullableTrimmedStringSchema$1,\n\tupstreamConversationRefId: nullableTrimmedStringSchema$1,\n\teffectiveRuntimeWorkingDirectory: nullableTrimmedStringSchema$1,\n\truntimeWorkspaceFingerprint: nullableTrimmedStringSchema$1\n});\nconst spaceDispatchTracePromptSchema = z.strictObject({\n\tfingerprint: nullableTrimmedStringSchema$1,\n\tlength: boundedNullableNonNegativeIntegerSchema(SPACE_DISPATCH_TRACE_PROMPT_LENGTH_MAX),\n\tpreview: boundedNullableTrimmedStringSchema(SPACE_DISPATCH_TRACE_PROMPT_PREVIEW_MAX_CHARS)\n});\nconst spaceDispatchTraceDispatchExecutionSchema = dispatchExecutionSchema;\nconst spaceDispatchTraceExecutionIdentitySchema = spaceTraceExecutionIdentityProjectionSchema;\nconst spaceDispatchTraceRuntimeCoordinatorExecutionSchema = runtimeCoordinatorExecutionRecordSchema.extend({ factSource: z.literal(\"runtime_coordinator_projection\") });\nconst spaceDispatchTraceRuntimeCoordinatorCreationDiagnosticSchema = runtimeCoordinatorExecutionCreationDiagnosticSchema.extend({ factSource: z.literal(\"runtime_coordinator_projection\") });\nconst spaceDispatchTraceRuntimeCoordinatorEventSchema = runtimeCoordinatorExecutionEventSchema.extend({ factSource: z.literal(\"runtime_coordinator_projection\") });\nconst spaceDispatchTraceRuntimeCoordinatorHeadNoExecutionDecisionSchema = z.strictObject({\n\tdecidedAt: ISO_DATE_TIME_SCHEMA,\n\tpublicationCategory: daemonHubRuntimeCoordinatorHeadNoExecutionPublicationCategorySchema,\n\treasonCode: daemonHubRuntimeCoordinatorHeadNoExecutionReasonCodeSchema,\n\tsource: daemonHubRuntimeCoordinatorHeadNoExecutionDecisionSourceSchema,\n\tuserRecoveryAction: daemonHubRuntimeCoordinatorHeadNoExecutionRecoveryActionSchema\n});\nconst spaceDispatchTraceRuntimeCoordinatorHeadPublicationIntentSchema = z.strictObject({\n\tintentId: trimmedNonEmptyStringSchema.max(4096),\n\tkind: z.literal(\"no_execution_failure\"),\n\tpublicationCategory: daemonHubRuntimeCoordinatorHeadNoExecutionPublicationCategorySchema,\n\treadyAt: ISO_DATE_TIME_SCHEMA,\n\treasonCode: daemonHubRuntimeCoordinatorHeadNoExecutionReasonCodeSchema,\n\tstatus: z.literal(\"ready_for_phase_6\"),\n\tuserRecoveryAction: daemonHubRuntimeCoordinatorHeadNoExecutionRecoveryActionSchema\n});\nconst spaceDispatchTraceRuntimeCoordinatorHeadPublicationOutcomeSchema = z.strictObject({\n\tfailurePublicationCommandId: trimmedNonEmptyStringSchema.max(4096),\n\tfinalMessageKind: z.enum([\n\t\t\"failure_notice\",\n\t\t\"status\",\n\t\t\"success_reply\",\n\t\t\"unknown\"\n\t]).nullable(),\n\tobservedAt: ISO_DATE_TIME_SCHEMA,\n\tpublicationErrorCode: z.string().trim().min(1).max(160).nullable(),\n\tpublishedSignalId: trimmedNonEmptyStringSchema.nullable(),\n\tstatus: z.enum([\n\t\t\"failure_published\",\n\t\t\"already_final\",\n\t\t\"failure_publication_failed\"\n\t])\n});\nconst spaceDispatchTraceRuntimeCoordinatorHeadPublicationExhaustionSchema = z.strictObject({\n\tattemptCount: z.int().positive(),\n\texhaustedAt: ISO_DATE_TIME_SCHEMA,\n\tlastFailureAt: ISO_DATE_TIME_SCHEMA,\n\tlastReasonCode: z.string().trim().min(1).max(160),\n\treasonCode: z.literal(\"runtime_coordinator.publication_retry_exhausted\"),\n\tstatus: z.literal(\"publication_exhausted\")\n});\nconst spaceDispatchTraceRuntimeCoordinatorHeadTargetDisplaySchema = z.strictObject({\n\ttargetProfileMentionLabel: spaceMentionLabelSchema.nullable(),\n\ttargetProfileName: z.string().min(1).max(MAX_PROFILE_NAME_LENGTH).nullable()\n});\nconst spaceDispatchTraceRuntimeCoordinatorHeadWaitingBoundarySchema = z.strictObject({\n\tdeadlineAt: ISO_DATE_TIME_SCHEMA,\n\tdeadlineOutcome: z.literal(\"publication_intent_ready\"),\n\tobservedAt: ISO_DATE_TIME_SCHEMA,\n\treasonCode: daemonHubRuntimeCoordinatorHeadWaitingReasonCodeSchema,\n\tsoftDeadlineAt: ISO_DATE_TIME_SCHEMA,\n\ttrigger: z.literal(\"ats_service_route_connected\"),\n\ttriggerOwner: z.literal(\"runtime_coordinator\"),\n\tuserRecoveryAction: daemonHubRuntimeCoordinatorHeadWaitingRecoveryActionSchema,\n\tuserVisibleState: z.literal(\"waiting_for_ats_service\"),\n\twaitingCategory: daemonHubRuntimeCoordinatorHeadWaitingCategorySchema,\n\twaitingFor: z.literal(\"ats_service_route_connection\"),\n\twaitingSince: ISO_DATE_TIME_SCHEMA\n});\nconst spaceDispatchTraceRuntimeCoordinatorHeadLifecycleSchema = z.discriminatedUnion(\"readStatus\", [\n\tz.strictObject({\n\t\tcreatedAt: ISO_DATE_TIME_SCHEMA,\n\t\tduplicateDispatchCount: z.int().min(0),\n\t\texecutionLinkedAt: nullableIsoDateTimeSchema$1,\n\t\tfactSource: z.literal(\"runtime_coordinator_head_lifecycle\"),\n\t\tmodelVersion: z.literal(\"ats.runtime_coordinator.head_lifecycle.v1\"),\n\t\tnoExecutionDecision: z.union([spaceDispatchTraceRuntimeCoordinatorHeadNoExecutionDecisionSchema, z.null()]),\n\t\townerUserId: trimmedNonEmptyStringSchema,\n\t\tprimaryDispatchId: trimmedNonEmptyStringSchema,\n\t\tpublicationIntent: z.union([spaceDispatchTraceRuntimeCoordinatorHeadPublicationIntentSchema, z.null()]),\n\t\tpublicationExhaustion: spaceDispatchTraceRuntimeCoordinatorHeadPublicationExhaustionSchema.optional(),\n\t\tpublicationOutcome: spaceDispatchTraceRuntimeCoordinatorHeadPublicationOutcomeSchema.optional(),\n\t\treadStatus: z.literal(\"found\"),\n\t\truntimeCoordinatorExecutionId: runtimeCoordinatorExecutionRecordSchema.shape.runtimeCoordinatorExecutionId.nullable(),\n\t\tstatus: daemonHubRuntimeCoordinatorHeadLifecycleStatusSchema,\n\t\ttargetWakeLifecycleIdentity: targetWakeLifecycleIdentitySchema,\n\t\ttargetWakeLifecycleId: trimmedNonEmptyStringSchema.max(2048),\n\t\ttargetDisplay: spaceDispatchTraceRuntimeCoordinatorHeadTargetDisplaySchema.optional(),\n\t\tupdatedAt: ISO_DATE_TIME_SCHEMA,\n\t\twaitingBoundary: z.union([spaceDispatchTraceRuntimeCoordinatorHeadWaitingBoundarySchema, z.null()])\n\t}),\n\tz.strictObject({\n\t\tfactSource: z.literal(\"runtime_coordinator_head_lifecycle\"),\n\t\treadStatus: z.literal(\"missing\"),\n\t\treasonCode: z.literal(\"runtime_coordinator.head_lifecycle_not_found\"),\n\t\ttargetWakeLifecycleId: trimmedNonEmptyStringSchema.max(2048)\n\t}),\n\tz.strictObject({\n\t\tfactSource: z.literal(\"runtime_coordinator_head_lifecycle\"),\n\t\treadStatus: z.literal(\"authority_unavailable\"),\n\t\treasonCode: trimmedNonEmptyStringSchema.max(160),\n\t\ttargetWakeLifecycleId: trimmedNonEmptyStringSchema.max(2048)\n\t})\n]);\nconst spaceDispatchTraceStructuredActionFailureSchema = z.strictObject({\n\tcarrierKind: z.enum([\n\t\t\"fenced_block\",\n\t\t\"invalid_json\",\n\t\t\"none\",\n\t\t\"trailing_json\"\n\t]),\n\tinvalidOutputPreview: boundedNullableTrimmedStringSchema(SPACE_DISPATCH_TRACE_INVALID_OUTPUT_PREVIEW_MAX_CHARS),\n\tpublicFailureReason: nullableTrimmedStringSchema$1,\n\trepairMode: z.enum([\n\t\t\"required_check\",\n\t\t\"local_synthetic\",\n\t\t\"controller_roundtrip\"\n\t]),\n\tspaceActionCandidatePresent: z.boolean(),\n\tspaceActionParseError: nullableTrimmedStringSchema$1\n});\nconst spaceDispatchTraceOpenClawGatewayVisibilitySchema = z.strictObject({\n\tagentId: trimmedNonEmptyStringSchema,\n\tgatewayRestartAttempted: z.boolean(),\n\tgatewayVisibility: z.enum([\n\t\t\"missing_after_restart\",\n\t\t\"missing_before_restart\",\n\t\t\"visible\",\n\t\t\"visible_after_restart\"\n\t])\n});\nconst spaceDispatchTraceOpenClawBindingSchema = z.strictObject({\n\tclassification: z.enum([\n\t\t\"missing\",\n\t\t\"canonical_owned\",\n\t\t\"legacy\",\n\t\t\"foreign\"\n\t]),\n\tbindingSource: z.union([z.enum([\"daemon-launch\", \"imported\"]), z.null()]),\n\tupgradeApplied: z.boolean()\n});\nconst spaceDispatchTraceSnapshotSchema = z.strictObject({\n\tdispatch: spaceDispatchTraceDispatchSchema,\n\truntimeCoordinatorExecution: z.union([spaceDispatchTraceRuntimeCoordinatorExecutionSchema, z.null()]),\n\truntimeCoordinatorCreationDiagnostics: z.array(spaceDispatchTraceRuntimeCoordinatorCreationDiagnosticSchema),\n\truntimeCoordinatorEvents: z.array(spaceDispatchTraceRuntimeCoordinatorEventSchema),\n\truntimeCoordinatorHeadLifecycle: z.union([spaceDispatchTraceRuntimeCoordinatorHeadLifecycleSchema, z.null()]),\n\tlatestAttempt: z.union([spaceDispatchTraceLatestAttemptSchema, z.null()]),\n\texecutionIdentity: z.union([spaceDispatchTraceExecutionIdentitySchema, z.null()]),\n\tclaimLease: z.union([spaceDispatchTraceClaimLeaseSchema, z.null()]),\n\tresult: z.union([spaceDispatchTraceResultSchema, z.null()]),\n\tresultInbox: z.union([spaceDispatchTraceResultInboxSchema, z.null()]),\n\trecentOpsDecisions: z.array(spaceDispatchTraceOpsDecisionSchema),\n\treplySignal: z.union([spaceDispatchTraceReplySignalSchema, z.null()]),\n\tfinalVisibleMessage: z.union([spaceDispatchTraceFinalVisibleMessageSchema, z.null()]).optional(),\n\tfinalVisibleMessageLinkage: z.union([spaceDispatchTraceFinalVisibleMessageLinkageSchema, z.null()]).optional(),\n\tfinalVisibleOutcome: spaceDispatchTraceFinalVisibleOutcomeSchema.optional(),\n\tstreaming: z.union([spaceDispatchTraceStreamingSchema, z.null()]),\n\truntime: z.union([spaceDispatchTraceRuntimeSchema, z.null()]),\n\texecution: z.union([spaceDispatchTraceExecutionSchema, z.null()]),\n\torigin: z.union([spaceDispatchTraceOriginSchema, z.null()]),\n\tprompt: z.union([spaceDispatchTracePromptSchema, z.null()]),\n\tdispatchExecution: z.union([spaceDispatchTraceDispatchExecutionSchema, z.null()]),\n\topenClawGatewayVisibility: z.union([spaceDispatchTraceOpenClawGatewayVisibilitySchema, z.null()]),\n\topenClawBinding: z.union([spaceDispatchTraceOpenClawBindingSchema, z.null()]),\n\tstructuredActionFailure: z.union([spaceDispatchTraceStructuredActionFailureSchema, z.null()])\n});\nconst spaceDispatchTraceResponseSchema = z.strictObject({\n\tcorrelation: observabilityWakeCorrelationSchema,\n\tquery: spaceDispatchTraceQuerySchema,\n\ttrace: z.union([spaceDispatchTraceSnapshotSchema, z.null()])\n}).superRefine((value, context) => {\n\texpectTraceEvidence(context, value.correlation.selector.kind, \"dispatch\", [\n\t\t\"correlation\",\n\t\t\"selector\",\n\t\t\"kind\"\n\t], \"trace response correlation selector must be dispatch\");\n\texpectTraceEvidence(context, value.correlation.spaceId, value.query.spaceId, [\"correlation\", \"spaceId\"], \"correlation.spaceId must match query.spaceId\");\n\texpectTraceEvidence(context, value.correlation.dispatchId, value.query.dispatchId, [\"correlation\", \"dispatchId\"], \"correlation.dispatchId must match query.dispatchId\");\n\tif (value.trace === null) {\n\t\texpectNullTraceEvidence(context, value.correlation.clientMessageId, [\"correlation\", \"clientMessageId\"]);\n\t\texpectNullTraceEvidence(context, value.correlation.sourceSignalId, [\"correlation\", \"sourceSignalId\"]);\n\t\texpectNullTraceEvidence(context, value.correlation.targetProfileId, [\"correlation\", \"targetProfileId\"]);\n\t\texpectNullTraceEvidence(context, value.correlation.latestAttemptId, [\"correlation\", \"latestAttemptId\"]);\n\t\texpectNullTraceEvidence(context, value.correlation.runtimeCoordinatorExecutionId, [\"correlation\", \"runtimeCoordinatorExecutionId\"]);\n\t\texpectNullTraceEvidence(context, value.correlation.claimLeaseId, [\"correlation\", \"claimLeaseId\"]);\n\t\texpectNullTraceEvidence(context, value.correlation.bindingId, [\"correlation\", \"bindingId\"]);\n\t\texpectNullTraceEvidence(context, value.correlation.runtimeId, [\"correlation\", \"runtimeId\"]);\n\t\texpectNullTraceEvidence(context, value.correlation.capabilityRef, [\"correlation\", \"capabilityRef\"]);\n\t\texpectNullTraceEvidence(context, value.correlation.resultRef, [\"correlation\", \"resultRef\"]);\n\t\texpectNullTraceEvidence(context, value.correlation.publishedSignalId, [\"correlation\", \"publishedSignalId\"]);\n\t\texpectNullTraceEvidence(context, value.correlation.replySignalId, [\"correlation\", \"replySignalId\"]);\n\t\treturn;\n\t}\n\texpectTraceEvidence(context, value.trace.dispatch.dispatchId, value.query.dispatchId, [\n\t\t\"trace\",\n\t\t\"dispatch\",\n\t\t\"dispatchId\"\n\t], \"trace.dispatch.dispatchId must match query.dispatchId\");\n\texpectTraceEvidence(context, value.correlation.clientMessageId, value.trace.dispatch.sourceClientMessageId, [\"correlation\", \"clientMessageId\"], \"correlation.clientMessageId must match trace.dispatch.sourceClientMessageId\");\n\texpectTraceEvidence(context, value.correlation.sourceSignalId, value.trace.dispatch.sourceEventId, [\"correlation\", \"sourceSignalId\"], \"correlation.sourceSignalId must match trace.dispatch.sourceEventId\");\n\texpectTraceEvidence(context, value.correlation.targetProfileId, value.trace.dispatch.targetProfileId, [\"correlation\", \"targetProfileId\"], \"correlation.targetProfileId must match trace.dispatch.targetProfileId\");\n\texpectTraceEvidence(context, value.correlation.latestAttemptId, value.trace.latestAttempt?.attemptId ?? value.trace.dispatch.latestAttemptId, [\"correlation\", \"latestAttemptId\"], \"correlation.latestAttemptId must match latest attempt evidence\");\n\texpectTraceEvidence(context, value.correlation.runtimeCoordinatorExecutionId, value.trace.runtimeCoordinatorExecution?.runtimeCoordinatorExecutionId ?? null, [\"correlation\", \"runtimeCoordinatorExecutionId\"], \"correlation.runtimeCoordinatorExecutionId must match trace.runtimeCoordinatorExecution.runtimeCoordinatorExecutionId\");\n\texpectTraceEvidence(context, value.correlation.claimLeaseId, value.trace.claimLease?.claimLeaseId ?? null, [\"correlation\", \"claimLeaseId\"], \"correlation.claimLeaseId must match trace.claimLease.claimLeaseId\");\n\texpectTraceEvidence(context, value.correlation.bindingId, value.trace.runtimeCoordinatorExecution?.bindingId ?? value.trace.executionIdentity?.core.bindingId ?? value.trace.claimLease?.bindingId ?? null, [\"correlation\", \"bindingId\"], \"correlation.bindingId must match trace execution identity evidence\");\n\texpectTraceEvidence(context, value.correlation.runtimeId, value.trace.runtimeCoordinatorExecution?.runtimeId.value ?? value.trace.executionIdentity?.core.runtimeId.value ?? value.trace.claimLease?.runtimeId ?? null, [\"correlation\", \"runtimeId\"], \"correlation.runtimeId must match trace execution identity evidence\");\n\texpectTraceEvidence(context, value.correlation.capabilityRef, value.trace.runtimeCoordinatorExecution?.capabilityRef ?? value.trace.executionIdentity?.core.capabilityRef ?? value.trace.claimLease?.capabilityRef ?? null, [\"correlation\", \"capabilityRef\"], \"correlation.capabilityRef must match trace execution identity evidence\");\n\texpectTraceEvidence(context, value.correlation.resultRef, value.trace.result?.resultRef ?? null, [\"correlation\", \"resultRef\"], \"correlation.resultRef must match trace.result.resultRef\");\n\texpectTraceEvidence(context, value.correlation.publishedSignalId, value.trace.result?.publishedSignalId ?? null, [\"correlation\", \"publishedSignalId\"], \"correlation.publishedSignalId must match trace.result.publishedSignalId\");\n\texpectTraceEvidence(context, value.correlation.replySignalId, value.trace.replySignal?.signalId ?? null, [\"correlation\", \"replySignalId\"], \"correlation.replySignalId must match trace.replySignal.signalId\");\n\texpectFinalVisibleMessageTraceEvidence(context, value.trace);\n\tif (value.trace.latestAttempt) expectTraceEvidence(context, value.trace.latestAttempt.dispatchId, value.trace.dispatch.dispatchId, [\n\t\t\"trace\",\n\t\t\"latestAttempt\",\n\t\t\"dispatchId\"\n\t], \"trace.latestAttempt.dispatchId must match trace.dispatch.dispatchId\");\n\tif (value.trace.claimLease) {\n\t\texpectTraceEvidence(context, value.trace.claimLease.dispatchId, value.trace.dispatch.dispatchId, [\n\t\t\t\"trace\",\n\t\t\t\"claimLease\",\n\t\t\t\"dispatchId\"\n\t\t], \"trace.claimLease.dispatchId must match trace.dispatch.dispatchId\");\n\t\texpectTraceEvidence(context, value.trace.claimLease.sourceEventId, value.trace.dispatch.sourceEventId, [\n\t\t\t\"trace\",\n\t\t\t\"claimLease\",\n\t\t\t\"sourceEventId\"\n\t\t], \"trace.claimLease.sourceEventId must match trace.dispatch.sourceEventId\");\n\t\texpectTraceEvidence(context, value.trace.claimLease.sourceClientMessageId, value.trace.dispatch.sourceClientMessageId, [\n\t\t\t\"trace\",\n\t\t\t\"claimLease\",\n\t\t\t\"sourceClientMessageId\"\n\t\t], \"trace.claimLease.sourceClientMessageId must match trace.dispatch.sourceClientMessageId\");\n\t\texpectTraceEvidence(context, value.trace.claimLease.targetProfileId, value.trace.dispatch.targetProfileId, [\n\t\t\t\"trace\",\n\t\t\t\"claimLease\",\n\t\t\t\"targetProfileId\"\n\t\t], \"trace.claimLease.targetProfileId must match trace.dispatch.targetProfileId\");\n\t}\n\tif (value.trace.executionIdentity) {\n\t\texpectTraceEvidence(context, value.trace.executionIdentity.core.spaceId, value.query.spaceId, [\n\t\t\t\"trace\",\n\t\t\t\"executionIdentity\",\n\t\t\t\"core\",\n\t\t\t\"spaceId\"\n\t\t], \"trace.executionIdentity.core.spaceId must match query.spaceId\");\n\t\texpectTraceEvidence(context, value.trace.executionIdentity.core.dispatchId, value.trace.dispatch.dispatchId, [\n\t\t\t\"trace\",\n\t\t\t\"executionIdentity\",\n\t\t\t\"core\",\n\t\t\t\"dispatchId\"\n\t\t], \"trace.executionIdentity.core.dispatchId must match trace.dispatch.dispatchId\");\n\t\texpectTraceEvidence(context, value.trace.executionIdentity.core.targetProfileId, value.trace.dispatch.targetProfileId, [\n\t\t\t\"trace\",\n\t\t\t\"executionIdentity\",\n\t\t\t\"core\",\n\t\t\t\"targetProfileId\"\n\t\t], \"trace.executionIdentity.core.targetProfileId must match trace.dispatch.targetProfileId\");\n\t}\n\tif (value.trace.runtimeCoordinatorExecution) {\n\t\texpectTraceEvidence(context, value.trace.runtimeCoordinatorExecution.spaceId, value.query.spaceId, [\n\t\t\t\"trace\",\n\t\t\t\"runtimeCoordinatorExecution\",\n\t\t\t\"spaceId\"\n\t\t], \"trace.runtimeCoordinatorExecution.spaceId must match query.spaceId\");\n\t\texpectTraceEvidence(context, value.trace.runtimeCoordinatorExecution.dispatchId, value.trace.dispatch.dispatchId, [\n\t\t\t\"trace\",\n\t\t\t\"runtimeCoordinatorExecution\",\n\t\t\t\"dispatchId\"\n\t\t], \"trace.runtimeCoordinatorExecution.dispatchId must match trace.dispatch.dispatchId\");\n\t\texpectTraceEvidence(context, value.trace.runtimeCoordinatorExecution.targetProfileId, value.trace.dispatch.targetProfileId, [\n\t\t\t\"trace\",\n\t\t\t\"runtimeCoordinatorExecution\",\n\t\t\t\"targetProfileId\"\n\t\t], \"trace.runtimeCoordinatorExecution.targetProfileId must match trace.dispatch.targetProfileId\");\n\t}\n\texpectRuntimeCoordinatorHeadLifecycleTraceEvidence(context, {\n\t\tquery: value.query,\n\t\ttrace: value.trace\n\t});\n\tfor (const diagnostic of value.trace.runtimeCoordinatorCreationDiagnostics) {\n\t\texpectTraceEvidence(context, diagnostic.spaceId, value.query.spaceId, [\"trace\", \"runtimeCoordinatorCreationDiagnostics\"], \"trace.runtimeCoordinatorCreationDiagnostics.spaceId must match query.spaceId\");\n\t\texpectTraceEvidence(context, diagnostic.dispatchId, value.trace.dispatch.dispatchId, [\"trace\", \"runtimeCoordinatorCreationDiagnostics\"], \"trace.runtimeCoordinatorCreationDiagnostics.dispatchId must match trace.dispatch.dispatchId\");\n\t\texpectTraceEvidence(context, diagnostic.targetProfileId, value.trace.dispatch.targetProfileId, [\"trace\", \"runtimeCoordinatorCreationDiagnostics\"], \"trace.runtimeCoordinatorCreationDiagnostics.targetProfileId must match trace.dispatch.targetProfileId\");\n\t}\n\tfor (const event of value.trace.runtimeCoordinatorEvents) expectTraceEvidence(context, event.runtimeCoordinatorExecutionId, value.trace.runtimeCoordinatorExecution?.runtimeCoordinatorExecutionId ?? null, [\"trace\", \"runtimeCoordinatorEvents\"], \"trace.runtimeCoordinatorEvents.runtimeCoordinatorExecutionId must match trace.runtimeCoordinatorExecution.runtimeCoordinatorExecutionId\");\n\tif (value.trace.result) expectTraceEvidence(context, value.trace.result.dispatchId, value.trace.dispatch.dispatchId, [\n\t\t\"trace\",\n\t\t\"result\",\n\t\t\"dispatchId\"\n\t], \"trace.result.dispatchId must match trace.dispatch.dispatchId\");\n\tif (value.trace.resultInbox) {\n\t\texpectTraceEvidence(context, value.trace.resultInbox.dispatchId, value.trace.dispatch.dispatchId, [\n\t\t\t\"trace\",\n\t\t\t\"resultInbox\",\n\t\t\t\"dispatchId\"\n\t\t], \"trace.resultInbox.dispatchId must match trace.dispatch.dispatchId\");\n\t\texpectTraceEvidence(context, value.trace.resultInbox.targetProfileId, value.trace.dispatch.targetProfileId, [\n\t\t\t\"trace\",\n\t\t\t\"resultInbox\",\n\t\t\t\"targetProfileId\"\n\t\t], \"trace.resultInbox.targetProfileId must match trace.dispatch.targetProfileId\");\n\t\texpectTraceEvidence(context, value.trace.resultInbox.attemptId, value.trace.latestAttempt?.attemptId ?? value.trace.dispatch.latestAttemptId, [\n\t\t\t\"trace\",\n\t\t\t\"resultInbox\",\n\t\t\t\"attemptId\"\n\t\t], \"trace.resultInbox.attemptId must match latest attempt evidence\");\n\t}\n});\nconst FINAL_VISIBLE_OUTCOME_PUBLICATION_PENDING_REASON_CODE = \"final_visible_outcome.publication_pending\";\nconst FINAL_VISIBLE_OUTCOME_PUBLICATION_RETRYING_REASON_CODE = \"final_visible_outcome.publication_retrying\";\nconst FINAL_VISIBLE_OUTCOME_PUBLICATION_UNRESOLVED_REASON_CODE = \"final_visible_outcome.publication_unresolved\";\nconst RUNTIME_COORDINATOR_PUBLICATION_UNRESOLVED_REASON_CODE = \"runtime_coordinator.publication_unresolved\";\nconst RUNTIME_COORDINATOR_DELIVERY_EXPIRED_REASON_CODE = \"runtime_coordinator.delivery_expired\";\nfunction listSpaceDispatchTraceFinalVisibleSignalCandidates(trace) {\n\tconst candidates = [];\n\taddFinalVisibleSignalCandidate(candidates, trace.runtimeCoordinatorHeadLifecycle?.readStatus === \"found\" ? trace.runtimeCoordinatorHeadLifecycle.publicationOutcome?.publishedSignalId : null);\n\taddFinalVisibleSignalCandidate(candidates, trace.result?.publishedSignalId);\n\taddFinalVisibleSignalCandidate(candidates, trace.resultInbox?.publishedSignalId);\n\treturn candidates;\n}\nfunction addFinalVisibleSignalCandidate(candidates, value) {\n\tconst normalized = normalizeOptionalTraceText(value);\n\tif (normalized && !candidates.includes(normalized)) candidates.push(normalized);\n}\nfunction normalizeOptionalTraceText(value) {\n\tconst normalized = typeof value === \"string\" ? value.trim() : \"\";\n\treturn normalized.length > 0 ? normalized : null;\n}\nfunction projectSpaceDispatchTraceFinalVisibleOutcome(trace) {\n\treturn resolveFinalVisibleMessageOutcome(trace) ?? resolvePublicationBlockerOutcome(trace) ?? resolveHeadPublicationExhaustionOutcome(trace) ?? resolveHeadPublicationOutcome(trace) ?? resolveResultPublicationOutcome(trace) ?? resolveRuntimeCoordinatorExecutionPublicationOutcome(trace) ?? resolveHeadPublicationIntentOutcome(trace) ?? createNotApplicableFinalVisibleOutcome();\n}\nfunction resolveFinalVisibleMessageOutcome(trace) {\n\tconst finalVisibleMessage = trace.finalVisibleMessage ?? null;\n\tif (!finalVisibleMessage) return null;\n\tconst visibleFailure = isFailureFinalVisibleSystemNotice(finalVisibleMessage);\n\treturn {\n\t\tdelivered: true,\n\t\tpublicationErrorCode: null,\n\t\tpublicationKind: visibleFailure ? \"failure_notice\" : \"success_reply\",\n\t\treasonCode: resolveFinalVisibleMessageOutcomeReasonCode(finalVisibleMessage, visibleFailure),\n\t\tsignalId: finalVisibleMessage.signalId,\n\t\tsourceFact: \"final_visible_message\",\n\t\tsourceReasonCode: finalVisibleMessage.reasonCode,\n\t\tsourceStatus: finalVisibleMessage.signalType,\n\t\tstatus: visibleFailure ? \"visible_failure\" : \"visible_reply\"\n\t};\n}\nfunction isFailureFinalVisibleSystemNotice(finalVisibleMessage) {\n\treturn finalVisibleMessage.signalType === \"signal.system_notice\" && (finalVisibleMessage.noticeType === \"terminal_failure\" || finalVisibleMessage.noticeType === \"policy_blocked\");\n}\nfunction resolveFinalVisibleMessageOutcomeReasonCode(finalVisibleMessage, visibleFailure) {\n\tif (!visibleFailure) return finalVisibleMessage.noticeType === \"stay_silent\" ? \"space.stay_silent_notice_published\" : \"reply.delivered\";\n\tif (finalVisibleMessage.reasonCode) return finalVisibleMessage.reasonCode;\n\treturn finalVisibleMessage.noticeType === \"policy_blocked\" ? \"space.policy_blocked_notice_published\" : \"space.terminal_failure_notice_published\";\n}\nfunction resolvePublicationBlockerOutcome(trace) {\n\tconst publicationBlocker = resolveRuntimeCoordinatorPublicationUnresolvedBlocker(trace);\n\treturn publicationBlocker ? {\n\t\tdelivered: false,\n\t\tpublicationErrorCode: null,\n\t\tpublicationKind: publicationBlocker.publicationKind,\n\t\treasonCode: FINAL_VISIBLE_OUTCOME_PUBLICATION_UNRESOLVED_REASON_CODE,\n\t\tsignalId: null,\n\t\tsourceFact: \"runtime_coordinator_event\",\n\t\tsourceReasonCode: publicationBlocker.reasonCode,\n\t\tsourceStatus: publicationBlocker.status,\n\t\tstatus: \"publication_unresolved\"\n\t} : null;\n}\nfunction resolveHeadPublicationExhaustionOutcome(trace) {\n\tconst headPublicationExhaustion = trace.runtimeCoordinatorHeadLifecycle?.readStatus === \"found\" ? trace.runtimeCoordinatorHeadLifecycle.publicationExhaustion ?? null : null;\n\tif (!headPublicationExhaustion) return null;\n\treturn {\n\t\tdelivered: false,\n\t\tpublicationErrorCode: null,\n\t\tpublicationKind: \"failure_notice\",\n\t\treasonCode: FINAL_VISIBLE_OUTCOME_PUBLICATION_UNRESOLVED_REASON_CODE,\n\t\tsignalId: null,\n\t\tsourceFact: \"runtime_coordinator_head_lifecycle\",\n\t\tsourceReasonCode: headPublicationExhaustion.reasonCode,\n\t\tsourceStatus: headPublicationExhaustion.status,\n\t\tstatus: \"publication_unresolved\"\n\t};\n}\nfunction resolveHeadPublicationOutcome(trace) {\n\tconst headPublicationOutcome = trace.runtimeCoordinatorHeadLifecycle?.readStatus === \"found\" ? trace.runtimeCoordinatorHeadLifecycle.publicationOutcome ?? null : null;\n\tif (!headPublicationOutcome) return null;\n\tif (headPublicationOutcome?.status === \"failure_publication_failed\") return {\n\t\tdelivered: false,\n\t\tpublicationErrorCode: headPublicationOutcome.publicationErrorCode,\n\t\tpublicationKind: \"failure_notice\",\n\t\treasonCode: FINAL_VISIBLE_OUTCOME_PUBLICATION_RETRYING_REASON_CODE,\n\t\tsignalId: headPublicationOutcome.publishedSignalId,\n\t\tsourceFact: \"runtime_coordinator_head_lifecycle\",\n\t\tsourceReasonCode: headPublicationOutcome.publicationErrorCode ?? \"runtime_coordinator.failure_publication_failed\",\n\t\tsourceStatus: headPublicationOutcome.status,\n\t\tstatus: \"publication_retrying\"\n\t};\n\treturn {\n\t\tdelivered: false,\n\t\tpublicationErrorCode: headPublicationOutcome.publicationErrorCode,\n\t\tpublicationKind: headPublicationOutcome.finalMessageKind === \"success_reply\" ? \"success_reply\" : \"failure_notice\",\n\t\treasonCode: FINAL_VISIBLE_OUTCOME_PUBLICATION_UNRESOLVED_REASON_CODE,\n\t\tsignalId: headPublicationOutcome.publishedSignalId,\n\t\tsourceFact: \"runtime_coordinator_head_lifecycle\",\n\t\tsourceReasonCode: headPublicationOutcome.publicationErrorCode ?? \"reply.not_found\",\n\t\tsourceStatus: headPublicationOutcome.status,\n\t\tstatus: \"publication_unresolved\"\n\t};\n}\nfunction resolveResultPublicationOutcome(trace) {\n\tif (hasRuntimeCoordinatorPreResultAuthority(trace)) return null;\n\tconst resultInbox = trace.resultInbox;\n\tif (resultInbox?.publishState === \"reply_publication_failed\") return {\n\t\tdelivered: false,\n\t\tpublicationErrorCode: resultInbox.publicationErrorCode,\n\t\tpublicationKind: \"success_reply\",\n\t\treasonCode: FINAL_VISIBLE_OUTCOME_PUBLICATION_RETRYING_REASON_CODE,\n\t\tsignalId: resultInbox.publishedSignalId,\n\t\tsourceFact: \"result_inbox\",\n\t\tsourceReasonCode: resultInbox.publicationErrorCode ?? \"reply.publication_failed\",\n\t\tsourceStatus: resultInbox.publishState,\n\t\tstatus: \"publication_retrying\"\n\t};\n\tif (resultInbox?.publishState === \"reply_published\" || trace.result?.publishedSignalId) return {\n\t\tdelivered: false,\n\t\tpublicationErrorCode: resultInbox?.publicationErrorCode ?? null,\n\t\tpublicationKind: \"success_reply\",\n\t\treasonCode: FINAL_VISIBLE_OUTCOME_PUBLICATION_UNRESOLVED_REASON_CODE,\n\t\tsignalId: trace.result?.publishedSignalId ?? resultInbox?.publishedSignalId ?? null,\n\t\tsourceFact: trace.result?.publishedSignalId ? \"dispatch_result\" : \"result_inbox\",\n\t\tsourceReasonCode: \"reply.not_found\",\n\t\tsourceStatus: resultInbox?.publishState ?? (trace.result?.publishedSignalId ? \"published_signal_missing\" : null),\n\t\tstatus: \"publication_unresolved\"\n\t};\n\treturn null;\n}\nfunction resolveRuntimeCoordinatorExecutionPublicationOutcome(trace) {\n\tconst runtimeCoordinatorExecution = trace.runtimeCoordinatorExecution;\n\tconst runtimeCoordinatorReason = runtimeCoordinatorExecution?.terminalOutcome?.reasonCode ?? null;\n\tif (runtimeCoordinatorExecution?.status === \"failed_retryable\" && isPublicationFailureReasonCode(runtimeCoordinatorReason)) return {\n\t\tdelivered: false,\n\t\tpublicationErrorCode: runtimeCoordinatorReason,\n\t\tpublicationKind: \"success_reply\",\n\t\treasonCode: FINAL_VISIBLE_OUTCOME_PUBLICATION_RETRYING_REASON_CODE,\n\t\tsignalId: null,\n\t\tsourceFact: \"runtime_coordinator_execution\",\n\t\tsourceReasonCode: runtimeCoordinatorReason,\n\t\tsourceStatus: runtimeCoordinatorExecution.status,\n\t\tstatus: \"publication_retrying\"\n\t};\n\tif (runtimeCoordinatorExecution?.status === \"failed_terminal\" && runtimeCoordinatorReason === RUNTIME_COORDINATOR_DELIVERY_EXPIRED_REASON_CODE) return {\n\t\tdelivered: false,\n\t\tpublicationErrorCode: null,\n\t\tpublicationKind: \"failure_notice\",\n\t\treasonCode: FINAL_VISIBLE_OUTCOME_PUBLICATION_UNRESOLVED_REASON_CODE,\n\t\tsignalId: null,\n\t\tsourceFact: \"runtime_coordinator_execution\",\n\t\tsourceReasonCode: runtimeCoordinatorReason,\n\t\tsourceStatus: runtimeCoordinatorExecution.status,\n\t\tstatus: \"publication_unresolved\"\n\t};\n\tif (runtimeCoordinatorExecution?.status === \"reply_published\") return {\n\t\tdelivered: false,\n\t\tpublicationErrorCode: null,\n\t\tpublicationKind: \"success_reply\",\n\t\treasonCode: FINAL_VISIBLE_OUTCOME_PUBLICATION_UNRESOLVED_REASON_CODE,\n\t\tsignalId: null,\n\t\tsourceFact: \"runtime_coordinator_execution\",\n\t\tsourceReasonCode: \"reply.not_found\",\n\t\tsourceStatus: runtimeCoordinatorExecution.status,\n\t\tstatus: \"publication_unresolved\"\n\t};\n\treturn null;\n}\nfunction resolveHeadPublicationIntentOutcome(trace) {\n\tconst headLifecycle = trace.runtimeCoordinatorHeadLifecycle;\n\tif (headLifecycle?.readStatus !== \"found\" || !headLifecycle.publicationIntent) return null;\n\treturn {\n\t\tdelivered: false,\n\t\tpublicationErrorCode: null,\n\t\tpublicationKind: \"failure_notice\",\n\t\treasonCode: FINAL_VISIBLE_OUTCOME_PUBLICATION_PENDING_REASON_CODE,\n\t\tsignalId: null,\n\t\tsourceFact: \"runtime_coordinator_head_lifecycle\",\n\t\tsourceReasonCode: headLifecycle.publicationIntent.reasonCode,\n\t\tsourceStatus: headLifecycle.publicationIntent.status,\n\t\tstatus: \"publication_pending\"\n\t};\n}\nfunction createNotApplicableFinalVisibleOutcome() {\n\treturn {\n\t\tdelivered: false,\n\t\tpublicationErrorCode: null,\n\t\tpublicationKind: null,\n\t\treasonCode: null,\n\t\tsignalId: null,\n\t\tsourceFact: \"none\",\n\t\tsourceReasonCode: null,\n\t\tsourceStatus: null,\n\t\tstatus: \"not_applicable\"\n\t};\n}\nfunction projectSpaceDispatchTraceRootCause(trace) {\n\tconst finalVisibleOutcomeRootCause = resolveFinalVisibleOutcomeRootCause(trace);\n\tif (finalVisibleOutcomeRootCause) return finalVisibleOutcomeRootCause;\n\tconst legacyResultInboxRootCause = resolveLegacyResultInboxRootCause(trace);\n\tif (legacyResultInboxRootCause) return legacyResultInboxRootCause;\n\tconst headLifecycleRootCause = resolveRuntimeCoordinatorHeadLifecycleRootCause(trace);\n\tif (headLifecycleRootCause) return headLifecycleRootCause;\n\tconst runtimeCoordinatorCreationFailure = resolveRuntimeCoordinatorCreationRootCause(trace);\n\tif (runtimeCoordinatorCreationFailure) return runtimeCoordinatorCreationFailure;\n\tconst runtimeProgressStale = resolveRuntimeProgressStaleRootCause(trace);\n\tif (runtimeProgressStale) return runtimeProgressStale;\n\tconst runtimeCoordinatorRootCause = resolveRuntimeCoordinatorExecutionRootCause(trace);\n\tif (runtimeCoordinatorRootCause) return runtimeCoordinatorRootCause;\n\tconst attemptErrorRootCause = resolveLatestAttemptErrorRootCause(trace);\n\tif (attemptErrorRootCause) return attemptErrorRootCause;\n\tif (trace.result?.publishedSignalId) return {\n\t\treasonCode: \"reply.not_found\",\n\t\tsource: \"reply_lookup\"\n\t};\n\tif (trace.dispatch.status === \"succeeded\") return {\n\t\treasonCode: \"dispatch.succeeded\",\n\t\tsource: \"dispatch\"\n\t};\n\tif (trace.execution?.leaseState === \"stalled\") return {\n\t\treasonCode: \"daemon.execution_stalled\",\n\t\tsource: \"runtime\"\n\t};\n\tif (trace.runtime?.timeoutTriggeredAt) return {\n\t\treasonCode: \"runtime.timeout\",\n\t\tsource: \"runtime\"\n\t};\n\tif (trace.latestAttempt?.status) return {\n\t\treasonCode: `attempt.${trace.latestAttempt.status}`,\n\t\tsource: \"latest_attempt\"\n\t};\n\treturn {\n\t\treasonCode: `dispatch.${trace.dispatch.status}`,\n\t\tsource: \"dispatch\"\n\t};\n}\nfunction resolveSpaceDispatchTraceRootCause(trace) {\n\treturn projectSpaceDispatchTraceRootCause(trace).reasonCode;\n}\nfunction resolveFinalVisibleOutcomeRootCause(trace) {\n\tconst finalVisibleOutcome = projectSpaceDispatchTraceFinalVisibleOutcome(trace);\n\tswitch (finalVisibleOutcome.status) {\n\t\tcase \"visible_reply\": return {\n\t\t\treasonCode: finalVisibleOutcome.reasonCode ?? \"reply.delivered\",\n\t\t\tsource: \"final_visible_message\"\n\t\t};\n\t\tcase \"visible_failure\": return {\n\t\t\treasonCode: finalVisibleOutcome.reasonCode ?? \"space.terminal_failure_notice_published\",\n\t\t\tsource: \"final_visible_message\"\n\t\t};\n\t\tcase \"publication_pending\":\n\t\tcase \"publication_retrying\": return {\n\t\t\treasonCode: finalVisibleOutcome.reasonCode ?? FINAL_VISIBLE_OUTCOME_PUBLICATION_UNRESOLVED_REASON_CODE,\n\t\t\tsource: \"final_visible_outcome\"\n\t\t};\n\t\tcase \"publication_unresolved\": return resolveFinalVisibleMessageLinkageRootCause(trace, finalVisibleOutcome) ?? {\n\t\t\treasonCode: finalVisibleOutcome.reasonCode ?? FINAL_VISIBLE_OUTCOME_PUBLICATION_UNRESOLVED_REASON_CODE,\n\t\t\tsource: \"final_visible_outcome\"\n\t\t};\n\t\tcase \"not_applicable\": return resolveFinalVisibleMessageLinkageRootCause(trace, finalVisibleOutcome);\n\t\tdefault: return assertNever(finalVisibleOutcome.status);\n\t}\n}\nfunction resolveFinalVisibleMessageLinkageRootCause(trace, finalVisibleOutcome) {\n\tconst linkage = trace.finalVisibleMessageLinkage ?? null;\n\tif (!linkage || linkage.status === \"matched_published_signal\" || linkage.status === \"matched_final_reply_claim\" || linkage.status === \"projection_pending\") return null;\n\tif (isAuthoritativePublicationUnresolved(finalVisibleOutcome)) return null;\n\tif (linkage.status === \"linkage_missing\" || linkage.status === \"storage_inconsistent\") return {\n\t\treasonCode: linkage.reasonCode ?? `final_visible_message.${linkage.status}`,\n\t\tsource: \"final_visible_message\"\n\t};\n\treturn null;\n}\nfunction isAuthoritativePublicationUnresolved(finalVisibleOutcome) {\n\treturn finalVisibleOutcome.status === \"publication_unresolved\" && (finalVisibleOutcome.sourceFact === \"runtime_coordinator_event\" || finalVisibleOutcome.sourceFact === \"runtime_coordinator_head_lifecycle\" && finalVisibleOutcome.signalId === null);\n}\nfunction resolveLegacyResultInboxRootCause(trace) {\n\tif (hasRuntimeCoordinatorPreResultAuthority(trace)) return null;\n\tif (trace.resultInbox?.publishState === \"reply_publication_failed\") return {\n\t\treasonCode: \"reply.publication_failed\",\n\t\tsource: \"result_inbox\"\n\t};\n\tif (trace.resultInbox?.publishState === \"invalid_space_action\") return {\n\t\treasonCode: \"reply.invalid_space_action\",\n\t\tsource: \"result_inbox\"\n\t};\n\treturn null;\n}\nfunction resolveRuntimeProgressStaleRootCause(trace) {\n\tif (hasRuntimeCoordinatorPreResultAuthority(trace) && hasRuntimeCoordinatorProgressStalePolicyEvidence(trace)) return {\n\t\treasonCode: \"runtime.progress_stale\",\n\t\tsource: \"runtime\"\n\t};\n\tif (!hasRuntimeCoordinatorPreResultAuthority(trace) && trace.runtimeCoordinatorExecution) return null;\n\tif (trace.execution?.leaseState === \"stalled\") return {\n\t\treasonCode: \"runtime.progress_stale\",\n\t\tsource: \"runtime\"\n\t};\n\tif (trace.latestAttempt?.errorCode === \"daemon.delivery.execution_stalled\") return {\n\t\treasonCode: \"runtime.progress_stale\",\n\t\tsource: \"runtime\"\n\t};\n\treturn null;\n}\nfunction hasRuntimeCoordinatorProgressStalePolicyEvidence(trace) {\n\treturn trace.runtimeCoordinatorEvents.some((event) => event.eventType === \"runtime_coordinator_decision_recorded\" && event.reasonCode === \"runtime_coordinator.progress_stale_policy_pending\");\n}\nfunction resolveRuntimeCoordinatorHeadLifecycleRootCause(trace) {\n\tif (trace.runtimeCoordinatorExecution) return null;\n\tconst headLifecycle = trace.runtimeCoordinatorHeadLifecycle;\n\tif (!headLifecycle) return null;\n\tif (headLifecycle.readStatus === \"authority_unavailable\") return {\n\t\treasonCode: headLifecycle.reasonCode,\n\t\tsource: \"runtime_coordinator\"\n\t};\n\tif (headLifecycle.readStatus === \"missing\") return {\n\t\treasonCode: headLifecycle.reasonCode,\n\t\tsource: \"runtime_coordinator\"\n\t};\n\treturn {\n\t\treasonCode: headLifecycle.noExecutionDecision?.reasonCode ?? headLifecycle.publicationIntent?.reasonCode ?? headLifecycle.waitingBoundary?.reasonCode ?? resolvePreExecutionNoExecutionEvidenceRootCause(trace) ?? resolveRuntimeCoordinatorHeadStatusRootCause(headLifecycle.status),\n\t\tsource: \"runtime_coordinator\"\n\t};\n}\nfunction resolveRuntimeCoordinatorHeadStatusRootCause(status) {\n\tif (status === \"accepted\") return \"runtime_coordinator.head_accepted\";\n\tif (status === \"execution_linked\") return \"runtime_coordinator.head_execution_linked\";\n\tif (status === \"waiting\") return \"runtime_coordinator.head_waiting\";\n\treturn \"runtime_coordinator.head_publication_intent_ready\";\n}\nfunction resolveRuntimeCoordinatorCreationRootCause(trace) {\n\tif (trace.runtimeCoordinatorExecution || trace.runtimeCoordinatorHeadLifecycle?.readStatus === \"found\" || trace.runtimeCoordinatorHeadLifecycle?.readStatus === \"authority_unavailable\" || trace.runtimeCoordinatorCreationDiagnostics.length === 0) return null;\n\treturn {\n\t\treasonCode: trace.runtimeCoordinatorCreationDiagnostics.at(-1)?.reasonCode ?? \"runtime_coordinator.execution_not_created\",\n\t\tsource: \"runtime_coordinator\"\n\t};\n}\nconst PRE_EXECUTION_NO_EXECUTION_EVIDENCE_REASON_CODES = new Set([\"local_service.identity_mismatch\"]);\nfunction resolvePreExecutionNoExecutionEvidenceRootCause(trace) {\n\tconst headLifecycle = trace.runtimeCoordinatorHeadLifecycle;\n\tif (trace.runtimeCoordinatorExecution || headLifecycle?.readStatus !== \"found\" || headLifecycle.runtimeCoordinatorExecutionId || headLifecycle.waitingBoundary) return null;\n\tconst authoritativeHeadReason = headLifecycle.noExecutionDecision?.reasonCode ?? headLifecycle.publicationIntent?.reasonCode ?? null;\n\treturn authoritativeHeadReason && PRE_EXECUTION_NO_EXECUTION_EVIDENCE_REASON_CODES.has(authoritativeHeadReason) ? authoritativeHeadReason : null;\n}\nfunction resolveRuntimeCoordinatorExecutionRootCause(trace) {\n\tconst execution = trace.runtimeCoordinatorExecution;\n\tif (!execution) return null;\n\tswitch (execution.status) {\n\t\tcase \"failed_retryable\":\n\t\tcase \"failed_terminal\": return {\n\t\t\treasonCode: execution.terminalOutcome?.reasonCode ?? `runtime_coordinator.${execution.status}`,\n\t\t\tsource: \"runtime_coordinator\"\n\t\t};\n\t\tcase \"reply_published\": return null;\n\t\tcase \"state_unknown\": return {\n\t\t\treasonCode: \"runtime_coordinator.state_unknown\",\n\t\t\tsource: \"runtime_coordinator\"\n\t\t};\n\t\tdefault: return {\n\t\t\treasonCode: `runtime_coordinator.${execution.status}`,\n\t\t\tsource: \"runtime_coordinator\"\n\t\t};\n\t}\n}\nfunction resolveLatestAttemptErrorRootCause(trace) {\n\tif (!trace.latestAttempt?.errorCode) return null;\n\treturn {\n\t\treasonCode: resolveAttemptErrorRootCause(trace.latestAttempt.errorCode) ?? trace.latestAttempt.errorCode,\n\t\tsource: \"latest_attempt\"\n\t};\n}\nfunction resolveAttemptErrorRootCause(errorCode) {\n\tswitch (errorCode) {\n\t\tcase \"daemon.delivery.execution_stalled\": return \"runtime.progress_stale\";\n\t\tcase \"timeout\":\n\t\tcase \"timed_out_no_output\":\n\t\tcase \"timed_out_after_output\": return \"local_adapter.timeout\";\n\t\tcase \"daemon.delivery.timeout\":\n\t\tcase \"daemon.delivery.finalization_timeout\": return \"delivery.result_timeout\";\n\t\tcase \"daemon.delivery.start_timeout\": return \"delivery.start_timeout\";\n\t\tdefault: return null;\n\t}\n}\nfunction hasRuntimeCoordinatorPreResultAuthority(trace) {\n\tswitch (trace.runtimeCoordinatorExecution?.status) {\n\t\tcase \"created\":\n\t\tcase \"delivery_pending\":\n\t\tcase \"delivery_accepted\":\n\t\tcase \"accepted_local\":\n\t\tcase \"running\":\n\t\tcase \"completed_local\": return true;\n\t\tdefault: return false;\n\t}\n}\nfunction resolveRuntimeCoordinatorPublicationUnresolvedBlocker(trace) {\n\tconst event = trace.runtimeCoordinatorEvents.filter((candidate) => candidate.eventType === \"runtime_coordinator_decision_recorded\" && candidate.reasonCode === RUNTIME_COORDINATOR_PUBLICATION_UNRESOLVED_REASON_CODE).at(-1);\n\tif (!event) return null;\n\tconst payload = parseRuntimeCoordinatorEventPayload(event);\n\tif (readPayloadString(payload, \"status\") !== \"unresolved_publication_failure\") return null;\n\treturn {\n\t\tpublicationKind: readPayloadString(payload, \"publicationKind\") === \"failure_notice\" ? \"failure_notice\" : \"success_reply\",\n\t\treasonCode: readPayloadString(payload, \"reasonCode\"),\n\t\tstatus: \"unresolved_publication_failure\"\n\t};\n}\nfunction parseRuntimeCoordinatorEventPayload(event) {\n\ttry {\n\t\tconst parsed = JSON.parse(event.payloadJson);\n\t\treturn parsed && typeof parsed === \"object\" && !Array.isArray(parsed) ? parsed : null;\n\t} catch {\n\t\treturn null;\n\t}\n}\nfunction readPayloadString(payload, fieldName) {\n\tconst value = payload?.[fieldName];\n\treturn typeof value === \"string\" && value.trim().length > 0 ? value.trim() : null;\n}\nfunction isPublicationFailureReasonCode(reasonCode) {\n\treturn Boolean(reasonCode && (reasonCode.includes(\"publication\") || reasonCode.includes(\"finalization\") || reasonCode.includes(\"space.signal\")));\n}\nfunction assertNever(value) {\n\tthrow new Error(`Unexpected space dispatch trace value: ${String(value)}`);\n}\nfunction expectRuntimeCoordinatorHeadLifecycleTraceEvidence(context, value) {\n\tconst headLifecycle = value.trace.runtimeCoordinatorHeadLifecycle;\n\tif (headLifecycle?.readStatus !== \"found\") return;\n\texpectTraceEvidence(context, headLifecycle.targetWakeLifecycleIdentity.spaceId, value.query.spaceId, [\"trace\", \"runtimeCoordinatorHeadLifecycle\"], \"trace.runtimeCoordinatorHeadLifecycle.spaceId must match query.spaceId\");\n\texpectTraceEvidence(context, headLifecycle.targetWakeLifecycleIdentity.sourceSignalId, value.trace.dispatch.sourceEventId, [\"trace\", \"runtimeCoordinatorHeadLifecycle\"], \"trace.runtimeCoordinatorHeadLifecycle.sourceSignalId must match trace.dispatch.sourceEventId\");\n\texpectTraceEvidence(context, headLifecycle.targetWakeLifecycleIdentity.targetProfileId, value.trace.dispatch.targetProfileId, [\"trace\", \"runtimeCoordinatorHeadLifecycle\"], \"trace.runtimeCoordinatorHeadLifecycle.targetProfileId must match trace.dispatch.targetProfileId\");\n\tif (headLifecycle.runtimeCoordinatorExecutionId === null) return;\n\texpectTraceEvidence(context, headLifecycle.runtimeCoordinatorExecutionId, value.trace.runtimeCoordinatorExecution?.runtimeCoordinatorExecutionId ?? null, [\"trace\", \"runtimeCoordinatorHeadLifecycle\"], \"trace.runtimeCoordinatorHeadLifecycle.runtimeCoordinatorExecutionId must match trace.runtimeCoordinatorExecution\");\n}\nfunction expectFinalVisibleMessageTraceEvidence(context, trace) {\n\tif (!trace.finalVisibleMessage) return;\n\texpectTraceEvidence(context, trace.finalVisibleMessage.dispatchId, trace.dispatch.dispatchId, [\n\t\t\"trace\",\n\t\t\"finalVisibleMessage\",\n\t\t\"dispatchId\"\n\t], \"trace.finalVisibleMessage.dispatchId must match trace.dispatch.dispatchId\");\n\texpectTraceEvidence(context, trace.finalVisibleMessage.targetProfileId, trace.dispatch.targetProfileId, [\n\t\t\"trace\",\n\t\t\"finalVisibleMessage\",\n\t\t\"targetProfileId\"\n\t], \"trace.finalVisibleMessage.targetProfileId must match trace.dispatch.targetProfileId\");\n\tconst finalVisibleSignalCandidates = listSpaceDispatchTraceFinalVisibleSignalCandidates(trace);\n\tif (trace.finalVisibleMessage.factSource !== \"space_signal_by_published_signal_id\" || finalVisibleSignalCandidates.length === 0) return;\n\tif (!finalVisibleSignalCandidates.includes(trace.finalVisibleMessage.signalId)) context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"trace.finalVisibleMessage.signalId must match a canonical final visible publication signal\",\n\t\tpath: [\n\t\t\t\"trace\",\n\t\t\t\"finalVisibleMessage\",\n\t\t\t\"signalId\"\n\t\t]\n\t});\n}\nfunction expectTraceEvidence(context, actual, expected, path, message) {\n\tif (actual !== expected) context.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage,\n\t\tpath\n\t});\n}\nfunction expectNullTraceEvidence(context, actual, path) {\n\texpectTraceEvidence(context, actual, null, path, \"not-found trace correlation must not include resolved trace evidence\");\n}\n\n//#endregion\n//#region src/schemas/http/space-dispatch-lookup.ts\nconst optionalSelectorSchema$3 = z.preprocess((value) => {\n\tconst normalized = String(value ?? \"\").trim();\n\treturn normalized.length > 0 ? normalized : void 0;\n}, z.string().min(1).optional());\nconst optionalClientMessageIdSchema = z.preprocess((value) => {\n\tconst normalized = String(value ?? \"\").trim();\n\treturn normalized.length > 0 ? normalized : void 0;\n}, clientMessageIdSchema$1.optional());\nconst getSpaceDispatchLookupInputSchema = z.strictObject({\n\tspaceId: nonEmptyTrimmedStringFromUnknown,\n\tsourceSignalId: optionalSelectorSchema$3,\n\tclientMessageId: optionalClientMessageIdSchema,\n\ttargetProfileId: optionalSelectorSchema$3\n}).superRefine((value, context) => {\n\tif (Number(value.sourceSignalId !== void 0) + Number(value.clientMessageId !== void 0) === 1) return;\n\tcontext.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"exactly one of sourceSignalId or clientMessageId is required\",\n\t\tpath: [\"sourceSignalId\"]\n\t});\n});\nconst spaceDispatchLookupMatchSchema = z.strictObject({\n\tdispatchId: z.string().trim().min(1),\n\tsourceSignalId: z.string().trim().min(1),\n\ttargetProfileId: z.string().trim().min(1),\n\tstatus: spaceDispatchTraceDispatchStatusSchema,\n\tattemptCount: z.int().min(0),\n\tlatestAttemptId: z.string().trim().min(1).nullable(),\n\tlatestAttemptStatus: spaceDispatchTraceAttemptStatusSchema.nullable(),\n\tlatestAttemptErrorCode: z.string().trim().min(1).nullable(),\n\tlatestAttemptErrorMessage: z.string().trim().min(1).nullable()\n});\nconst getSpaceDispatchLookupResponseSchema = z.strictObject({\n\tquery: z.strictObject({\n\t\tspaceId: z.string().trim().min(1),\n\t\tsourceSignalId: z.string().trim().min(1).nullable(),\n\t\tclientMessageId: clientMessageIdSchema$1.nullable(),\n\t\ttargetProfileId: z.string().trim().min(1).nullable()\n\t}),\n\tmatches: z.array(spaceDispatchLookupMatchSchema)\n});\n\n//#endregion\n//#region src/schemas/http/space-dispatch-outbox-redrive.ts\nconst spaceDispatchOutboxRedriveReasonSchema = z.enum([\"runtime_coordinator_head_waiting_recovery\"]);\nconst postSpaceDispatchOutboxRedriveBodySchema = z.strictObject({\n\treason: spaceDispatchOutboxRedriveReasonSchema,\n\ttargetProfileId: z.string().min(1),\n\ttargetWakeLifecycleId: z.string().min(1).max(2048)\n});\nconst postSpaceDispatchOutboxRedriveResponseSchema = z.discriminatedUnion(\"status\", [z.strictObject({\n\tdispatchId: z.string().min(1),\n\tok: z.literal(true),\n\tstatus: z.literal(\"enqueued\"),\n\ttargetProfileId: z.string().min(1)\n}), z.strictObject({\n\tdispatchId: z.string().min(1).nullable(),\n\tok: z.literal(false),\n\treasonCode: z.string().min(1).max(160),\n\tstatus: z.enum([\n\t\t\"lifecycle_mismatch\",\n\t\t\"method_not_allowed\",\n\t\t\"not_found\",\n\t\t\"queue_unavailable\",\n\t\t\"request_invalid\",\n\t\t\"target_mismatch\",\n\t\t\"unauthorized\"\n\t]),\n\ttargetProfileId: z.string().min(1).nullable()\n})]);\n\n//#endregion\n//#region src/schemas/http/space-name.ts\nconst MAX_SPACE_NAME_LENGTH = 80;\nconst spaceNameSchema = z.string().trim().min(1).max(MAX_SPACE_NAME_LENGTH);\n\n//#endregion\n//#region src/schemas/space-mesh/dispatch-result.ts\nconst isoDateTimeSchema$1 = z.iso.datetime({ offset: true });\nconst nullableTrimmedStringSchema = z.union([z.string().trim().min(1), z.null()]);\nconst dispatchResultKindSchema = z.enum([\"text\", \"status\"]);\nconst dispatchResultPublicOutcomeSchema = z.enum([\n\t\"internal_only\",\n\t\"raw_context_sharing\",\n\t\"system_notice\",\n\t\"stay_silent\",\n\t\"post_message\",\n\t\"post_status\"\n]);\nconst dispatchResultRuntimeWorkspaceSchema = z.strictObject({\n\tfingerprint: nullableTrimmedStringSchema,\n\tpath: z.string().trim().min(1)\n});\nconst dispatchResultSchema = z.strictObject({\n\tresultRef: z.preprocess(trimmedStringFromUnknown, z.string().min(1)),\n\tdispatchId: z.preprocess(trimmedStringFromUnknown, z.string().min(1)),\n\tspaceId: z.preprocess(trimmedStringFromUnknown, z.string().min(1)),\n\tactorProfileId: atsRuntimeProfileIdSchema,\n\tactorName: z.preprocess(trimmedStringFromUnknown, z.string().min(1)).optional(),\n\treplyToSignalId: z.preprocess(trimmedStringFromUnknown, z.string().min(1)).optional(),\n\tresultKind: dispatchResultKindSchema,\n\tfinalText: z.preprocess(trimmedStringFromUnknown, z.string().min(1)).optional(),\n\tmessageEnvelope: messageEnvelopeSchema.optional(),\n\tthreadContext: spaceThreadContextSchema.optional(),\n\tstatusType: spaceStatusSchema.optional(),\n\tpreviewText: z.preprocess(trimmedStringFromUnknown, z.string().min(1)).optional(),\n\tpublicOutcome: dispatchResultPublicOutcomeSchema,\n\tupstreamConversation: upstreamConversationRefSchema.optional(),\n\truntimeWorkspace: dispatchResultRuntimeWorkspaceSchema.optional(),\n\tdispatchExecution: dispatchExecutionSchema.optional(),\n\tpublishedSignalId: z.preprocess(trimmedStringFromUnknown, z.string().min(1)).optional(),\n\tcreatedAt: isoDateTimeSchema$1\n}).superRefine((value, ctx) => {\n\tif (value.resultKind === \"text\" && !value.finalText) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"finalText is required when resultKind is text\",\n\t\tpath: [\"finalText\"]\n\t});\n\tif (value.resultKind === \"status\" && !value.statusType) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"statusType is required when resultKind is status\",\n\t\tpath: [\"statusType\"]\n\t});\n\tif (value.messageEnvelope && value.resultKind !== \"text\") ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"messageEnvelope is only allowed when resultKind is text\",\n\t\tpath: [\"messageEnvelope\"]\n\t});\n\tif (value.messageEnvelope && value.finalText && value.finalText !== value.messageEnvelope.text) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"messageEnvelope.text must match finalText\",\n\t\tpath: [\"messageEnvelope\", \"text\"]\n\t});\n\tif (value.messageEnvelope?.replyToSignalId && value.replyToSignalId && value.replyToSignalId !== value.messageEnvelope.replyToSignalId) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"messageEnvelope.replyToSignalId must match replyToSignalId\",\n\t\tpath: [\"messageEnvelope\", \"replyToSignalId\"]\n\t});\n});\n\n//#endregion\n//#region src/schemas/http/space-result.ts\nconst optionalSelectorSchema$2 = z.preprocess((value) => {\n\tconst normalized = String(value ?? \"\").trim();\n\treturn normalized.length > 0 ? normalized : void 0;\n}, z.string().min(1).optional());\nconst getSpaceDispatchResultInputSchema = z.strictObject({\n\tspaceId: nonEmptyTrimmedStringFromUnknown,\n\tdispatchId: optionalSelectorSchema$2,\n\tresultRef: optionalSelectorSchema$2\n}).superRefine((value, ctx) => {\n\tif (Number(typeof value.dispatchId === \"string\") + Number(typeof value.resultRef === \"string\") !== 1) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"exactly one of dispatchId or resultRef is required\",\n\t\tpath: [\"dispatchId\"]\n\t});\n});\nconst getSpaceDispatchResultResponseSchema = dispatchResultSchema;\n\n//#endregion\n//#region src/schemas/protocol/hello.ts\nconst helloSchema = z.object({\n\ttype: z.literal(\"hello\"),\n\tprofile: profileSchema\n});\nconst helloAckSchema = z.object({\n\ttype: z.literal(\"system.hello.ack\"),\n\tprofile: profileSchema\n});\n\n//#endregion\n//#region src/schemas/protocol/server-error.ts\nconst serverErrorFrameSchema = z.object({\n\terror: nonEmptyTrimmedStringFromUnknown,\n\trequestId: nonEmptyTrimmedStringFromUnknown.optional(),\n\tclientMessageId: clientMessageIdSchema$1.optional()\n});\n\n//#endregion\n//#region src/schemas/protocol/envelope.ts\nconst baseEnvelopeShape = {\n\tv: z.literal(1),\n\tid: nonEmptyTrimmedStringFromUnknown,\n\tspaceId: nonEmptyTrimmedStringFromUnknown,\n\tts: finiteIntegerNumber,\n\tprofile: profileSchema\n};\nconst presenceDataSchema = z.record(z.string(), z.unknown());\nconst presenceEnvelopeSchema = z.object({\n\t...baseEnvelopeShape,\n\ttype: z.enum([\"presence.join\", \"presence.quit\"]),\n\tdata: presenceDataSchema\n});\nconst signalTextEnvelopeSchema = z.object({\n\t...baseEnvelopeShape,\n\ttype: z.literal(\"signal.text\"),\n\tdata: signalTextDataSchema\n});\nconst signalStatusEnvelopeSchema = z.object({\n\t...baseEnvelopeShape,\n\ttype: z.literal(\"signal.status\"),\n\tdata: signalStatusDataSchema\n});\nconst signalSystemNoticeEnvelopeSchema = z.object({\n\t...baseEnvelopeShape,\n\ttype: z.literal(\"signal.system_notice\"),\n\tdata: signalSystemNoticeDataSchema\n});\nconst signalEnvelopeSchema = z.union([\n\tpresenceEnvelopeSchema,\n\tsignalTextEnvelopeSchema,\n\tsignalStatusEnvelopeSchema,\n\tsignalSystemNoticeEnvelopeSchema\n]);\nconst spaceLiveSignalFrameSchema = z.strictObject({\n\ttype: z.literal(\"space.signal\"),\n\tsignal: signalEnvelopeSchema,\n\tthreadContext: spaceThreadContextSchema.optional(),\n\tthreadPlacement: spaceThreadSignalPlacementSchema.optional()\n});\nconst incomingServerMessageSchema = z.union([\n\tsignalEnvelopeSchema,\n\tspaceLiveSignalFrameSchema,\n\thelloAckSchema,\n\tserverErrorFrameSchema\n]);\n\n//#endregion\n//#region src/schemas/http/space-signals.ts\nconst signalTextRequestDataSchema = signalTextSchema.shape.data;\nconst SPACE_WAKE_CLIENT_MESSAGE_ID_REQUIRED_ERROR_CODE = \"space.wake.client_message_id_required\";\nconst SPACE_WAKE_CLIENT_MESSAGE_ID_REQUIRED_MESSAGE = \"Wake requests from user-authored signal posts require clientMessageId.\";\nconst SPACE_SIGNAL_AUTHORING_POLICY_REQUIRED_ERROR_CODE = \"space.signal_authoring_policy_required\";\nconst SPACE_SIGNAL_AUTHORING_POLICY_REQUIRED_MESSAGE = \"Signal posts must declare authoringPolicy before clientMessageId policy validation.\";\nconst spaceSignalAuthoringPolicySchema = z.enum([\n\t\"user_authored\",\n\t\"system_emitted\",\n\t\"legacy_nullable\"\n]);\nconst hasSpaceSignalWakeActivationTarget = (messageEnvelope) => (messageEnvelope?.activationTargets ?? []).some((target) => typeof target === \"string\" && target.trim().length > 0);\nconst hasSpaceSignalClientMessageId = (meta) => typeof meta?.clientMessageId === \"string\" && meta.clientMessageId.trim().length > 0;\nconst validateSpaceSignalClientMessageIdPolicy = (input) => {\n\tconst createsWakeDispatch = hasSpaceSignalWakeActivationTarget(input.messageEnvelope);\n\tconst authoringPolicy = spaceSignalAuthoringPolicySchema.safeParse(input.authoringPolicy);\n\tif (!authoringPolicy.success) return {\n\t\tok: false,\n\t\tcode: SPACE_SIGNAL_AUTHORING_POLICY_REQUIRED_ERROR_CODE,\n\t\tcreatesWakeDispatch,\n\t\tmessage: SPACE_SIGNAL_AUTHORING_POLICY_REQUIRED_MESSAGE,\n\t\trequiresClientMessageId: false\n\t};\n\tconst requiresClientMessageId = authoringPolicy.data === \"user_authored\" && createsWakeDispatch;\n\tif (requiresClientMessageId && !hasSpaceSignalClientMessageId(input.meta)) return {\n\t\tok: false,\n\t\tcode: SPACE_WAKE_CLIENT_MESSAGE_ID_REQUIRED_ERROR_CODE,\n\t\tcreatesWakeDispatch: true,\n\t\tmessage: SPACE_WAKE_CLIENT_MESSAGE_ID_REQUIRED_MESSAGE,\n\t\trequiresClientMessageId: true\n\t};\n\treturn {\n\t\tok: true,\n\t\tcreatesWakeDispatch,\n\t\trequiresClientMessageId\n\t};\n};\nconst postNormalMessageBodySchema = z.strictObject({\n\ttext: signalTextRequestDataSchema.shape.text,\n\tmessageEnvelope: signalTextRequestDataSchema.shape.messageEnvelope.optional(),\n\treplyTo: signalTextRequestDataSchema.shape.replyTo.optional(),\n\tmeta: signalTextRequestDataSchema.shape.meta.optional()\n}).superRefine((value, ctx) => {\n\tconst parsed = signalTextRequestDataSchema.safeParse(value);\n\tif (parsed.success) return;\n\tconst firstIssue = parsed.error.issues[0];\n\tctx.addIssue({\n\t\tcode: \"custom\",\n\t\tpath: firstIssue?.path ?? [],\n\t\tmessage: firstIssue?.message ?? \"Invalid normal message payload\"\n\t});\n});\nconst postNormalMessageResponseSchema = signalTextEnvelopeSchema;\n\n//#endregion\n//#region src/schemas/http/space-status.ts\nconst isoDateTimeSchema = z.iso.datetime({ offset: true });\nconst optionalTrimmedStringSchema = z.preprocess((value) => {\n\tconst normalized = String(value ?? \"\").trim();\n\treturn normalized.length > 0 ? normalized : void 0;\n}, z.string().min(1).optional());\nconst spaceStatusLatestVisibleUpdateSchema = z.strictObject({\n\tsignalId: nonEmptyTrimmedStringFromUnknown,\n\tsignalType: z.enum([\n\t\t\"signal.text\",\n\t\t\"signal.status\",\n\t\t\"signal.system_notice\"\n\t]),\n\tcreatedAt: isoDateTimeSchema,\n\tactorProfileId: atsRuntimeProfileIdSchema,\n\tactorName: optionalTrimmedStringSchema,\n\tpreviewText: nonEmptyTrimmedStringFromUnknown\n});\nconst spaceStatusMembersSummarySchema = spaceMembersSummarySchema.extend({\n\tliveHumanCount: z.number().int().min(0),\n\tliveAgentCount: z.number().int().min(0)\n});\nconst getSpaceStatusInputSchema = spaceRouteParamsSchema;\nconst getSpaceStatusResponseSchema = z.strictObject({\n\tspaceId: nonEmptyTrimmedStringFromUnknown,\n\tgeneratedAt: isoDateTimeSchema,\n\tname: optionalTrimmedStringSchema,\n\tpasswordProtected: z.boolean(),\n\tdispatchPolicy: spaceDispatchPolicySchema,\n\tpublicationMode: spacePublicationModeSchema,\n\tallowedActions: spaceAllowedActionsSchema,\n\tresultArchivePolicy: resultArchivePolicySchema,\n\tentryBrief: z.enum([\"default\", \"none\"]),\n\tdispatchBrief: z.enum([\"default\", \"none\"]),\n\tmembers: spaceStatusMembersSummarySchema,\n\tlatestVisibleUpdate: spaceStatusLatestVisibleUpdateSchema.optional()\n});\n\n//#endregion\n//#region src/schemas/http/space-threads.ts\nconst clientMutationIdSchema = z.preprocess(trimmedStringFromUnknown, z.string().min(1).max(200));\nconst clientMessageIdSchema = z.preprocess(trimmedStringFromUnknown, z.string().min(1).max(200));\nconst createSpaceThreadBodySchema = z.strictObject({\n\trootSignalId: z.preprocess(trimmedStringFromUnknown, z.string().min(1)),\n\tclientMutationId: clientMutationIdSchema\n});\nconst createSpaceThreadResponseSchema = z.strictObject({\n\tthread: spaceThreadSchema,\n\trootSignal: signalEnvelopeSchema,\n\tplacement: spaceThreadSignalPlacementSchema\n});\nconst getSpaceThreadResponseSchema = z.strictObject({\n\tthread: spaceThreadSchema,\n\trootSignal: z.union([signalEnvelopeSchema, z.null()])\n});\nconst listSpaceThreadEventsResponseSchema = z.strictObject({ events: z.array(spaceThreadEventSchema) });\nconst spaceThreadPreviewSchema = z.strictObject({\n\tthreadId: spaceThreadSchema.shape.threadId,\n\treplyCount: z.number().int().min(0),\n\tsignals: z.array(signalEnvelopeSchema),\n\tplacements: z.array(spaceThreadSignalPlacementSchema)\n});\nconst listSpaceThreadsResponseSchema = z.strictObject({\n\tthreads: z.array(spaceThreadSchema),\n\tpreviews: z.array(spaceThreadPreviewSchema).default([])\n});\nconst listSpaceThreadSignalsResponseSchema = z.strictObject({\n\tsignals: z.array(signalEnvelopeSchema),\n\tplacements: z.array(spaceThreadSignalPlacementSchema)\n});\nconst postSpaceThreadSignalBodySchema = z.strictObject({\n\ttext: z.preprocess(trimmedStringFromUnknown, z.string().min(1)),\n\tmessageEnvelope: messageEnvelopeSchema.optional(),\n\tclientMessageId: clientMessageIdSchema\n}).superRefine((value, ctx) => {\n\tconst parsed = signalTextSchema.shape.data.safeParse({\n\t\ttext: value.text,\n\t\t...value.messageEnvelope ? { messageEnvelope: value.messageEnvelope } : {},\n\t\tmeta: { clientMessageId: value.clientMessageId }\n\t});\n\tif (parsed.success) return;\n\tconst firstIssue = parsed.error.issues[0];\n\tctx.addIssue({\n\t\tcode: \"custom\",\n\t\tpath: firstIssue?.path ?? [],\n\t\tmessage: firstIssue?.message ?? \"Invalid thread signal payload\"\n\t});\n});\nconst postSpaceThreadSignalResponseSchema = z.strictObject({\n\tsignal: signalTextEnvelopeSchema,\n\tplacement: spaceThreadSignalPlacementSchema\n});\n\n//#endregion\n//#region src/schemas/http/space-updates.ts\nconst DECIMAL_INTEGER_REGEX = /^\\d+$/u;\nconst updatesLimitSchema = z.preprocess((value) => {\n\tif (value === void 0 || value === null || value === \"\") return SPACE_UPDATES_DEFAULT_LIMIT;\n\tif (typeof value === \"number\") return value;\n\tconst normalized = String(value).trim();\n\tif (normalized.length === 0) return SPACE_UPDATES_DEFAULT_LIMIT;\n\tif (!DECIMAL_INTEGER_REGEX.test(normalized)) return NaN;\n\treturn Number.parseInt(normalized, 10);\n}, z.number().int().min(1).max(SPACE_UPDATES_MAX_LIMIT)).default(SPACE_UPDATES_DEFAULT_LIMIT);\nconst getSpaceUpdatesInputSchema = z.strictObject({\n\tspaceId: nonEmptyTrimmedStringFromUnknown,\n\tafterSignalId: nonEmptyTrimmedStringFromUnknown,\n\tlimit: updatesLimitSchema\n});\nconst getSpaceUpdatesResponseSchema = z.strictObject({ signals: z.array(signalEnvelopeSchema) });\n\n//#endregion\n//#region src/schemas/http/space-wake-progress.ts\nconst optionalSelectorSchema$1 = z.preprocess((value) => {\n\tconst normalized = String(value ?? \"\").trim();\n\treturn normalized.length > 0 ? normalized : void 0;\n}, z.string().min(1).optional());\nconst wakeProgressPhaseSchema = z.enum([\n\t\"sending\",\n\t\"request_sent\",\n\t\"queued\",\n\t\"connecting\",\n\t\"running\",\n\t\"writing\",\n\t\"publishing\",\n\t\"retrying\",\n\t\"failed\",\n\t\"replied\"\n]);\nconst wakeProgressItemSchema = z.strictObject({\n\tclientMessageId: clientMessageIdSchema$1.nullable(),\n\tsourceSignalId: z.string().trim().min(1).nullable(),\n\tdispatchId: z.string().trim().min(1).nullable(),\n\ttargetProfileId: z.string().trim().min(1),\n\ttargetLabel: z.string().trim().min(1),\n\tphase: wakeProgressPhaseSchema,\n\tfailureReasonCode: z.string().trim().min(1).nullable().optional(),\n\tmessage: z.string().trim().min(1),\n\tupdatedAtMs: z.int().min(0),\n\tterminal: z.boolean()\n});\nconst getSpaceWakeProgressInputSchema = z.strictObject({\n\tspaceId: nonEmptyTrimmedStringFromUnknown,\n\tclientMessageId: clientMessageIdSchema$1,\n\ttargetProfileId: optionalSelectorSchema$1\n});\nconst getSpaceWakeProgressResponseSchema = z.strictObject({\n\tquery: z.strictObject({\n\t\tspaceId: z.string().trim().min(1),\n\t\tclientMessageId: clientMessageIdSchema$1,\n\t\ttargetProfileId: z.string().trim().min(1).nullable()\n\t}),\n\titems: z.array(wakeProgressItemSchema)\n});\n\n//#endregion\n//#region src/schemas/http/space-wake-trace-waterfall.ts\nconst optionalSelectorSchema = z.preprocess((value) => {\n\tconst normalized = String(value ?? \"\").trim();\n\treturn normalized.length > 0 ? normalized : void 0;\n}, z.string().min(1).optional());\nconst nullableTrimmedIdentifierSchema = z.string().trim().min(1).nullable();\nconst nullableReasonCodeSchema = z.string().trim().min(1).max(512).nullable();\nconst nullableIsoDateTimeSchema = z.iso.datetime({ offset: true }).nullable();\nconst WAKE_TRACE_WATERFALL_STEP_NAMES = [\n\t\"source_signal\",\n\t\"planner\",\n\t\"dispatch\",\n\t\"head_lifecycle\",\n\t\"attempt\",\n\t\"claim\",\n\t\"result_inbox\",\n\t\"result\",\n\t\"reply_signal\"\n];\nconst wakeTraceWaterfallStepNameSchema = z.enum(WAKE_TRACE_WATERFALL_STEP_NAMES);\nconst wakeTraceWaterfallStepStatusSchema = z.enum([\n\t\"found\",\n\t\"missing\",\n\t\"pending\",\n\t\"failed\",\n\t\"degraded\",\n\t\"not_applicable\"\n]);\nconst wakeTraceWaterfallSummaryStatusSchema = z.enum([\n\t\"missing\",\n\t\"pending\",\n\t\"running\",\n\t\"failed\",\n\t\"replied\"\n]);\nconst wakeTraceWaterfallFactSourceSchema = z.enum([\n\t\"space_signal_by_client_message_id\",\n\t\"dispatch_outbox\",\n\t\"dispatch_lookup\",\n\t\"dispatch_ledger\",\n\t\"dispatch_attempt\",\n\t\"runtime_coordinator_head_lifecycle\",\n\t\"dispatch_claim_lease\",\n\t\"dispatch_result_inbox\",\n\t\"dispatch_result\",\n\t\"space_signal_by_published_signal_id\",\n\t\"space_final_reply_claim\",\n\t\"space_signal_recent_window\",\n\t\"lookup_error\"\n]);\nconst wakeTraceWaterfallStepIdsSchema = z.strictObject({\n\tclientMessageId: clientMessageIdSchema$1.nullable(),\n\tsourceSignalId: nullableTrimmedIdentifierSchema,\n\ttargetProfileId: nullableTrimmedIdentifierSchema,\n\ttargetWakeLifecycleId: nullableTrimmedIdentifierSchema,\n\tdispatchId: nullableTrimmedIdentifierSchema,\n\tattemptId: nullableTrimmedIdentifierSchema,\n\tclaimLeaseId: nullableTrimmedIdentifierSchema,\n\tbindingId: nullableTrimmedIdentifierSchema,\n\truntimeId: nullableTrimmedIdentifierSchema,\n\tcapabilityRef: nullableTrimmedIdentifierSchema,\n\tresultKey: nullableTrimmedIdentifierSchema,\n\tresultRef: nullableTrimmedIdentifierSchema,\n\tpublishedSignalId: nullableTrimmedIdentifierSchema,\n\treplySignalId: nullableTrimmedIdentifierSchema\n});\nconst wakeTraceWaterfallStepSchema = z.strictObject({\n\torder: z.int().min(0),\n\tname: wakeTraceWaterfallStepNameSchema,\n\tstatus: wakeTraceWaterfallStepStatusSchema,\n\tfactSource: wakeTraceWaterfallFactSourceSchema.nullable(),\n\tobservedAt: nullableIsoDateTimeSchema,\n\treasonCode: nullableReasonCodeSchema,\n\tids: wakeTraceWaterfallStepIdsSchema\n});\nconst wakeTraceWaterfallItemSchema = z.strictObject({\n\ttargetProfileId: z.string().trim().min(1),\n\ttargetLabel: z.string().trim().min(1),\n\tcorrelation: observabilityWakeCorrelationSchema,\n\tsummary: z.strictObject({\n\t\tstatus: wakeTraceWaterfallSummaryStatusSchema,\n\t\tterminalStep: wakeTraceWaterfallStepNameSchema.nullable(),\n\t\treasonCode: nullableReasonCodeSchema\n\t}),\n\tsteps: z.array(wakeTraceWaterfallStepSchema)\n});\nconst getSpaceWakeTraceWaterfallInputSchema = z.strictObject({\n\tspaceId: nonEmptyTrimmedStringFromUnknown,\n\tclientMessageId: clientMessageIdSchema$1,\n\ttargetProfileId: optionalSelectorSchema\n});\nconst getSpaceWakeTraceWaterfallResponseSchema = z.strictObject({\n\tquery: z.strictObject({\n\t\tspaceId: z.string().trim().min(1),\n\t\tclientMessageId: clientMessageIdSchema$1,\n\t\ttargetProfileId: z.string().trim().min(1).nullable()\n\t}),\n\titems: z.array(wakeTraceWaterfallItemSchema)\n}).superRefine((value, context) => {\n\tfor (const [itemIndex, item] of value.items.entries()) {\n\t\tif (value.query.targetProfileId !== null && item.targetProfileId !== value.query.targetProfileId) context.addIssue({\n\t\t\tcode: \"custom\",\n\t\t\tmessage: \"item targetProfileId must match query.targetProfileId\",\n\t\t\tpath: [\n\t\t\t\t\"items\",\n\t\t\t\titemIndex,\n\t\t\t\t\"targetProfileId\"\n\t\t\t]\n\t\t});\n\t\tif (item.correlation.selector.kind === \"client_message\") {\n\t\t\texpectWaterfallEvidence(context, item.correlation.selector.spaceId, value.query.spaceId, [\n\t\t\t\t\"items\",\n\t\t\t\titemIndex,\n\t\t\t\t\"correlation\",\n\t\t\t\t\"selector\",\n\t\t\t\t\"spaceId\"\n\t\t\t], \"correlation selector spaceId must match query.spaceId\");\n\t\t\texpectWaterfallEvidence(context, item.correlation.selector.clientMessageId, value.query.clientMessageId, [\n\t\t\t\t\"items\",\n\t\t\t\titemIndex,\n\t\t\t\t\"correlation\",\n\t\t\t\t\"selector\",\n\t\t\t\t\"clientMessageId\"\n\t\t\t], \"correlation selector clientMessageId must match query.clientMessageId\");\n\t\t\texpectWaterfallEvidence(context, item.correlation.selector.targetProfileId, item.targetProfileId, [\n\t\t\t\t\"items\",\n\t\t\t\titemIndex,\n\t\t\t\t\"correlation\",\n\t\t\t\t\"selector\",\n\t\t\t\t\"targetProfileId\"\n\t\t\t], \"correlation selector targetProfileId must match item targetProfileId\");\n\t\t} else context.addIssue({\n\t\t\tcode: \"custom\",\n\t\t\tmessage: \"waterfall correlation selector must be client_message\",\n\t\t\tpath: [\n\t\t\t\t\"items\",\n\t\t\t\titemIndex,\n\t\t\t\t\"correlation\",\n\t\t\t\t\"selector\",\n\t\t\t\t\"kind\"\n\t\t\t]\n\t\t});\n\t\texpectWaterfallEvidence(context, item.correlation.spaceId, value.query.spaceId, [\n\t\t\t\"items\",\n\t\t\titemIndex,\n\t\t\t\"correlation\",\n\t\t\t\"spaceId\"\n\t\t], \"correlation spaceId must match query.spaceId\");\n\t\texpectWaterfallEvidence(context, item.correlation.clientMessageId, value.query.clientMessageId, [\n\t\t\t\"items\",\n\t\t\titemIndex,\n\t\t\t\"correlation\",\n\t\t\t\"clientMessageId\"\n\t\t], \"correlation clientMessageId must match query.clientMessageId\");\n\t\texpectWaterfallEvidence(context, item.correlation.targetProfileId, item.targetProfileId, [\n\t\t\t\"items\",\n\t\t\titemIndex,\n\t\t\t\"correlation\",\n\t\t\t\"targetProfileId\"\n\t\t], \"correlation targetProfileId must match item targetProfileId\");\n\t\tif (item.steps.length !== WAKE_TRACE_WATERFALL_STEP_NAMES.length) context.addIssue({\n\t\t\tcode: \"custom\",\n\t\t\tmessage: \"waterfall item must include all canonical steps\",\n\t\t\tpath: [\n\t\t\t\t\"items\",\n\t\t\t\titemIndex,\n\t\t\t\t\"steps\"\n\t\t\t]\n\t\t});\n\t\tfor (const [stepIndex, expectedName] of WAKE_TRACE_WATERFALL_STEP_NAMES.entries()) {\n\t\t\tconst step = item.steps[stepIndex];\n\t\t\tif (!step) continue;\n\t\t\texpectWaterfallEvidence(context, step.order, stepIndex, [\n\t\t\t\t\"items\",\n\t\t\t\titemIndex,\n\t\t\t\t\"steps\",\n\t\t\t\tstepIndex,\n\t\t\t\t\"order\"\n\t\t\t], \"waterfall step order must match canonical order\");\n\t\t\texpectWaterfallEvidence(context, step.name, expectedName, [\n\t\t\t\t\"items\",\n\t\t\t\titemIndex,\n\t\t\t\t\"steps\",\n\t\t\t\tstepIndex,\n\t\t\t\t\"name\"\n\t\t\t], \"waterfall step name must match canonical order\");\n\t\t\texpectWaterfallEvidence(context, step.ids.clientMessageId, value.query.clientMessageId, [\n\t\t\t\t\"items\",\n\t\t\t\titemIndex,\n\t\t\t\t\"steps\",\n\t\t\t\tstepIndex,\n\t\t\t\t\"ids\",\n\t\t\t\t\"clientMessageId\"\n\t\t\t], \"waterfall step clientMessageId must match query.clientMessageId\");\n\t\t\texpectWaterfallEvidence(context, step.ids.targetProfileId, item.targetProfileId, [\n\t\t\t\t\"items\",\n\t\t\t\titemIndex,\n\t\t\t\t\"steps\",\n\t\t\t\tstepIndex,\n\t\t\t\t\"ids\",\n\t\t\t\t\"targetProfileId\"\n\t\t\t], \"waterfall step targetProfileId must match item targetProfileId\");\n\t\t}\n\t}\n});\nfunction expectWaterfallEvidence(context, actual, expected, path, message) {\n\tif (actual === expected) return;\n\tcontext.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage,\n\t\tpath\n\t});\n}\n\n//#endregion\n//#region src/schemas/start/device-projection.ts\nconst startBackgroundHelperInstallStatusSchema = z.enum([\n\t\"not_installed\",\n\t\"installed_current\",\n\t\"installed_outdated\",\n\t\"unknown\"\n]);\nconst startBackgroundHelperRuntimeStatusSchema = z.enum([\n\t\"running\",\n\t\"stale\",\n\t\"not_running\",\n\t\"unknown\"\n]);\nconst startBackgroundHelperExecutionCompatibilityStatusSchema = z.enum([\"compatible\", \"update_required\"]);\nconst startBackgroundHelperExecutionCompatibilityReasonCodeSchema = z.enum([\n\t\"daemon.runtime_contract.compatible\",\n\t\"daemon.runtime_contract.missing\",\n\t\"daemon.runtime_contract.mismatch\",\n\t\"daemon.runtime_contract.unavailable\",\n\t\"daemon.runtime_contract.not_observed\"\n]);\nconst startBackgroundHelperExecutionCompatibilitySchema = z.strictObject({\n\tstatus: startBackgroundHelperExecutionCompatibilityStatusSchema,\n\treasonCode: startBackgroundHelperExecutionCompatibilityReasonCodeSchema,\n\texpectedEpoch: START_BOUNDED_ID_SCHEMA,\n\tobservedEpoch: z.union([START_BOUNDED_ID_SCHEMA, z.null()]),\n\tupdatedAt: z.union([START_ISO_DATE_TIME_SCHEMA, z.null()])\n});\nconst startSkillsReadinessStatusSchema = z.enum([\n\t\"up_to_date\",\n\t\"action_required\",\n\t\"no_targets\",\n\t\"unknown\"\n]);\nconst startDeviceAgentSelectableReasonSchema = localAgentCatalogSelectableReasonSchema;\nconst startBackgroundHelperProjectionSchema = z.strictObject({\n\tinstallStatus: startBackgroundHelperInstallStatusSchema,\n\truntimeStatus: startBackgroundHelperRuntimeStatusSchema,\n\tinstalledVersion: z.union([START_BOUNDED_VERSION_SCHEMA, z.null()]),\n\texpectedVersion: START_BOUNDED_VERSION_SCHEMA,\n\texecutionCompatibility: startBackgroundHelperExecutionCompatibilitySchema.optional()\n});\nconst startSkillsReadinessSummarySchema = z.strictObject({\n\tupToDate: z.number().int().min(0),\n\toutdated: z.number().int().min(0),\n\tmissing: z.number().int().min(0),\n\texternalConflict: z.number().int().min(0)\n});\nconst startSkillsReadinessProjectionSchema = z.strictObject({\n\tstatus: startSkillsReadinessStatusSchema,\n\ttargetCount: z.number().int().min(0),\n\tsummary: startSkillsReadinessSummarySchema\n}).superRefine((value, ctx) => {\n\tif (value.summary.upToDate + value.summary.outdated + value.summary.missing + value.summary.externalConflict !== value.targetCount) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"skills readiness summary counts must add up to targetCount\",\n\t\tpath: [\"summary\"]\n\t});\n});\nconst startDeviceAgentCatalogSchema = localAgentCatalogSchema;\nconst startDeviceProjectionSchema = z.strictObject({\n\tdeviceId: START_BOUNDED_ID_SCHEMA,\n\truntimeLane: daemonServiceLaneSchema,\n\tobservedAt: START_ISO_DATE_TIME_SCHEMA,\n\tbackgroundHelper: startBackgroundHelperProjectionSchema,\n\tskillsReadiness: startSkillsReadinessProjectionSchema,\n\tdeviceAgentCatalog: startDeviceAgentCatalogSchema,\n\tdeviceReplyReadiness: startReplyReadinessSummarySchema\n});\n\n//#endregion\n//#region src/schemas/start/observation-issue.ts\nconst startObservationIssueSourceSchema = z.enum([\n\t\"reply_readiness_snapshot\",\n\t\"device_projection\",\n\t\"profile_readiness\",\n\t\"session_control\",\n\t\"session_progress\"\n]);\nconst startObservationIssueSchema = z.strictObject({\n\tsource: startObservationIssueSourceSchema,\n\tcode: START_BOUNDED_ID_SCHEMA,\n\tsummary: START_BOUNDED_LABEL_SCHEMA,\n\tdetail: z.union([START_BOUNDED_LABEL_SCHEMA, z.null()]),\n\tobservedAt: START_ISO_DATE_TIME_SCHEMA\n});\n\n//#endregion\n//#region src/schemas/start/planner.ts\nconst startPlannerStatusSchema = z.enum([\n\t\"blocking\",\n\t\"needs_attention\",\n\t\"ready\",\n\t\"follow_up\"\n]);\nconst startNextActionIdSchema = z.enum([\n\t\"start_session\",\n\t\"sign_in\",\n\t\"identity\",\n\t\"device_check\",\n\t\"local_agent_preparation\",\n\t\"space_choice\",\n\t\"space_entry\"\n]);\nconst startPlannerReasonCodeSchema = z.enum([\n\t\"session.missing\",\n\t\"session.unavailable\",\n\t\"session.stale\",\n\t\"sign_in.required\",\n\t\"identity.required\",\n\t\"device_check.pending\",\n\t\"local_agent_preparation.pending\",\n\t\"space_choice.pending\",\n\t\"space_entry.pending\",\n\t\"device_projection.missing\",\n\t\"device_projection.unavailable\",\n\t\"device_projection.stale\",\n\t\"profile_readiness.missing\",\n\t\"profile_readiness.unavailable\",\n\t\"profile_readiness.stale\",\n\t\"background_helper.not_installed\",\n\t\"background_helper.installed_outdated\",\n\t\"background_helper.update_required\",\n\t\"background_helper.not_running\",\n\t\"background_helper.stale\",\n\t\"background_helper.unknown\",\n\t\"device_reply_readiness.blocked\",\n\t\"device_reply_readiness.degraded\",\n\t\"device_reply_readiness.unknown\",\n\t\"skills_readiness.action_required\",\n\t\"skills_readiness.unknown\",\n\t\"local_agent_preparation.not_found\",\n\t\"local_agent_preparation.not_enabled\",\n\t\"local_agent_preparation.not_selectable\",\n\t\"profile_readiness.route_offline\",\n\t\"profile_readiness.route_unavailable\",\n\t\"profile_readiness.reply_blocked\",\n\t\"profile_readiness.reply_degraded\",\n\t\"profile_readiness.reply_unknown\"\n]);\nconst startPlannerSignalSchema = z.strictObject({\n\tactionId: startNextActionIdSchema,\n\treasonCode: startPlannerReasonCodeSchema,\n\tprofileId: z.union([atsProfileIdSchema, z.null()])\n});\nconst startPlannerDecisionSchema = z.strictObject({\n\tstatus: startPlannerStatusSchema,\n\tnextAction: startPlannerSignalSchema,\n\tblocking: z.array(startPlannerSignalSchema).readonly(),\n\tattention: z.array(startPlannerSignalSchema).readonly(),\n\tfollowUp: z.array(startPlannerSignalSchema).readonly()\n});\n\n//#endregion\n//#region src/schemas/start/profile-readiness-summary.ts\nconst startProfileKindSchema = z.enum([\n\t\"human\",\n\t\"agent\",\n\t\"system\"\n]);\nconst startRouteObservationStatusSchema = daemonRouteObservationStatusSchema;\nconst startRouteObservationReasonCodeSchema = daemonRouteObservationReasonCodeSchema;\nconst startRouteObservationSummarySchema = daemonRouteObservationSummarySchema;\nconst startProfileReadinessSummarySchema = z.strictObject({\n\tdeviceId: START_BOUNDED_ID_SCHEMA,\n\tprofileId: atsProfileIdSchema,\n\tprofileKind: startProfileKindSchema,\n\tobservedAt: START_ISO_DATE_TIME_SCHEMA,\n\trouteObservation: startRouteObservationSummarySchema,\n\treplyReadiness: z.union([startReplyReadinessSummarySchema, z.null()])\n}).superRefine((value, ctx) => {\n\tif (value.profileKind === \"agent\" && value.replyReadiness === null) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"agent profile readiness summary must include replyReadiness\",\n\t\tpath: [\"replyReadiness\"]\n\t});\n\tif (value.profileKind !== \"agent\" && value.replyReadiness !== null) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"human and system profile readiness summaries must use null replyReadiness\",\n\t\tpath: [\"replyReadiness\"]\n\t});\n});\n\n//#endregion\n//#region src/schemas/start/session-progress.ts\nconst startSessionProgressStatusSchema = z.enum([\n\t\"pending\",\n\t\"in_progress\",\n\t\"completed\",\n\t\"failed\",\n\t\"cancelled\"\n]);\nconst startSessionStepIdSchema = z.enum([\n\t\"sign_in\",\n\t\"identity\",\n\t\"device_check\",\n\t\"local_agent_preparation\",\n\t\"space_choice\",\n\t\"space_entry\"\n]);\nconst startSessionHandoffFailureGateSchema = z.enum([\n\t\"auth\",\n\t\"device\",\n\t\"service\",\n\t\"local_agent\",\n\t\"runtime_report\",\n\t\"binding\",\n\t\"route\"\n]);\nconst startSessionHandoffFailureRetryActionSchema = z.enum([\n\t\"rerun_prepare\",\n\t\"copy_fresh_command\",\n\t\"change_selection\",\n\t\"start_over\"\n]);\nconst startSessionHandoffFailureSchema = z.strictObject({\n\tgate: startSessionHandoffFailureGateSchema,\n\treasonCode: START_TRIMMED_NON_EMPTY_STRING_SCHEMA.max(256),\n\tlocalAgentId: z.union([START_BOUNDED_ID_SCHEMA, z.null()]).optional(),\n\tprofileId: z.union([START_BOUNDED_ID_SCHEMA, z.null()]).optional(),\n\toccurredAt: START_ISO_DATE_TIME_SCHEMA,\n\tretryAction: startSessionHandoffFailureRetryActionSchema\n});\nconst startSessionProgressSchema = z.strictObject({\n\tsessionId: START_BOUNDED_ID_SCHEMA,\n\tuserId: START_BOUNDED_ID_SCHEMA,\n\tdeviceId: z.union([START_BOUNDED_ID_SCHEMA, z.null()]),\n\tstatus: startSessionProgressStatusSchema,\n\tcurrentStepId: startSessionStepIdSchema,\n\tcompletedStepIds: z.array(startSessionStepIdSchema),\n\tprofileChoice: startProfileChoiceSchema,\n\tlocalAgentPreparation: startLocalAgentPreparationSchema,\n\tspaceMemberSelection: startSpaceMemberSelectionSchema.default({\n\t\tmode: \"unresolved\",\n\t\tselectedProfileIds: []\n\t}),\n\tspaceChoice: startSpaceChoiceSchema,\n\ttargetSpaceId: startTargetSpaceIdSchema,\n\tlastFailure: z.union([startSessionHandoffFailureSchema, z.null()]).optional(),\n\tstartedAt: START_ISO_DATE_TIME_SCHEMA,\n\tupdatedAt: START_ISO_DATE_TIME_SCHEMA,\n\tcompletedAt: START_NULLABLE_COMPLETION_TIME_SCHEMA\n}).superRefine((value, ctx) => {\n\tconst startedAtMs = toStartTimestampMs(value.startedAt);\n\tconst updatedAtMs = toStartTimestampMs(value.updatedAt);\n\tconst completedStepIds = new Set(value.completedStepIds);\n\tconst isTerminalStatus = value.status === \"completed\" || value.status === \"failed\" || value.status === \"cancelled\";\n\tif (completedStepIds.size !== value.completedStepIds.length) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"completedStepIds must not contain duplicates\",\n\t\tpath: [\"completedStepIds\"]\n\t});\n\tif (updatedAtMs < startedAtMs) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"updatedAt must not be earlier than startedAt\",\n\t\tpath: [\"updatedAt\"]\n\t});\n\tif (isTerminalStatus && value.completedAt === null) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"terminal status requires completedAt\",\n\t\tpath: [\"completedAt\"]\n\t});\n\tif (!isTerminalStatus && value.completedAt !== null) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"non-terminal status must use null completedAt\",\n\t\tpath: [\"completedAt\"]\n\t});\n\tif (value.completedAt !== null) {\n\t\tif (toStartTimestampMs(value.completedAt) < updatedAtMs) ctx.addIssue({\n\t\t\tcode: \"custom\",\n\t\t\tmessage: \"completedAt must not be earlier than updatedAt\",\n\t\t\tpath: [\"completedAt\"]\n\t\t});\n\t}\n\tif (value.spaceChoice.mode === \"unresolved\" && value.targetSpaceId !== null) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"unresolved space choice must use a null targetSpaceId\",\n\t\tpath: [\"targetSpaceId\"]\n\t});\n\tif (value.spaceChoice.mode === \"join_existing\" && value.targetSpaceId !== null && value.targetSpaceId !== value.spaceChoice.spaceId) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"join_existing space choice must use a targetSpaceId that matches spaceChoice.spaceId\",\n\t\tpath: [\"targetSpaceId\"]\n\t});\n});\n\n//#endregion\n//#region src/schemas/start/shared-state.ts\nconst startProjectionAvailabilitySchema = z.enum([\n\t\"ready\",\n\t\"missing\",\n\t\"stale\",\n\t\"unavailable\"\n]);\nfunction createStartProjectionSlotSchema(valueSchema) {\n\treturn z.union([z.strictObject({\n\t\tavailability: z.enum([\"ready\", \"stale\"]),\n\t\tobservationIssues: z.array(startObservationIssueSchema).readonly(),\n\t\tobservedAt: START_ISO_DATE_TIME_SCHEMA,\n\t\tvalue: valueSchema\n\t}), z.strictObject({\n\t\tavailability: z.enum([\"missing\", \"unavailable\"]),\n\t\tobservationIssues: z.array(startObservationIssueSchema).readonly(),\n\t\tobservedAt: z.null(),\n\t\tvalue: z.null()\n\t})]);\n}\nconst startDeviceProjectionSlotSchema = createStartProjectionSlotSchema(startDeviceProjectionSchema);\nconst startProfileReadinessProjectionSlotSchema = createStartProjectionSlotSchema(startProfileReadinessSummarySchema);\nconst startSessionProgressSlotSchema = createStartProjectionSlotSchema(startSessionProgressSchema);\nconst startProfileReadinessEntrySchema = z.strictObject({\n\tprofileId: startProfileReadinessSummarySchema.shape.profileId,\n\tprojection: startProfileReadinessProjectionSlotSchema\n});\nconst startSharedReadModelSchema = z.strictObject({\n\tdevice: startDeviceProjectionSlotSchema,\n\tprofileReadiness: z.array(startProfileReadinessEntrySchema).readonly(),\n\tsession: startSessionProgressSlotSchema\n}).superRefine((value, ctx) => {\n\tconst seen = /* @__PURE__ */ new Set();\n\tfor (const [index, entry] of value.profileReadiness.entries()) {\n\t\tif (seen.has(entry.profileId)) {\n\t\t\tctx.addIssue({\n\t\t\t\tcode: \"custom\",\n\t\t\t\tmessage: \"profileReadiness must not contain duplicate profileId values\",\n\t\t\t\tpath: [\n\t\t\t\t\t\"profileReadiness\",\n\t\t\t\t\tindex,\n\t\t\t\t\t\"profileId\"\n\t\t\t\t]\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tseen.add(entry.profileId);\n\t}\n});\nconst startSharedStateSchema = z.strictObject({\n\treadModel: startSharedReadModelSchema,\n\tdecision: startPlannerDecisionSchema\n});\n\n//#endregion\n//#region src/schemas/start/observation.ts\nconst startObservationSchema = z.strictObject({\n\tdevice: startDeviceProjectionSlotSchema,\n\tprofileReadiness: z.array(startProfileReadinessEntrySchema).readonly()\n}).superRefine((value, ctx) => {\n\tconst seenProfileIds = /* @__PURE__ */ new Set();\n\tfor (const [index, entry] of value.profileReadiness.entries()) {\n\t\tif (seenProfileIds.has(entry.profileId)) {\n\t\t\tctx.addIssue({\n\t\t\t\tcode: \"custom\",\n\t\t\t\tmessage: \"profileReadiness must not contain duplicate profileId values\",\n\t\t\t\tpath: [\n\t\t\t\t\t\"profileReadiness\",\n\t\t\t\t\tindex,\n\t\t\t\t\t\"profileId\"\n\t\t\t\t]\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tseenProfileIds.add(entry.profileId);\n\t}\n});\n\n//#endregion\n//#region src/schemas/http/start-handoff.ts\nconst resolveStartHandoffBodySchema = z.strictObject({ opaqueToken: startOpaqueTokenSchema });\nconst startHandoffProfileSchema = z.strictObject({\n\tprofileId: atsProfileIdSchema,\n\tprofileName: resolvedAtsProfileSchema.shape.profileName,\n\tprofileKind: resolvedAtsProfileSchema.shape.profileKind,\n\townerUserId: resolvedAtsProfileSchema.shape.ownerUserId\n});\nconst resolveStartHandoffResponseSchema = z.strictObject({\n\tsession: startSessionSchema,\n\tstate: startSharedStateSchema,\n\tprofile: startHandoffProfileSchema\n});\n\n//#endregion\n//#region src/schemas/http/start-session.ts\nconst startSessionRouteParamsSchema = z.strictObject({ deviceId: START_BOUNDED_ID_SCHEMA });\nconst createStartSessionBodySchema = z.strictObject({\n\tinitiator: startSessionInitiatorSchema,\n\tprofileChoice: startProfileChoiceSchema,\n\tlocalAgentPreparation: startLocalAgentPreparationSchema,\n\tspaceMemberSelection: startSpaceMemberSelectionSchema.optional(),\n\tspaceChoice: startSpaceChoiceSchema,\n\twriteMode: z.enum([\"replace\", \"if_missing\"]).optional()\n});\nconst patchStartSessionBodySchema = z.strictObject({\n\tprofileChoice: startProfileChoiceSchema.optional(),\n\tlocalAgentPreparation: startLocalAgentPreparationSchema.optional(),\n\tspaceMemberSelection: startSpaceMemberSelectionSchema.optional(),\n\tspaceChoice: startSpaceChoiceSchema.optional(),\n\ttargetSpaceId: startTargetSpaceIdSchema.optional()\n}).refine((value) => {\n\treturn value.profileChoice !== void 0 || value.localAgentPreparation !== void 0 || value.spaceMemberSelection !== void 0 || value.spaceChoice !== void 0 || value.targetSpaceId !== void 0;\n}, \"at least one start session field must be provided\");\nconst startSessionResponseSchema = z.strictObject({ session: startSessionSchema });\nconst startSessionWithTokenResponseSchema = z.strictObject({\n\tsession: startSessionSchema,\n\topaqueToken: startOpaqueTokenSchema\n});\n\n//#endregion\n//#region src/schemas/http/start-space-choice.ts\nconst startSessionSpaceChoiceCreateNewBodySchema = z.strictObject({\n\tmode: z.literal(\"create_new\"),\n\tname: spaceNameSchema,\n\tpassword: spacePasswordSchema.optional()\n});\nconst startSessionSpaceChoiceJoinExistingBodySchema = z.strictObject({\n\tmode: z.literal(\"join_existing\"),\n\tspaceId: START_BOUNDED_ID_SCHEMA,\n\tpassword: spacePasswordSchema.optional()\n});\nconst startSessionSpaceChoiceBodySchema = z.discriminatedUnion(\"mode\", [startSessionSpaceChoiceCreateNewBodySchema, startSessionSpaceChoiceJoinExistingBodySchema]);\nconst startSessionSpaceChoiceResponseSchema = z.strictObject({ session: startSessionSchema });\n\n//#endregion\n//#region src/schemas/http/waitlist.ts\nconst normalizedEmailSchema = z.string().trim().min(1, { message: \"Email is required\" }).max(320, { message: \"Email is invalid\" }).email({ message: \"Email is invalid\" }).transform((value) => value.toLowerCase());\nconst waitlistJoinStatusSchema = z.enum([\"created\", \"already_exists\"]);\nconst joinWaitlistBodySchema = z.strictObject({ email: normalizedEmailSchema });\nconst joinWaitlistResponseSchema = z.strictObject({\n\tok: z.literal(true),\n\tstatus: waitlistJoinStatusSchema\n});\nconst waitlistErrorCodeSchema = z.enum([\"waitlist.invalid_input\"]);\nconst waitlistErrorResponseSchema = z.strictObject({\n\tok: z.literal(false),\n\tcode: waitlistErrorCodeSchema,\n\tmessage: z.string().min(1)\n});\n\n//#endregion\n//#region src/schemas/local-components.ts\nconst LOCAL_COMPONENTS_SCHEMA_VERSION = 1;\nconst nonEmptyStringSchema = z.string().trim().min(1);\nconst nullableNonEmptyStringSchema = nonEmptyStringSchema.nullable();\nconst localComponentStatusSchema = z.enum([\n\t\"ok\",\n\t\"update_available\",\n\t\"update_required\"\n]);\nconst localSetupActionSchema = z.enum([\n\t\"none\",\n\t\"connect_service\",\n\t\"reconnect_service\",\n\t\"update_service\",\n\t\"connect_local_agent\",\n\t\"update_skills\",\n\t\"update_cli\"\n]);\nconst localSetupEntrypointSchema = z.literal(\"setup\");\nconst localComponentsManifestSchema = z.strictObject({\n\tschemaVersion: z.literal(LOCAL_COMPONENTS_SCHEMA_VERSION),\n\tatsReleaseVersion: nonEmptyStringSchema,\n\tcli: z.strictObject({\n\t\tpackageVersion: nonEmptyStringSchema,\n\t\tcommandContractVersion: nonEmptyStringSchema\n\t}),\n\tservice: z.strictObject({\n\t\tbundleHash: nullableNonEmptyStringSchema,\n\t\tbundleVersion: nonEmptyStringSchema,\n\t\truntimeContractEpoch: nonEmptyStringSchema,\n\t\tserviceContractVersion: nonEmptyStringSchema\n\t}),\n\tskills: z.strictObject({\n\t\tbundleHash: nullableNonEmptyStringSchema,\n\t\tskillContractVersion: nonEmptyStringSchema,\n\t\tskillIds: z.array(nonEmptyStringSchema)\n\t})\n});\nconst installedLocalComponentsSnapshotSchema = z.strictObject({\n\tschemaVersion: z.literal(LOCAL_COMPONENTS_SCHEMA_VERSION),\n\tinstalledAt: z.iso.datetime({ offset: true }),\n\tsource: z.enum([\n\t\t\"setup\",\n\t\t\"repair\",\n\t\t\"manual\"\n\t]),\n\tmanifest: localComponentsManifestSchema\n});\nconst localComponentProjectionSchema = z.strictObject({\n\treasonCodes: z.array(nonEmptyStringSchema),\n\tstatus: localComponentStatusSchema\n});\nconst localCliComponentProjectionSchema = localComponentProjectionSchema.extend({\n\tcommandContractVersion: nonEmptyStringSchema,\n\tlatestPackageVersion: nullableNonEmptyStringSchema,\n\tpackageVersion: nonEmptyStringSchema,\n\trequiredCommandContractVersion: nullableNonEmptyStringSchema\n});\nconst localServiceComponentProjectionSchema = localComponentProjectionSchema.extend({\n\texpectedBundleHash: nullableNonEmptyStringSchema,\n\texpectedBundleVersion: nonEmptyStringSchema,\n\tinstalledBundleHash: nullableNonEmptyStringSchema,\n\tinstalledBundleVersion: nullableNonEmptyStringSchema,\n\truntimeContractEpoch: nonEmptyStringSchema,\n\tserviceContractVersion: nonEmptyStringSchema\n});\nconst localSkillsComponentProjectionSchema = localComponentProjectionSchema.extend({\n\texpectedBundleHash: nullableNonEmptyStringSchema,\n\tinstalledBundleHash: nullableNonEmptyStringSchema,\n\tskillContractVersion: nonEmptyStringSchema,\n\ttargetCount: z.number().int().nonnegative()\n});\nconst localComponentsStatusSchema = z.strictObject({\n\tschemaVersion: z.literal(LOCAL_COMPONENTS_SCHEMA_VERSION),\n\tgeneratedAt: z.iso.datetime({ offset: true }),\n\tentrypoint: localSetupEntrypointSchema,\n\tsummaryLabel: nonEmptyStringSchema,\n\tsummaryDescription: nonEmptyStringSchema,\n\tsetupAction: localSetupActionSchema,\n\tsetupActionLabel: nonEmptyStringSchema,\n\tsetupActionDescription: nonEmptyStringSchema,\n\tcli: localCliComponentProjectionSchema,\n\tservice: localServiceComponentProjectionSchema,\n\tskills: localSkillsComponentProjectionSchema\n});\nfunction formatLocalSetupActionLabel(action) {\n\tswitch (action) {\n\t\tcase \"connect_service\": return \"Connect ATS Service\";\n\t\tcase \"reconnect_service\": return \"Reconnect ATS Service\";\n\t\tcase \"update_service\": return \"Update ATS Service\";\n\t\tcase \"connect_local_agent\": return \"Connect local agent\";\n\t\tcase \"update_skills\": return \"Update ATS skills\";\n\t\tcase \"update_cli\": return \"Update ATS CLI\";\n\t\tcase \"none\": return \"Everything is up to date\";\n\t\tdefault: return action;\n\t}\n}\nfunction formatLocalComponentsSummaryLabel(input) {\n\tif (input.setupAction !== \"none\") return formatLocalSetupActionLabel(input.setupAction);\n\tswitch (input.cliStatus) {\n\t\tcase \"update_required\": return \"Update ATS CLI\";\n\t\tcase \"update_available\": return \"ATS CLI update available\";\n\t\tcase \"ok\": return \"Everything is up to date\";\n\t\tdefault: return input.cliStatus;\n\t}\n}\nfunction formatLocalComponentsSummaryDescription(input) {\n\tif (input.setupAction !== \"none\") return formatLocalSetupActionDescription(input.setupAction);\n\tswitch (input.cliStatus) {\n\t\tcase \"update_required\": return \"Update ATS CLI before running this setup flow.\";\n\t\tcase \"update_available\": return \"ATS CLI can be updated, but this setup flow can continue.\";\n\t\tcase \"ok\": return \"ATS local components are aligned for this computer.\";\n\t\tdefault: return input.cliStatus;\n\t}\n}\nfunction formatLocalSetupActionDescription(action) {\n\tswitch (action) {\n\t\tcase \"connect_service\": return \"Connect this computer to ATS so local agents can reply in Spaces.\";\n\t\tcase \"reconnect_service\": return \"Reconnect ATS Service for the current ATS account on this computer.\";\n\t\tcase \"update_service\": return \"Update ATS Service before this computer receives local Wake work.\";\n\t\tcase \"connect_local_agent\": return \"Connect this Agent Profile to a local agent runtime on this computer.\";\n\t\tcase \"update_skills\": return \"Update ATS skills so local agents follow the current ATS instructions.\";\n\t\tcase \"update_cli\": return \"Update ATS CLI before running this setup flow.\";\n\t\tcase \"none\": return \"ATS local components are aligned for this computer.\";\n\t\tdefault: return action;\n\t}\n}\n\n//#endregion\n//#region src/schemas/prepare/session.ts\nconst PREPARE_BOUNDED_ID_SCHEMA = z.string().trim().min(1).max(256);\nconst PREPARE_REASON_CODE_SCHEMA = z.string().trim().min(1).max(256);\nconst PREPARE_USER_MESSAGE_SCHEMA = z.string().trim().min(1).max(512);\nconst PREPARE_ISO_DATE_TIME_SCHEMA = z.iso.datetime({ offset: true });\nconst PREPARE_NULLABLE_DATE_TIME_SCHEMA = z.union([PREPARE_ISO_DATE_TIME_SCHEMA, z.null()]);\nconst prepareOpaqueTokenSchema = z.string().trim().min(1).max(2048);\nconst prepareSessionLifecycleStatusSchema = z.enum([\n\t\"active\",\n\t\"completed\",\n\t\"failed\",\n\t\"cancelled\",\n\t\"expired\"\n]);\nconst prepareSessionPhaseSchema = z.enum([\n\t\"waiting_for_terminal\",\n\t\"terminal_connected\",\n\t\"checking_computer\",\n\t\"waiting_for_agent_selection\",\n\t\"preparing_local_agents\",\n\t\"starting_service\",\n\t\"reporting_runtime\",\n\t\"verifying_readiness\",\n\t\"ready\",\n\t\"blocked\",\n\t\"terminal_disconnected\",\n\t\"failed\",\n\t\"expired\"\n]);\nconst prepareStepIdSchema = z.enum([\n\t\"computer\",\n\t\"connect_terminal\",\n\t\"choose_local_agents\",\n\t\"prepare_selected_agents\",\n\t\"refresh_service\",\n\t\"report_runtime\",\n\t\"verify_setup\",\n\t\"ready\"\n]);\nconst prepareStepStateSchema = z.enum([\n\t\"pending\",\n\t\"active\",\n\t\"waiting_for_user\",\n\t\"complete\",\n\t\"blocked\",\n\t\"terminal_disconnected\"\n]);\nconst prepareStepSchema = z.strictObject({\n\tid: prepareStepIdSchema,\n\tstate: prepareStepStateSchema,\n\ttitle: PREPARE_USER_MESSAGE_SCHEMA,\n\tsummary: z.union([PREPARE_USER_MESSAGE_SCHEMA, z.null()]),\n\tblockerReasonCode: z.union([PREPARE_REASON_CODE_SCHEMA, z.null()]),\n\tstartedAt: PREPARE_NULLABLE_DATE_TIME_SCHEMA,\n\tcompletedAt: PREPARE_NULLABLE_DATE_TIME_SCHEMA,\n\tupdatedAt: PREPARE_ISO_DATE_TIME_SCHEMA\n}).superRefine((value, ctx) => {\n\tif (value.state === \"blocked\" && value.blockerReasonCode === null) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"blocked prepare steps must include blockerReasonCode\",\n\t\tpath: [\"blockerReasonCode\"]\n\t});\n\tif (value.state !== \"blocked\" && value.blockerReasonCode !== null) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"non-blocked prepare steps must use a null blockerReasonCode\",\n\t\tpath: [\"blockerReasonCode\"]\n\t});\n\tif (value.state === \"complete\" && value.completedAt === null) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"complete prepare steps must include completedAt\",\n\t\tpath: [\"completedAt\"]\n\t});\n});\nconst prepareTerminalConnectionStatusSchema = z.enum([\n\t\"never_connected\",\n\t\"connected\",\n\t\"disconnected\",\n\t\"replaced\"\n]);\nconst prepareTerminalConnectionSchema = z.strictObject({\n\tstatus: prepareTerminalConnectionStatusSchema,\n\tconnectionId: z.union([PREPARE_BOUNDED_ID_SCHEMA, z.null()]),\n\tconnectionEpoch: z.union([z.int().positive(), z.null()]),\n\tconnectedAt: PREPARE_NULLABLE_DATE_TIME_SCHEMA,\n\tlastSeenAt: PREPARE_NULLABLE_DATE_TIME_SCHEMA,\n\tdisconnectedAt: PREPARE_NULLABLE_DATE_TIME_SCHEMA,\n\tdisconnectReason: z.union([PREPARE_REASON_CODE_SCHEMA, z.null()])\n}).superRefine((value, ctx) => {\n\tif (value.status === \"connected\") {\n\t\tif (value.connectionId === null) ctx.addIssue({\n\t\t\tcode: \"custom\",\n\t\t\tmessage: \"connected terminal must include connectionId\",\n\t\t\tpath: [\"connectionId\"]\n\t\t});\n\t\tif (value.connectionEpoch === null) ctx.addIssue({\n\t\t\tcode: \"custom\",\n\t\t\tmessage: \"connected terminal must include connectionEpoch\",\n\t\t\tpath: [\"connectionEpoch\"]\n\t\t});\n\t\tif (value.connectedAt === null) ctx.addIssue({\n\t\t\tcode: \"custom\",\n\t\t\tmessage: \"connected terminal must include connectedAt\",\n\t\t\tpath: [\"connectedAt\"]\n\t\t});\n\t}\n});\nconst prepareBlockerSeveritySchema = z.enum([\"user_action_required\", \"system_blocked\"]);\nconst prepareBlockerRetryActionSchema = z.enum([\n\t\"run_prepare_command\",\n\t\"copy_fresh_command\",\n\t\"choose_agents\",\n\t\"refresh\",\n\t\"contact_support\"\n]);\nconst prepareBlockerSchema = z.strictObject({\n\tblockerId: PREPARE_BOUNDED_ID_SCHEMA,\n\tstepId: prepareStepIdSchema,\n\treasonCode: PREPARE_REASON_CODE_SCHEMA,\n\tmessage: PREPARE_USER_MESSAGE_SCHEMA,\n\tseverity: prepareBlockerSeveritySchema,\n\tretryAction: prepareBlockerRetryActionSchema,\n\tcreatedAt: PREPARE_ISO_DATE_TIME_SCHEMA\n});\nconst prepareLocalAgentIdsSchema = z.array(PREPARE_BOUNDED_ID_SCHEMA).superRefine((value, ctx) => {\n\tif (new Set(value).size !== value.length) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"localAgentIds must not contain duplicates\"\n\t});\n});\nconst prepareLocalAgentCatalogSchema = localAgentCatalogSchema;\nconst prepareLocalReadinessSnapshotSchema = z.strictObject({\n\tobservedAt: PREPARE_ISO_DATE_TIME_SCHEMA,\n\tservice: startBackgroundHelperProjectionSchema,\n\tskills: startSkillsReadinessProjectionSchema\n});\nconst prepareSessionSnapshotSchema = z.strictObject({\n\tprepareSessionId: PREPARE_BOUNDED_ID_SCHEMA,\n\townerUserId: PREPARE_BOUNDED_ID_SCHEMA,\n\thumanProfileId: z.union([atsProfileIdSchema, z.null()]),\n\tdeviceId: z.union([PREPARE_BOUNDED_ID_SCHEMA, z.null()]),\n\truntimeLane: z.union([PREPARE_BOUNDED_ID_SCHEMA, z.null()]),\n\ttargetSpaceId: z.union([PREPARE_BOUNDED_ID_SCHEMA, z.null()]),\n\tsessionRevision: z.int().nonnegative(),\n\tlifecycleStatus: prepareSessionLifecycleStatusSchema,\n\tphase: prepareSessionPhaseSchema,\n\tsteps: z.array(prepareStepSchema),\n\tlocalAgentCatalog: z.union([prepareLocalAgentCatalogSchema, z.null()]).default(null),\n\tlocalReadinessSnapshot: z.union([prepareLocalReadinessSnapshotSchema, z.null()]).default(null),\n\tselectedLocalAgentIds: prepareLocalAgentIdsSchema,\n\tterminalConnection: prepareTerminalConnectionSchema,\n\tblockers: z.array(prepareBlockerSchema),\n\tdiagnosticCorrelationId: PREPARE_BOUNDED_ID_SCHEMA,\n\tcreatedAt: PREPARE_ISO_DATE_TIME_SCHEMA,\n\tupdatedAt: PREPARE_ISO_DATE_TIME_SCHEMA,\n\tcompletedAt: PREPARE_NULLABLE_DATE_TIME_SCHEMA,\n\texpiresAt: PREPARE_ISO_DATE_TIME_SCHEMA\n}).superRefine((value, ctx) => {\n\tconst terminalLifecycle = value.lifecycleStatus === \"completed\" || value.lifecycleStatus === \"failed\" || value.lifecycleStatus === \"cancelled\" || value.lifecycleStatus === \"expired\";\n\tif (terminalLifecycle && value.completedAt === null) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"terminal prepare sessions must include completedAt\",\n\t\tpath: [\"completedAt\"]\n\t});\n\tif (!terminalLifecycle && value.completedAt !== null) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"active prepare sessions must use a null completedAt\",\n\t\tpath: [\"completedAt\"]\n\t});\n\tif (value.phase === \"blocked\" && value.blockers.length === 0) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"blocked prepare sessions must include at least one blocker\",\n\t\tpath: [\"blockers\"]\n\t});\n});\nconst prepareSessionEventTypeSchema = z.enum([\n\t\"session.created\",\n\t\"session.snapshot_updated\",\n\t\"session.completed\",\n\t\"session.failed\",\n\t\"session.cancelled\",\n\t\"session.expired\",\n\t\"token.minted\",\n\t\"token.revoked\",\n\t\"terminal.connected\",\n\t\"terminal.disconnected\",\n\t\"terminal.connection_replaced\",\n\t\"terminal.local_agent_catalog_reported\",\n\t\"terminal.agent_selection_saved\",\n\t\"terminal.step_started\",\n\t\"terminal.step_completed\",\n\t\"terminal.step_failed\",\n\t\"web.agent_selection_saved\",\n\t\"blocker.added\",\n\t\"blocker.cleared\"\n]);\nconst prepareSessionEventActorSchema = z.enum([\n\t\"web\",\n\t\"terminal\",\n\t\"system\"\n]);\nconst prepareSessionEventSchema = z.strictObject({\n\teventId: PREPARE_BOUNDED_ID_SCHEMA,\n\tprepareSessionId: PREPARE_BOUNDED_ID_SCHEMA,\n\tsessionRevision: z.int().nonnegative(),\n\teventType: prepareSessionEventTypeSchema,\n\tactor: prepareSessionEventActorSchema,\n\tstepId: z.union([prepareStepIdSchema, z.null()]),\n\tconnectionEpoch: z.union([z.int().positive(), z.null()]),\n\treasonCode: z.union([PREPARE_REASON_CODE_SCHEMA, z.null()]),\n\tmessage: z.union([PREPARE_USER_MESSAGE_SCHEMA, z.null()]),\n\tlocalAgentIds: prepareLocalAgentIdsSchema,\n\tcreatedAt: PREPARE_ISO_DATE_TIME_SCHEMA\n});\nconst createPrepareSessionRequestSchema = z.strictObject({\n\thumanProfileId: z.union([atsProfileIdSchema, z.null()]).optional(),\n\tdeviceId: z.union([PREPARE_BOUNDED_ID_SCHEMA, z.null()]).optional(),\n\truntimeLane: z.union([PREPARE_BOUNDED_ID_SCHEMA, z.null()]).optional(),\n\ttargetSpaceId: z.union([PREPARE_BOUNDED_ID_SCHEMA, z.null()]).optional(),\n\tselectedLocalAgentIds: prepareLocalAgentIdsSchema.optional()\n});\nconst prepareSessionWithTokenResponseSchema = z.strictObject({\n\tsnapshot: prepareSessionSnapshotSchema,\n\topaqueToken: prepareOpaqueTokenSchema,\n\topaqueTokenExpiresAt: PREPARE_ISO_DATE_TIME_SCHEMA\n});\nconst createPrepareSessionResponseSchema = prepareSessionWithTokenResponseSchema;\nconst prepareSessionResponseSchema = z.strictObject({ snapshot: prepareSessionSnapshotSchema });\nconst terminalStepWriteStatusSchema = z.enum([\n\t\"started\",\n\t\"completed\",\n\t\"failed\"\n]);\nconst terminalStepWriteSchema = z.strictObject({\n\tprepareSessionId: PREPARE_BOUNDED_ID_SCHEMA,\n\tconnectionEpoch: z.int().positive(),\n\texpectedRevision: z.int().nonnegative(),\n\tdeviceId: z.union([PREPARE_BOUNDED_ID_SCHEMA, z.null()]).optional(),\n\truntimeLane: z.union([PREPARE_BOUNDED_ID_SCHEMA, z.null()]).optional(),\n\tstepAttemptId: PREPARE_BOUNDED_ID_SCHEMA,\n\tstepId: prepareStepIdSchema,\n\tstatus: terminalStepWriteStatusSchema,\n\tlocalReadinessSnapshot: z.union([prepareLocalReadinessSnapshotSchema, z.null()]).optional(),\n\treasonCode: z.union([PREPARE_REASON_CODE_SCHEMA, z.null()]).optional(),\n\tmessage: z.union([PREPARE_USER_MESSAGE_SCHEMA, z.null()]).optional()\n});\nconst terminalLocalAgentCatalogWriteSchema = z.strictObject({\n\tprepareSessionId: PREPARE_BOUNDED_ID_SCHEMA,\n\tconnectionEpoch: z.int().positive(),\n\tlocalAgentCatalog: prepareLocalAgentCatalogSchema\n});\nconst terminalAgentSelectionWriteSchema = z.strictObject({\n\tprepareSessionId: PREPARE_BOUNDED_ID_SCHEMA,\n\tconnectionEpoch: z.int().positive(),\n\texpectedRevision: z.int().nonnegative(),\n\tlocalAgentIds: prepareLocalAgentIdsSchema\n});\nconst webAgentSelectionWriteSchema = z.strictObject({\n\tprepareSessionId: PREPARE_BOUNDED_ID_SCHEMA,\n\texpectedRevision: z.int().nonnegative(),\n\tlocalAgentIds: prepareLocalAgentIdsSchema\n});\nconst prepareDiagnosticResponseSchema = z.strictObject({\n\tsnapshot: prepareSessionSnapshotSchema,\n\tevents: z.array(prepareSessionEventSchema)\n});\nconst prepareSessionStreamRoleSchema = z.enum([\"web\", \"terminal\"]);\nconst prepareSessionStreamClientFrameSchema = z.discriminatedUnion(\"type\", [\n\tz.strictObject({\n\t\ttype: z.literal(\"client.ping\"),\n\t\tpayload: z.strictObject({ sentAt: PREPARE_ISO_DATE_TIME_SCHEMA })\n\t}),\n\tz.strictObject({\n\t\ttype: z.literal(\"terminal.step.write\"),\n\t\tpayload: terminalStepWriteSchema\n\t}),\n\tz.strictObject({\n\t\ttype: z.literal(\"terminal.local_agent_catalog.write\"),\n\t\tpayload: terminalLocalAgentCatalogWriteSchema\n\t}),\n\tz.strictObject({\n\t\ttype: z.literal(\"terminal.agent_selection.write\"),\n\t\tpayload: terminalAgentSelectionWriteSchema\n\t}),\n\tz.strictObject({\n\t\ttype: z.literal(\"web.agent_selection.write\"),\n\t\tpayload: webAgentSelectionWriteSchema\n\t})\n]);\nconst prepareSessionStreamServerFrameSchema = z.discriminatedUnion(\"type\", [\n\tz.strictObject({\n\t\ttype: z.literal(\"server.pong\"),\n\t\tpayload: z.strictObject({ sentAt: PREPARE_ISO_DATE_TIME_SCHEMA })\n\t}),\n\tz.strictObject({\n\t\ttype: z.literal(\"snapshot\"),\n\t\tpayload: z.strictObject({ snapshot: prepareSessionSnapshotSchema })\n\t}),\n\tz.strictObject({\n\t\ttype: z.literal(\"snapshot_changed\"),\n\t\tpayload: z.strictObject({ snapshot: prepareSessionSnapshotSchema })\n\t}),\n\tz.strictObject({\n\t\ttype: z.literal(\"terminal.replaced\"),\n\t\tpayload: z.strictObject({\n\t\t\treasonCode: PREPARE_REASON_CODE_SCHEMA,\n\t\t\tmessage: PREPARE_USER_MESSAGE_SCHEMA\n\t\t})\n\t}),\n\tz.strictObject({\n\t\ttype: z.literal(\"server.error\"),\n\t\tpayload: z.strictObject({\n\t\t\tcode: PREPARE_REASON_CODE_SCHEMA,\n\t\t\tmessage: PREPARE_USER_MESSAGE_SCHEMA\n\t\t})\n\t})\n]);\n\n//#endregion\n//#region src/schemas/space-mesh/continuity.ts\nconst continuitySchema = z.strictObject({\n\tmessagesSinceThen: z.number().int().finite().min(0),\n\thigherAuthorityUpdates: z.boolean()\n});\n\n//#endregion\n//#region src/schemas/space-mesh/dispatch-brief.ts\nconst briefLineSchema$1 = z.preprocess(trimmedStringFromUnknown, z.string().min(1));\nconst dispatchBriefSchema = z.strictObject({\n\tactivatedBy: briefLineSchema$1,\n\tsourceMessage: briefLineSchema$1,\n\treplyTarget: briefLineSchema$1,\n\tcontinuity: continuitySchema,\n\twhatYouCanDoNow: briefLineSchema$1\n});\n\n//#endregion\n//#region src/schemas/space-mesh/entry-brief.ts\nconst briefLineSchema = z.preprocess(trimmedStringFromUnknown, z.string().min(1));\nconst entryBriefSchema = z.strictObject({\n\twhatThisRoomIs: briefLineSchema,\n\tyouAre: briefLineSchema,\n\tthisRoomIsFor: briefLineSchema,\n\thowThisRoomWorks: briefLineSchema,\n\tifUnsure: briefLineSchema\n});\n\n//#endregion\nexport { startSessionSpaceChoiceBodySchema as $, currentDeviceTargetDeviceIdSchema as $a, agentExecutionReadinessPrimaryActionPlanSchema as $c, OBSERVABILITY_WAKE_CORRELATION_MODEL_VERSION as $i, spaceDispatchTraceDispatchExecutionSchema as $n, buildRuntimeCoordinatorFinalizationCommandId as $o, spaceConversationBindingDeleteResponseSchema as $r, atsdInterruptRequestPayloadSchema as $s, getSpaceUpdatesInputSchema as $t, terminalStepWriteSchema as A, setLocalRuntimeDisplayNameBodySchema as Aa, dualViewGuideInputSchema as Ac, resolveProfileResponseSchema as Ai, agentExecutionReadinessImpactScopeSchema as Al, serverErrorFrameSchema as An, DB_FACT_SCHEMA_VERSION as Ao, spaceDiagnosticReportReasonCodeSchema as Ar, atsdClearImportedUpstreamConversationLocalStateResponseSchema as As, startPlannerReasonCodeSchema as At, localComponentProjectionSchema as B, startProfileChoiceModeSchema as Ba, resolvedSpaceMemberProfileSchema as Bc, upsertProfileSpaceHistoryResponseSchema as Bi, isExplicitBuiltinControllerRef as Bl, postSpaceDispatchOutboxRedriveBodySchema as Bn, dbFactTargetSchema as Bo, normalizeSpaceCursorPatch as Br, atsdConversationExecutionRuntimeWorkspaceMissingSchema as Bs, getSpaceWakeTraceWaterfallInputSchema as Bt, prepareSessionWithTokenResponseSchema as C, localRuntimePlatformFamilySchema as Ca, spaceConversationUpstreamConversationBindingPresentSchema as Cc, authProfileViewSchema as Ci, AGENT_EXECUTION_READINESS_IMPACT_SOURCES as Cl, incomingServerMessageSchema as Cn, agentProfileBindingStateSchema as Co, spaceDispatchTraceRuntimeCoordinatorHeadLifecycleSchema as Cr, ATSD_CONTROL_PLANE_SCHEMA_VERSION as Cs, startSessionProgressStatusSchema as Ct, prepareTerminalConnectionSchema as D, localRuntimesConnectionIdentityAdoptionSchema as Da, commonErrorSchema as Dc, createHumanProfileResponseSchema as Di, agentExecutionReadinessImpactEffectSchema as Dl, signalSystemNoticeEnvelopeSchema as Dn, getAgentProfilePrimaryBindingResponseSchema as Do, createSpaceDiagnosticReportResponseSchema as Dr, atsdCancelResponseSchema as Ds, startRouteObservationStatusSchema as Dt, prepareStepStateSchema as E, localRuntimeReplyReadinessStatusSchema as Ea, spaceRouteParamsSchema as Ec, createHumanProfileBodySchema as Ei, agentExecutionReadinessImpactClearingTriggerSchema as El, signalStatusEnvelopeSchema as En, ensureAgentProfilePrimaryBindingResponseSchema as Eo, createSpaceDiagnosticReportBodySchema as Er, atsdCancelRequestPayloadSchema as Es, startRouteObservationReasonCodeSchema as Et, formatLocalComponentsSummaryLabel as F, localAgentCatalogTargetKindSchema as Fa, postResolvedSpaceMembersBodySchema as Fc, patchProfileSpaceHistoryStatusResponseSchema as Fi, resolveAgentExecutionReadinessImpactTaxonomyEntry as Fl, dispatchResultKindSchema as Fn, dbFactPhaseSchema as Fo, querySpaceDeletionTombstonesResponseSchema as Fr, atsdControlPlaneResponseSchema as Fs, startDeviceAgentCatalogSchema as Ft, localSetupActionSchema as G, startSessionSchema as Ga, spaceMemberHumanSnapshotSchema as Gc, observabilityCloudflareRuntimeEventSchema as Gi, providerConversationDiscoverCapabilitySchema as Gl, spaceDispatchLookupMatchSchema as Gn, dbInspectionSummarySchema as Go, getSpaceMetaResponseSchema as Gr, atsdConversationExecutionStatusResponseSchema as Gs, wakeTraceWaterfallStepNameSchema as Gt, localComponentsManifestSchema as H, startSelectedSpaceMemberProfileIdsSchema as Ha, spaceMemberAgentPublicReplyPresenceSchema as Hc, OBSERVABILITY_CLOUDFLARE_ANALYTICS_DOUBLES as Hi, normalizeBuiltinControllerProviderId as Hl, spaceDispatchOutboxRedriveReasonSchema as Hn, dbInspectionCheckStatusSchema as Ho, patchCursorStringSchema as Hr, atsdConversationExecutionRuntimeWorkspaceSchema as Hs, wakeTraceWaterfallFactSourceSchema as Ht, formatLocalSetupActionDescription as I, startLocalAgentIdsSchema as Ia, postSpaceMembersBodySchema as Ic, profileSpaceCreatorKindSchema as Ii, areBuiltinControllerRefsEquivalent as Il, dispatchResultPublicOutcomeSchema as In, dbFactResultSchema as Io, spaceDeletionTombstoneRecordSchema as Ir, atsdControlTargetSelectorSchema as Is, startDeviceAgentSelectableReasonSchema as It, joinWaitlistBodySchema as J, startSpaceMemberSelectionModeSchema as Ja, spaceMemberStatusSchema as Jc, observabilityRuntimeEvidenceStatusSchema as Ji, providerConversationTurnOverrideCapabilitySchema as Jl, projectSpaceDispatchTraceFinalVisibleOutcome as Jn, daemonBootstrapRecommendationResultSchema as Jo, spaceCreatorSchema as Jr, atsdHealthStateSchema as Js, wakeTraceWaterfallSummaryStatusSchema as Jt, localSetupEntrypointSchema as K, startSpaceChoiceModeSchema as Ka, spaceMemberKindSchema as Kc, observabilityCloudflareRuntimeKindSchema as Ki, providerConversationExternalImportCapabilitySchema as Kl, SPACE_DISPATCH_TRACE_PROMPT_PREVIEW_MAX_CHARS as Kn, daemonBootstrapAutoInstallModeSchema as Ko, patchSpaceMetaBodySchema as Kr, atsdHealthPayloadSchema as Ks, wakeTraceWaterfallStepSchema as Kt, formatLocalSetupActionLabel as L, startLocalAgentPreparationModeSchema as La, postSpaceMembersResponseSchema as Lc, profileSpaceHistoryRecordSchema as Li, buildControllerRoutingKeyForKind as Ll, dispatchResultSchema as Ln, dbFactSnapshotSchema as Lo, upsertSpaceDeletionTombstoneBodySchema as Lr, atsdConversationExecutionControllerKindSchema as Ls, startDeviceProjectionSchema as Lt, webAgentSelectionWriteSchema as M, localAgentCatalogLaunchStatusSchema as Ma, structuredGuidePayloadSchema as Mc, listProfileSpaceHistoryQuerySchema as Mi, isAgentExecutionReadinessImpactReasonCode as Ml, helloSchema as Mn, dbDebtRegistryItemSchema as Mo, spaceDiagnosticReportWakePointerDerivationStatusSchema as Mr, atsdControlPlaneErrorPayloadSchema as Ms, startPlannerStatusSchema as Mt, LOCAL_COMPONENTS_SCHEMA_VERSION as N, localAgentCatalogSchema as Na, spaceMembersEventSchema as Nc, listProfileSpaceHistoryResponseSchema as Ni, isKnownFinalFailureReasonCodeWithoutReadinessImpact as Nl, getSpaceDispatchResultInputSchema as Nn, dbDiagnosticsPayloadSchema as No, spaceDiagnosticReportWakePointerSchema as Nr, atsdControlPlaneErrorResponseSchema as Ns, startBackgroundHelperInstallStatusSchema as Nt, prepareTerminalConnectionStatusSchema as O, localRuntimesQuerySchema as Oa, errorResponseSchema as Oc, deleteProfileResponseSchema as Oi, agentExecutionReadinessImpactKindSchema as Ol, signalTextEnvelopeSchema as On, notifyAgentProfileRouteCatalogChangedBodySchema as Oo, createSpaceDiagnosticReportRouteParamsSchema as Or, atsdClearImportedUpstreamConversationLocalStatePayloadSchema as Os, startNextActionIdSchema as Ot, formatLocalComponentsSummaryDescription as P, localAgentCatalogSelectableReasonSchema as Pa, leaveSpaceResponseSchema as Pc, patchProfileSpaceHistoryStatusBodySchema as Pi, resolveAgentExecutionReadinessImpactReasonCode as Pl, getSpaceDispatchResultResponseSchema as Pn, dbFactModeSchema as Po, querySpaceDeletionTombstonesBodySchema as Pr, atsdControlPlaneRequestSchema as Ps, startBackgroundHelperRuntimeStatusSchema as Pt, waitlistJoinStatusSchema as Q, currentDeviceTargetActivationSourceSchema as Qa, spaceViewerMembershipResponseSchema as Qc, shouldLogObservabilityCloudflareRuntimeEvent as Qi, spaceDispatchTraceClaimLeaseSchema as Qn, RUNTIME_COORDINATOR_FINALIZATION_COMMAND_MODEL_VERSION as Qo, spaceConversationBindingConflictResponseSchema as Qr, atsdInterruptPayloadSchema as Qs, wakeProgressPhaseSchema as Qt, installedLocalComponentsSnapshotSchema as R, startLocalAgentPreparationSchema as Ra, removeSpaceMembersBodySchema as Rc, profileSpaceHistoryStatusSchema as Ri, canonicalizeBuiltinControllerRef as Rl, MAX_SPACE_NAME_LENGTH as Rn, dbFactSourceSchema as Ro, upsertSpaceDeletionTombstoneResponseSchema as Rr, atsdConversationExecutionControllerLaunchStatusSchema as Rs, startSkillsReadinessStatusSchema as Rt, prepareSessionStreamServerFrameSchema as S, localRuntimeExecutionTargetStatusSchema as Sa, spaceConversationUpstreamConversationBindingMissingSchema as Sc, authProfileStatusSchema as Si, AGENT_EXECUTION_READINESS_IMPACT_SCOPES as Sl, validateSpaceSignalClientMessageIdPolicy as Sn, agentProfileBindingRuntimeIdSchema as So, spaceDispatchTraceRuntimeCoordinatorExecutionSchema as Sr, dispatchStorageReadinessSchema as Ss, startSessionProgressSchema as St, prepareStepSchema as T, localRuntimeReplyReadinessPrimaryBlockerSchema as Ta, spaceConversationWakeReadinessSchema as Tc, createAgentProfileResponseSchema as Ti, KNOWN_FINAL_FAILURE_REASON_CODES_WITHOUT_READINESS_IMPACT as Tl, signalEnvelopeSchema as Tn, ensureAgentProfilePrimaryBindingBodySchema as To, spaceDispatchTraceStreamingSchema as Tr, atsdCancelPayloadSchema as Ts, startProfileReadinessSummarySchema as Tt, localComponentsStatusSchema as U, startSessionInitiatorSchema as Ua, spaceMemberAgentSnapshotSchema as Uc, OBSERVABILITY_CLOUDFLARE_RUNTIME_EVENT_MODEL_VERSION as Ui, BUILTIN_PROVIDER_CONVERSATION_CAPABILITY_BY_PROVIDER as Ul, getSpaceDispatchLookupInputSchema as Un, dbInspectionModeSchema as Uo, patchSpaceCursorBodySchema as Ur, atsdConversationExecutionStatusPayloadSchema as Us, wakeTraceWaterfallItemSchema as Ut, localComponentStatusSchema as V, startProfileChoiceSchema as Va, spaceMemberAgentExecutionReadinessSchema as Vc, OBSERVABILITY_CLOUDFLARE_ANALYTICS_BLOBS as Vi, normalizeBuiltinControllerAgentId as Vl, postSpaceDispatchOutboxRedriveResponseSchema as Vn, dbInspectionCheckSchema as Vo, patchCursorLastSeenTsSchema as Vr, atsdConversationExecutionRuntimeWorkspaceReadySchema as Vs, getSpaceWakeTraceWaterfallResponseSchema as Vt, localServiceComponentProjectionSchema as W, startSessionLifecycleStatusSchema as Wa, spaceMemberAgentViewerLocalControlSchema as Wc, observabilityCloudflareAnalyticsDataPointSchema as Wi, providerConversationCapabilitySchema as Wl, getSpaceDispatchLookupResponseSchema as Wn, dbInspectionResultSchema as Wo, createSpaceResponseSchema as Wr, atsdConversationExecutionStatusRequestPayloadSchema as Ws, wakeTraceWaterfallStepIdsSchema as Wt, waitlistErrorCodeSchema as X, startTargetSpaceIdSchema as Xa, spaceMembersSummarySchema as Xc, projectObservabilityCloudflareRuntimeConsoleEvent as Xi, resolveSpaceDispatchTraceRootCause as Xn, daemonRuntimeLeaseModeSchema as Xo, spaceStorageUsageSchema as Xr, atsdHistoryPayloadSchema as Xs, getSpaceWakeProgressResponseSchema as Xt, joinWaitlistResponseSchema as Y, startSpaceMemberSelectionSchema as Ya, spaceMembersSnapshotSchema as Yc, projectObservabilityCloudflareAnalyticsDataPoint as Yi, resolveBuiltinProviderConversationCapability as Yl, projectSpaceDispatchTraceRootCause as Yn, DAEMON_RUNTIME_LEASE_SCHEMA_VERSION as Yo, spaceMetaSchema as Yr, atsdHistoryEntrySchema as Ys, getSpaceWakeProgressInputSchema as Yt, waitlistErrorResponseSchema as Z, daemonRouteObservationResponseSchema as Za, spaceViewerMembershipProfileSchema as Zc, projectObservabilityCloudflareRuntimeEvent as Zi, spaceDispatchTraceAttemptStatusSchema as Zn, daemonRuntimeLeaseSchema as Zo, createSpaceBodySchema as Zr, atsdHistoryResponseSchema as Zs, wakeProgressItemSchema as Zt, prepareSessionPhaseSchema as _, localRuntimeComputerSchema as _a, spaceConversationLiveResumeCheckSchema as _c, submitRuntimeCapabilityReportsBodySchema as _i, AGENT_EXECUTION_READINESS_IMPACT_EFFECTS as _l, SPACE_WAKE_CLIENT_MESSAGE_ID_REQUIRED_MESSAGE as _n, agentProfileBindingDispatchEligibilitySchema as _o, spaceDispatchTraceResultInboxPublishStateSchema as _r, resolvedAtsProfileSchema as _s, startSharedReadModelSchema as _t, createPrepareSessionResponseSchema as a, normalizeListSignalsReadQuerySemantics as aa, atsdStatusPayloadSchema as ac, getSpaceContractResponseSchema as ai, getAgentExecutionReadinessBatchResponseSchema as al, listSpaceThreadSignalsResponseSchema as an, forgetCurrentComputerResponseSchema as ao, spaceDispatchTraceFinalVisibleMessageLinkageSourceFactSchema as ar, RUNTIME_COORDINATOR_FAILURE_PUBLICATION_COMMAND_MODEL_VERSION as as, startSessionResponseSchema as at, prepareSessionStreamClientFrameSchema as b, localRuntimeExecutionTargetCapabilitySchema as ba, spaceConversationLocalRuntimeContextStatusSchema as bc, submitRuntimeRegistrationResponseSchema as bi, AGENT_EXECUTION_READINESS_IMPACT_REASON_CODES as bl, postNormalMessageResponseSchema as bn, agentProfileBindingRouteParamsSchema as bo, spaceDispatchTraceRuntimeCoordinatorCreationDiagnosticSchema as br, planMentionDispatchDecisions as bs, startSessionHandoffFailureRetryActionSchema as bt, prepareBlockerSeveritySchema as c, gatewayErrorCodeSchema as ca, skippedDaemonProfileSchema as cc, putSpaceContractBodySchema as ci, getPrepareReadinessResponseSchema as cl, postSpaceThreadSignalResponseSchema as cn, claimExecutionDiagnosticsClaimLeaseSchema as co, spaceDispatchTraceFinalVisibleOutcomePublicationKindSchema as cr, runtimeCoordinatorFailurePublicationFinalMessageKindSchema as cs, resolveStartHandoffBodySchema as ct, prepareLocalAgentIdsSchema as d, observedDeviceTypeSchema as da, getSpaceConversationRemoteStatusResponseSchema as dc, runtimeCapabilityReportStatusSchema as di, prepareReadinessProjectionSchema as dl, getSpaceStatusResponseSchema as dn, claimExecutionDiagnosticsResponseSchema as do, spaceDispatchTraceFinalVisibleOutcomeStatusSchema as dr, REPLY_READINESS_REASON_CODE_VALUES as ds, startObservationSchema as dt, observabilityCloudflareRuntimeEvidenceSchema as ea, atsdInterruptResponseSchema as ec, spaceConversationBindingImportBodySchema as ei, agentExecutionReadinessPrimaryActionSchema as el, getSpaceUpdatesResponseSchema as en, currentDeviceTargetMissingSchema as eo, spaceDispatchTraceDispatchSchema as er, runtimeCoordinatorFinalizationAcceptedResultSchema as es, startSessionSpaceChoiceCreateNewBodySchema as et, prepareOpaqueTokenSchema as f, writeCurrentDeviceObservedMetadataBodySchema as fa, getSpaceConversationStatusInputSchema as fc, runtimeRegistrationRejectedReasonSchema as fi, prepareReadinessRouteParamsSchema as fl, spaceStatusLatestVisibleUpdateSchema as fn, claimExecutionDiagnosticsResultSchema as fo, spaceDispatchTraceLatestAttemptSchema as fr, replyReadinessLevelSchema as fs, startDeviceProjectionSlotSchema as ft, prepareSessionLifecycleStatusSchema as g, currentLocalRuntimeReplyReadinessResponseSchema as ga, spaceConversationLatestRemoteObservationSchema as gc, submitRuntimeCapabilityReportResultSchema as gi, AGENT_EXECUTION_READINESS_IMPACT_CLEARING_TRIGGERS as gl, SPACE_WAKE_CLIENT_MESSAGE_ID_REQUIRED_ERROR_CODE as gn, agentProfileBindingAuthoritySourceSchema as go, spaceDispatchTraceResponseSchema as gr, atsRequestContextSchema as gs, startSessionProgressSlotSchema as gt, prepareSessionEventTypeSchema as h, writeSetupTokenLocalRuntimeObservedMetadataResponseSchema as ha, spaceConversationLatestRemoteObservationObservedSchema as hc, submitRuntimeCapabilityReportItemSchema as hi, prepareReadinessSummarySchema as hl, SPACE_SIGNAL_AUTHORING_POLICY_REQUIRED_MESSAGE as hn, setAuthPasswordResponseSchema as ho, spaceDispatchTraceReplySignalSchema as hr, atsProfileIdSchema as hs, startProjectionAvailabilitySchema as ht, createPrepareSessionRequestSchema as i, listSignalsQuerySchema as ia, atsdShutdownResponseSchema as ic, spaceConversationBindingUpsertResponseSchema as ii, getAgentExecutionReadinessBatchBodySchema as il, listSpaceThreadEventsResponseSchema as in, forgetComputerRouteParamsSchema as io, spaceDispatchTraceFinalVisibleMessageLinkageSchema as ir, runtimeCoordinatorFinalizationOutcomeSchema as is, patchStartSessionBodySchema as it, terminalStepWriteStatusSchema as j, localAgentCatalogEntrySchema as ja, structuredGuidePayloadFromInputSchema as jc, updateProfileResponseSchema as ji, agentExecutionReadinessImpactSourceSchema as jl, helloAckSchema as jn, dbCommandFactSummarySchema as jo, spaceDiagnosticReportWakePointerDerivationSchema as jr, atsdControlPlaneCommandSchema as js, startPlannerSignalSchema as jt, terminalLocalAgentCatalogWriteSchema as k, localRuntimesResponseSchema as ka, STRUCTURED_GUIDE_SCHEMA_VERSION as kc, listProfilesResponseSchema as ki, agentExecutionReadinessImpactReasonCodeSchema as kl, spaceLiveSignalFrameSchema as kn, notifyAgentProfileRouteCatalogChangedResponseSchema as ko, spaceDiagnosticReportProblemTypeSchema as kr, atsdClearImportedUpstreamConversationLocalStateRequestPayloadSchema as ks, startPlannerDecisionSchema as kt, prepareDiagnosticResponseSchema as l, gatewayErrorEnvelopeSchema as la, providerDispatchRuntimeContextSchema as lc, putSpaceContractResponseSchema as li, prepareReadinessDisplayStateSchema as ll, spaceThreadPreviewSchema as ln, claimExecutionDiagnosticsDispatchSchema as lo, spaceDispatchTraceFinalVisibleOutcomeSchema as lr, runtimeCoordinatorFailurePublicationOutcomeSchema as ls, resolveStartHandoffResponseSchema as lt, prepareSessionEventSchema as m, writeSetupTokenLocalRuntimeObservedMetadataBodySchema as ma, spaceConversationLatestRemoteObservationMissingSchema as mc, runtimeReportingRuntimeIdSchema as mi, prepareReadinessRuntimeIdSchema as ml, SPACE_SIGNAL_AUTHORING_POLICY_REQUIRED_ERROR_CODE as mn, setAuthPasswordBodySchema as mo, spaceDispatchTraceQuerySchema as mr, atsActorContextSchema as ms, startProfileReadinessProjectionSlotSchema as mt, dispatchBriefSchema as n, observabilityWakeTraceSelectorSchema as na, atsdShutdownPayloadSchema as nc, spaceConversationBindingResponseSchema as ni, agentExecutionReadinessSchema as nl, createSpaceThreadResponseSchema as nn, currentDeviceTargetResponseSchema as no, spaceDispatchTraceExecutionIdentitySchema as nr, runtimeCoordinatorFinalizationDispatchFactSchema as ns, startSessionSpaceChoiceResponseSchema as nt, prepareBlockerRetryActionSchema as o, readListSignalsQueryRawValues as oa, atsdStatusResponseSchema as oc, patchSpaceContractBodySchema as oi, getAgentExecutionReadinessResponseSchema as ol, listSpaceThreadsResponseSchema as on, forgetCurrentComputerStatusSchema as oo, spaceDispatchTraceFinalVisibleMessageLinkageStatusSchema as or, buildRuntimeCoordinatorFailurePublicationCommandId as os, startSessionRouteParamsSchema as ot, prepareSessionEventActorSchema as p, writeCurrentDeviceObservedMetadataResponseSchema as pa, getSpaceConversationStatusResponseSchema as pc, runtimeReportingRouteParamsSchema as pi, prepareReadinessRunnableCapabilitySchema as pl, spaceStatusMembersSummarySchema as pn, catchupResponseSchema as po, spaceDispatchTraceOpsDecisionSchema as pr, replyReadinessReasonCodeSchema as ps, startProfileReadinessEntrySchema as pt, localSkillsComponentProjectionSchema as q, startSpaceChoiceSchema as qa, spaceMemberSourceSchema as qc, observabilityCloudflareWorkerNameSchema as qi, providerConversationResumeCapabilitySchema as ql, listSpaceDispatchTraceFinalVisibleSignalCandidates as qn, daemonBootstrapRecommendationPayloadSchema as qo, patchSpaceMetaResponseSchema as qr, atsdHealthResponseSchema as qs, wakeTraceWaterfallStepStatusSchema as qt, continuitySchema as r, projectObservabilityWakeCorrelation as ra, atsdShutdownRequestPayloadSchema as rc, spaceConversationBindingUpsertBodySchema as ri, agentExecutionReadinessTargetRuntimeSchema as rl, getSpaceThreadResponseSchema as rn, forgetComputerResponseSchema as ro, spaceDispatchTraceFinalVisibleMessageFactSourceSchema as rr, runtimeCoordinatorFinalizationDispatchOwnerSchema as rs, createStartSessionBodySchema as rt, prepareBlockerSchema as s, resolveListSignalsReadQuerySemantics as sa, daemonProfileSkipReasonSchema as sc, patchSpaceContractResponseSchema as si, getPrepareReadinessQuerySchema as sl, postSpaceThreadSignalBodySchema as sn, setCurrentDeviceTargetBodySchema as so, spaceDispatchTraceFinalVisibleMessageSchema as sr, runtimeCoordinatorFailurePublicationCommandSchema as ss, startSessionWithTokenResponseSchema as st, entryBriefSchema as t, observabilityWakeCorrelationSchema as ta, atsdRuntimeHealthStateSchema as tc, spaceConversationBindingImportResponseSchema as ti, agentExecutionReadinessRouteParamsSchema as tl, createSpaceThreadBodySchema as tn, currentDeviceTargetResolvedSchema as to, spaceDispatchTraceDispatchStatusSchema as tr, runtimeCoordinatorFinalizationCommandSchema as ts, startSessionSpaceChoiceJoinExistingBodySchema as tt, prepareLocalAgentCatalogSchema as u, observedDeviceMetadataSchema as ua, getSpaceConversationRemoteStatusInputSchema as uc, runtimeCapabilityReportRejectedReasonSchema as ui, prepareReadinessNonRunnableCapabilitySchema as ul, getSpaceStatusInputSchema as un, claimExecutionDiagnosticsQuerySchema as uo, spaceDispatchTraceFinalVisibleOutcomeSourceFactSchema as ur, REPLY_READINESS_LEVEL_VALUES as us, startHandoffProfileSchema as ut, prepareSessionResponseSchema as v, localRuntimeDeviceTypeSchema as va, spaceConversationLiveResumeCheckStatusSchema as vc, submitRuntimeCapabilityReportsResponseSchema as vi, AGENT_EXECUTION_READINESS_IMPACT_FRESH_TTL_MS as vl, hasSpaceSignalWakeActivationTarget as vn, agentProfileBindingProjectionSchema as vo, spaceDispatchTraceResultInboxSchema as vr, MENTION_DISPATCH_ERROR_CODES as vs, startSharedStateSchema as vt, prepareStepIdSchema as w, localRuntimeReplyReadinessNextActionSchema as wa, spaceConversationUpstreamConversationBindingSchema as wc, createAgentProfileBodySchema as wi, AGENT_EXECUTION_READINESS_IMPACT_TAXONOMY as wl, presenceEnvelopeSchema as wn, agentProfileBindingWriteModeSchema as wo, spaceDispatchTraceSnapshotSchema as wr, DAEMON_PROFILE_SKIP_REASON_VALUES as ws, startSessionStepIdSchema as wt, prepareSessionStreamRoleSchema as x, localRuntimeExecutionTargetSchema as xa, spaceConversationRuntimeWorkspaceSchema as xc, authProfileKindSchema as xi, AGENT_EXECUTION_READINESS_IMPACT_REASON_CODE_ALIASES as xl, spaceSignalAuthoringPolicySchema as xn, agentProfileBindingRuntimeCapabilitySchema as xo, spaceDispatchTraceRuntimeCoordinatorEventSchema as xr, planTargetDispatchDecisions as xs, startSessionHandoffFailureSchema as xt, prepareSessionSnapshotSchema as y, localRuntimeDisplayNameSourceSchema as ya, spaceConversationLocalRuntimeContextSchema as yc, submitRuntimeRegistrationBodySchema as yi, AGENT_EXECUTION_READINESS_IMPACT_KINDS as yl, postNormalMessageBodySchema as yn, agentProfileBindingResolutionSourceSchema as yo, spaceDispatchTraceResultSchema as yr, buildMentionDispatchResultEnvelope as ys, startSessionHandoffFailureGateSchema as yt, localCliComponentProjectionSchema as z, startOpaqueTokenSchema as za, removeSpaceMembersResponseSchema as zc, upsertProfileSpaceHistoryBodySchema as zi, canonicalizeControllerRefForKind as zl, spaceNameSchema as zn, dbFactSubjectSchema as zo, deleteSpaceResponseSchema as zr, atsdConversationExecutionRuntimeWorkspaceInvalidSchema as zs, WAKE_TRACE_WATERFALL_STEP_NAMES as zt };\n//# sourceMappingURL=entry-brief-BgrRW0ZT.js.map","import { $ as startSessionSpaceChoiceBodySchema, $a as currentDeviceTargetDeviceIdSchema, $c as agentExecutionReadinessPrimaryActionPlanSchema, $i as OBSERVABILITY_WAKE_CORRELATION_MODEL_VERSION, $n as spaceDispatchTraceDispatchExecutionSchema, $o as buildRuntimeCoordinatorFinalizationCommandId, $r as spaceConversationBindingDeleteResponseSchema, $s as atsdInterruptRequestPayloadSchema, $t as getSpaceUpdatesInputSchema, A as terminalStepWriteSchema, Aa as setLocalRuntimeDisplayNameBodySchema, Ac as dualViewGuideInputSchema, Ai as resolveProfileResponseSchema, Al as agentExecutionReadinessImpactScopeSchema, An as serverErrorFrameSchema, Ao as DB_FACT_SCHEMA_VERSION, Ar as spaceDiagnosticReportReasonCodeSchema, As as atsdClearImportedUpstreamConversationLocalStateResponseSchema, At as startPlannerReasonCodeSchema, B as localComponentProjectionSchema, Ba as startProfileChoiceModeSchema, Bc as resolvedSpaceMemberProfileSchema, Bi as upsertProfileSpaceHistoryResponseSchema, Bl as isExplicitBuiltinControllerRef, Bn as postSpaceDispatchOutboxRedriveBodySchema, Bo as dbFactTargetSchema, Br as normalizeSpaceCursorPatch, Bs as atsdConversationExecutionRuntimeWorkspaceMissingSchema, Bt as getSpaceWakeTraceWaterfallInputSchema, C as prepareSessionWithTokenResponseSchema, Ca as localRuntimePlatformFamilySchema, Cc as spaceConversationUpstreamConversationBindingPresentSchema, Ci as authProfileViewSchema, Cl as AGENT_EXECUTION_READINESS_IMPACT_SOURCES, Cn as incomingServerMessageSchema, Co as agentProfileBindingStateSchema, Cr as spaceDispatchTraceRuntimeCoordinatorHeadLifecycleSchema, Cs as ATSD_CONTROL_PLANE_SCHEMA_VERSION, Ct as startSessionProgressStatusSchema, D as prepareTerminalConnectionSchema, Da as localRuntimesConnectionIdentityAdoptionSchema, Dc as commonErrorSchema, Di as createHumanProfileResponseSchema, Dl as agentExecutionReadinessImpactEffectSchema, Dn as signalSystemNoticeEnvelopeSchema, Do as getAgentProfilePrimaryBindingResponseSchema, Dr as createSpaceDiagnosticReportResponseSchema, Ds as atsdCancelResponseSchema, Dt as startRouteObservationStatusSchema, E as prepareStepStateSchema, Ea as localRuntimeReplyReadinessStatusSchema, Ec as spaceRouteParamsSchema, Ei as createHumanProfileBodySchema, El as agentExecutionReadinessImpactClearingTriggerSchema, En as signalStatusEnvelopeSchema, Eo as ensureAgentProfilePrimaryBindingResponseSchema, Er as createSpaceDiagnosticReportBodySchema, Es as atsdCancelRequestPayloadSchema, Et as startRouteObservationReasonCodeSchema, F as formatLocalComponentsSummaryLabel, Fa as localAgentCatalogTargetKindSchema, Fc as postResolvedSpaceMembersBodySchema, Fi as patchProfileSpaceHistoryStatusResponseSchema, Fl as resolveAgentExecutionReadinessImpactTaxonomyEntry, Fn as dispatchResultKindSchema, Fo as dbFactPhaseSchema, Fr as querySpaceDeletionTombstonesResponseSchema, Fs as atsdControlPlaneResponseSchema, Ft as startDeviceAgentCatalogSchema, G as localSetupActionSchema, Ga as startSessionSchema, Gc as spaceMemberHumanSnapshotSchema, Gi as observabilityCloudflareRuntimeEventSchema, Gl as providerConversationDiscoverCapabilitySchema, Gn as spaceDispatchLookupMatchSchema, Go as dbInspectionSummarySchema, Gr as getSpaceMetaResponseSchema, Gs as atsdConversationExecutionStatusResponseSchema, Gt as wakeTraceWaterfallStepNameSchema, H as localComponentsManifestSchema, Ha as startSelectedSpaceMemberProfileIdsSchema, Hc as spaceMemberAgentPublicReplyPresenceSchema, Hi as OBSERVABILITY_CLOUDFLARE_ANALYTICS_DOUBLES, Hl as normalizeBuiltinControllerProviderId, Hn as spaceDispatchOutboxRedriveReasonSchema, Ho as dbInspectionCheckStatusSchema, Hr as patchCursorStringSchema, Hs as atsdConversationExecutionRuntimeWorkspaceSchema, Ht as wakeTraceWaterfallFactSourceSchema, I as formatLocalSetupActionDescription, Ia as startLocalAgentIdsSchema, Ic as postSpaceMembersBodySchema, Ii as profileSpaceCreatorKindSchema, Il as areBuiltinControllerRefsEquivalent, In as dispatchResultPublicOutcomeSchema, Io as dbFactResultSchema, Ir as spaceDeletionTombstoneRecordSchema, Is as atsdControlTargetSelectorSchema, It as startDeviceAgentSelectableReasonSchema, J as joinWaitlistBodySchema, Ja as startSpaceMemberSelectionModeSchema, Jc as spaceMemberStatusSchema, Ji as observabilityRuntimeEvidenceStatusSchema, Jl as providerConversationTurnOverrideCapabilitySchema, Jn as projectSpaceDispatchTraceFinalVisibleOutcome, Jo as daemonBootstrapRecommendationResultSchema, Jr as spaceCreatorSchema, Js as atsdHealthStateSchema, Jt as wakeTraceWaterfallSummaryStatusSchema, K as localSetupEntrypointSchema, Ka as startSpaceChoiceModeSchema, Kc as spaceMemberKindSchema, Ki as observabilityCloudflareRuntimeKindSchema, Kl as providerConversationExternalImportCapabilitySchema, Kn as SPACE_DISPATCH_TRACE_PROMPT_PREVIEW_MAX_CHARS, Ko as daemonBootstrapAutoInstallModeSchema, Kr as patchSpaceMetaBodySchema, Ks as atsdHealthPayloadSchema, Kt as wakeTraceWaterfallStepSchema, L as formatLocalSetupActionLabel, La as startLocalAgentPreparationModeSchema, Lc as postSpaceMembersResponseSchema, Li as profileSpaceHistoryRecordSchema, Ll as buildControllerRoutingKeyForKind, Ln as dispatchResultSchema, Lo as dbFactSnapshotSchema, Lr as upsertSpaceDeletionTombstoneBodySchema, Ls as atsdConversationExecutionControllerKindSchema, Lt as startDeviceProjectionSchema, M as webAgentSelectionWriteSchema, Ma as localAgentCatalogLaunchStatusSchema, Mc as structuredGuidePayloadSchema, Mi as listProfileSpaceHistoryQuerySchema, Ml as isAgentExecutionReadinessImpactReasonCode, Mn as helloSchema, Mo as dbDebtRegistryItemSchema, Mr as spaceDiagnosticReportWakePointerDerivationStatusSchema, Ms as atsdControlPlaneErrorPayloadSchema, Mt as startPlannerStatusSchema, N as LOCAL_COMPONENTS_SCHEMA_VERSION, Na as localAgentCatalogSchema, Nc as spaceMembersEventSchema, Ni as listProfileSpaceHistoryResponseSchema, Nl as isKnownFinalFailureReasonCodeWithoutReadinessImpact, Nn as getSpaceDispatchResultInputSchema, No as dbDiagnosticsPayloadSchema, Nr as spaceDiagnosticReportWakePointerSchema, Ns as atsdControlPlaneErrorResponseSchema, Nt as startBackgroundHelperInstallStatusSchema, O as prepareTerminalConnectionStatusSchema, Oa as localRuntimesQuerySchema, Oc as errorResponseSchema, Oi as deleteProfileResponseSchema, Ol as agentExecutionReadinessImpactKindSchema, On as signalTextEnvelopeSchema, Oo as notifyAgentProfileRouteCatalogChangedBodySchema, Or as createSpaceDiagnosticReportRouteParamsSchema, Os as atsdClearImportedUpstreamConversationLocalStatePayloadSchema, Ot as startNextActionIdSchema, P as formatLocalComponentsSummaryDescription, Pa as localAgentCatalogSelectableReasonSchema, Pc as leaveSpaceResponseSchema, Pi as patchProfileSpaceHistoryStatusBodySchema, Pl as resolveAgentExecutionReadinessImpactReasonCode, Pn as getSpaceDispatchResultResponseSchema, Po as dbFactModeSchema, Pr as querySpaceDeletionTombstonesBodySchema, Ps as atsdControlPlaneRequestSchema, Pt as startBackgroundHelperRuntimeStatusSchema, Q as waitlistJoinStatusSchema, Qa as currentDeviceTargetActivationSourceSchema, Qc as spaceViewerMembershipResponseSchema, Qi as shouldLogObservabilityCloudflareRuntimeEvent, Qn as spaceDispatchTraceClaimLeaseSchema, Qo as RUNTIME_COORDINATOR_FINALIZATION_COMMAND_MODEL_VERSION, Qr as spaceConversationBindingConflictResponseSchema, Qs as atsdInterruptPayloadSchema, Qt as wakeProgressPhaseSchema, R as installedLocalComponentsSnapshotSchema, Ra as startLocalAgentPreparationSchema, Rc as removeSpaceMembersBodySchema, Ri as profileSpaceHistoryStatusSchema, Rl as canonicalizeBuiltinControllerRef, Rn as MAX_SPACE_NAME_LENGTH, Ro as dbFactSourceSchema, Rr as upsertSpaceDeletionTombstoneResponseSchema, Rs as atsdConversationExecutionControllerLaunchStatusSchema, Rt as startSkillsReadinessStatusSchema, S as prepareSessionStreamServerFrameSchema, Sa as localRuntimeExecutionTargetStatusSchema, Sc as spaceConversationUpstreamConversationBindingMissingSchema, Si as authProfileStatusSchema, Sl as AGENT_EXECUTION_READINESS_IMPACT_SCOPES, Sn as validateSpaceSignalClientMessageIdPolicy, So as agentProfileBindingRuntimeIdSchema, Sr as spaceDispatchTraceRuntimeCoordinatorExecutionSchema, Ss as dispatchStorageReadinessSchema, St as startSessionProgressSchema, T as prepareStepSchema, Ta as localRuntimeReplyReadinessPrimaryBlockerSchema, Tc as spaceConversationWakeReadinessSchema, Ti as createAgentProfileResponseSchema, Tl as KNOWN_FINAL_FAILURE_REASON_CODES_WITHOUT_READINESS_IMPACT, Tn as signalEnvelopeSchema, To as ensureAgentProfilePrimaryBindingBodySchema, Tr as spaceDispatchTraceStreamingSchema, Ts as atsdCancelPayloadSchema, Tt as startProfileReadinessSummarySchema, U as localComponentsStatusSchema, Ua as startSessionInitiatorSchema, Uc as spaceMemberAgentSnapshotSchema, Ui as OBSERVABILITY_CLOUDFLARE_RUNTIME_EVENT_MODEL_VERSION, Ul as BUILTIN_PROVIDER_CONVERSATION_CAPABILITY_BY_PROVIDER, Un as getSpaceDispatchLookupInputSchema, Uo as dbInspectionModeSchema, Ur as patchSpaceCursorBodySchema, Us as atsdConversationExecutionStatusPayloadSchema, Ut as wakeTraceWaterfallItemSchema, V as localComponentStatusSchema, Va as startProfileChoiceSchema, Vc as spaceMemberAgentExecutionReadinessSchema, Vi as OBSERVABILITY_CLOUDFLARE_ANALYTICS_BLOBS, Vl as normalizeBuiltinControllerAgentId, Vn as postSpaceDispatchOutboxRedriveResponseSchema, Vo as dbInspectionCheckSchema, Vr as patchCursorLastSeenTsSchema, Vs as atsdConversationExecutionRuntimeWorkspaceReadySchema, Vt as getSpaceWakeTraceWaterfallResponseSchema, W as localServiceComponentProjectionSchema, Wa as startSessionLifecycleStatusSchema, Wc as spaceMemberAgentViewerLocalControlSchema, Wi as observabilityCloudflareAnalyticsDataPointSchema, Wl as providerConversationCapabilitySchema, Wn as getSpaceDispatchLookupResponseSchema, Wo as dbInspectionResultSchema, Wr as createSpaceResponseSchema, Ws as atsdConversationExecutionStatusRequestPayloadSchema, Wt as wakeTraceWaterfallStepIdsSchema, X as waitlistErrorCodeSchema, Xa as startTargetSpaceIdSchema, Xc as spaceMembersSummarySchema, Xi as projectObservabilityCloudflareRuntimeConsoleEvent, Xn as resolveSpaceDispatchTraceRootCause, Xo as daemonRuntimeLeaseModeSchema, Xr as spaceStorageUsageSchema, Xs as atsdHistoryPayloadSchema, Xt as getSpaceWakeProgressResponseSchema, Y as joinWaitlistResponseSchema, Ya as startSpaceMemberSelectionSchema, Yc as spaceMembersSnapshotSchema, Yi as projectObservabilityCloudflareAnalyticsDataPoint, Yl as resolveBuiltinProviderConversationCapability, Yn as projectSpaceDispatchTraceRootCause, Yo as DAEMON_RUNTIME_LEASE_SCHEMA_VERSION, Yr as spaceMetaSchema, Ys as atsdHistoryEntrySchema, Yt as getSpaceWakeProgressInputSchema, Z as waitlistErrorResponseSchema, Za as daemonRouteObservationResponseSchema, Zc as spaceViewerMembershipProfileSchema, Zi as projectObservabilityCloudflareRuntimeEvent, Zn as spaceDispatchTraceAttemptStatusSchema, Zo as daemonRuntimeLeaseSchema, Zr as createSpaceBodySchema, Zs as atsdHistoryResponseSchema, Zt as wakeProgressItemSchema, _ as prepareSessionPhaseSchema, _a as localRuntimeComputerSchema, _c as spaceConversationLiveResumeCheckSchema, _i as submitRuntimeCapabilityReportsBodySchema, _l as AGENT_EXECUTION_READINESS_IMPACT_EFFECTS, _n as SPACE_WAKE_CLIENT_MESSAGE_ID_REQUIRED_MESSAGE, _o as agentProfileBindingDispatchEligibilitySchema, _r as spaceDispatchTraceResultInboxPublishStateSchema, _s as resolvedAtsProfileSchema, _t as startSharedReadModelSchema, a as createPrepareSessionResponseSchema, aa as normalizeListSignalsReadQuerySemantics, ac as atsdStatusPayloadSchema, ai as getSpaceContractResponseSchema, al as getAgentExecutionReadinessBatchResponseSchema, an as listSpaceThreadSignalsResponseSchema, ao as forgetCurrentComputerResponseSchema, ar as spaceDispatchTraceFinalVisibleMessageLinkageSourceFactSchema, as as RUNTIME_COORDINATOR_FAILURE_PUBLICATION_COMMAND_MODEL_VERSION, at as startSessionResponseSchema, b as prepareSessionStreamClientFrameSchema, ba as localRuntimeExecutionTargetCapabilitySchema, bc as spaceConversationLocalRuntimeContextStatusSchema, bi as submitRuntimeRegistrationResponseSchema, bl as AGENT_EXECUTION_READINESS_IMPACT_REASON_CODES, bn as postNormalMessageResponseSchema, bo as agentProfileBindingRouteParamsSchema, br as spaceDispatchTraceRuntimeCoordinatorCreationDiagnosticSchema, bs as planMentionDispatchDecisions, bt as startSessionHandoffFailureRetryActionSchema, c as prepareBlockerSeveritySchema, ca as gatewayErrorCodeSchema, cc as skippedDaemonProfileSchema, ci as putSpaceContractBodySchema, cl as getPrepareReadinessResponseSchema, cn as postSpaceThreadSignalResponseSchema, co as claimExecutionDiagnosticsClaimLeaseSchema, cr as spaceDispatchTraceFinalVisibleOutcomePublicationKindSchema, cs as runtimeCoordinatorFailurePublicationFinalMessageKindSchema, ct as resolveStartHandoffBodySchema, d as prepareLocalAgentIdsSchema, da as observedDeviceTypeSchema, dc as getSpaceConversationRemoteStatusResponseSchema, di as runtimeCapabilityReportStatusSchema, dl as prepareReadinessProjectionSchema, dn as getSpaceStatusResponseSchema, do as claimExecutionDiagnosticsResponseSchema, dr as spaceDispatchTraceFinalVisibleOutcomeStatusSchema, ds as REPLY_READINESS_REASON_CODE_VALUES, dt as startObservationSchema, ea as observabilityCloudflareRuntimeEvidenceSchema, ec as atsdInterruptResponseSchema, ei as spaceConversationBindingImportBodySchema, el as agentExecutionReadinessPrimaryActionSchema, en as getSpaceUpdatesResponseSchema, eo as currentDeviceTargetMissingSchema, er as spaceDispatchTraceDispatchSchema, es as runtimeCoordinatorFinalizationAcceptedResultSchema, et as startSessionSpaceChoiceCreateNewBodySchema, f as prepareOpaqueTokenSchema, fa as writeCurrentDeviceObservedMetadataBodySchema, fc as getSpaceConversationStatusInputSchema, fi as runtimeRegistrationRejectedReasonSchema, fl as prepareReadinessRouteParamsSchema, fn as spaceStatusLatestVisibleUpdateSchema, fo as claimExecutionDiagnosticsResultSchema, fr as spaceDispatchTraceLatestAttemptSchema, fs as replyReadinessLevelSchema, ft as startDeviceProjectionSlotSchema, g as prepareSessionLifecycleStatusSchema, ga as currentLocalRuntimeReplyReadinessResponseSchema, gc as spaceConversationLatestRemoteObservationSchema, gi as submitRuntimeCapabilityReportResultSchema, gl as AGENT_EXECUTION_READINESS_IMPACT_CLEARING_TRIGGERS, gn as SPACE_WAKE_CLIENT_MESSAGE_ID_REQUIRED_ERROR_CODE, go as agentProfileBindingAuthoritySourceSchema, gr as spaceDispatchTraceResponseSchema, gs as atsRequestContextSchema, gt as startSessionProgressSlotSchema, h as prepareSessionEventTypeSchema, ha as writeSetupTokenLocalRuntimeObservedMetadataResponseSchema, hc as spaceConversationLatestRemoteObservationObservedSchema, hi as submitRuntimeCapabilityReportItemSchema, hl as prepareReadinessSummarySchema, hn as SPACE_SIGNAL_AUTHORING_POLICY_REQUIRED_MESSAGE, ho as setAuthPasswordResponseSchema, hr as spaceDispatchTraceReplySignalSchema, hs as atsProfileIdSchema, ht as startProjectionAvailabilitySchema, i as createPrepareSessionRequestSchema, ia as listSignalsQuerySchema, ic as atsdShutdownResponseSchema, ii as spaceConversationBindingUpsertResponseSchema, il as getAgentExecutionReadinessBatchBodySchema, in as listSpaceThreadEventsResponseSchema, io as forgetComputerRouteParamsSchema, ir as spaceDispatchTraceFinalVisibleMessageLinkageSchema, is as runtimeCoordinatorFinalizationOutcomeSchema, it as patchStartSessionBodySchema, j as terminalStepWriteStatusSchema, ja as localAgentCatalogEntrySchema, jc as structuredGuidePayloadFromInputSchema, ji as updateProfileResponseSchema, jl as agentExecutionReadinessImpactSourceSchema, jn as helloAckSchema, jo as dbCommandFactSummarySchema, jr as spaceDiagnosticReportWakePointerDerivationSchema, js as atsdControlPlaneCommandSchema, jt as startPlannerSignalSchema, k as terminalLocalAgentCatalogWriteSchema, ka as localRuntimesResponseSchema, kc as STRUCTURED_GUIDE_SCHEMA_VERSION, ki as listProfilesResponseSchema, kl as agentExecutionReadinessImpactReasonCodeSchema, kn as spaceLiveSignalFrameSchema, ko as notifyAgentProfileRouteCatalogChangedResponseSchema, kr as spaceDiagnosticReportProblemTypeSchema, ks as atsdClearImportedUpstreamConversationLocalStateRequestPayloadSchema, kt as startPlannerDecisionSchema, l as prepareDiagnosticResponseSchema, la as gatewayErrorEnvelopeSchema, lc as providerDispatchRuntimeContextSchema, li as putSpaceContractResponseSchema, ll as prepareReadinessDisplayStateSchema, ln as spaceThreadPreviewSchema, lo as claimExecutionDiagnosticsDispatchSchema, lr as spaceDispatchTraceFinalVisibleOutcomeSchema, ls as runtimeCoordinatorFailurePublicationOutcomeSchema, lt as resolveStartHandoffResponseSchema, m as prepareSessionEventSchema, ma as writeSetupTokenLocalRuntimeObservedMetadataBodySchema, mc as spaceConversationLatestRemoteObservationMissingSchema, mi as runtimeReportingRuntimeIdSchema, ml as prepareReadinessRuntimeIdSchema, mn as SPACE_SIGNAL_AUTHORING_POLICY_REQUIRED_ERROR_CODE, mo as setAuthPasswordBodySchema, mr as spaceDispatchTraceQuerySchema, ms as atsActorContextSchema, mt as startProfileReadinessProjectionSlotSchema, n as dispatchBriefSchema, na as observabilityWakeTraceSelectorSchema, nc as atsdShutdownPayloadSchema, ni as spaceConversationBindingResponseSchema, nl as agentExecutionReadinessSchema, nn as createSpaceThreadResponseSchema, no as currentDeviceTargetResponseSchema, nr as spaceDispatchTraceExecutionIdentitySchema, ns as runtimeCoordinatorFinalizationDispatchFactSchema, nt as startSessionSpaceChoiceResponseSchema, o as prepareBlockerRetryActionSchema, oa as readListSignalsQueryRawValues, oc as atsdStatusResponseSchema, oi as patchSpaceContractBodySchema, ol as getAgentExecutionReadinessResponseSchema, on as listSpaceThreadsResponseSchema, oo as forgetCurrentComputerStatusSchema, or as spaceDispatchTraceFinalVisibleMessageLinkageStatusSchema, os as buildRuntimeCoordinatorFailurePublicationCommandId, ot as startSessionRouteParamsSchema, p as prepareSessionEventActorSchema, pa as writeCurrentDeviceObservedMetadataResponseSchema, pc as getSpaceConversationStatusResponseSchema, pi as runtimeReportingRouteParamsSchema, pl as prepareReadinessRunnableCapabilitySchema, pn as spaceStatusMembersSummarySchema, po as catchupResponseSchema, pr as spaceDispatchTraceOpsDecisionSchema, ps as replyReadinessReasonCodeSchema, pt as startProfileReadinessEntrySchema, q as localSkillsComponentProjectionSchema, qa as startSpaceChoiceSchema, qc as spaceMemberSourceSchema, qi as observabilityCloudflareWorkerNameSchema, ql as providerConversationResumeCapabilitySchema, qn as listSpaceDispatchTraceFinalVisibleSignalCandidates, qo as daemonBootstrapRecommendationPayloadSchema, qr as patchSpaceMetaResponseSchema, qs as atsdHealthResponseSchema, qt as wakeTraceWaterfallStepStatusSchema, r as continuitySchema, ra as projectObservabilityWakeCorrelation, rc as atsdShutdownRequestPayloadSchema, ri as spaceConversationBindingUpsertBodySchema, rl as agentExecutionReadinessTargetRuntimeSchema, rn as getSpaceThreadResponseSchema, ro as forgetComputerResponseSchema, rr as spaceDispatchTraceFinalVisibleMessageFactSourceSchema, rs as runtimeCoordinatorFinalizationDispatchOwnerSchema, rt as createStartSessionBodySchema, s as prepareBlockerSchema, sa as resolveListSignalsReadQuerySemantics, sc as daemonProfileSkipReasonSchema, si as patchSpaceContractResponseSchema, sl as getPrepareReadinessQuerySchema, sn as postSpaceThreadSignalBodySchema, so as setCurrentDeviceTargetBodySchema, sr as spaceDispatchTraceFinalVisibleMessageSchema, ss as runtimeCoordinatorFailurePublicationCommandSchema, st as startSessionWithTokenResponseSchema, t as entryBriefSchema, ta as observabilityWakeCorrelationSchema, tc as atsdRuntimeHealthStateSchema, ti as spaceConversationBindingImportResponseSchema, tl as agentExecutionReadinessRouteParamsSchema, tn as createSpaceThreadBodySchema, to as currentDeviceTargetResolvedSchema, tr as spaceDispatchTraceDispatchStatusSchema, ts as runtimeCoordinatorFinalizationCommandSchema, tt as startSessionSpaceChoiceJoinExistingBodySchema, u as prepareLocalAgentCatalogSchema, ua as observedDeviceMetadataSchema, uc as getSpaceConversationRemoteStatusInputSchema, ui as runtimeCapabilityReportRejectedReasonSchema, ul as prepareReadinessNonRunnableCapabilitySchema, un as getSpaceStatusInputSchema, uo as claimExecutionDiagnosticsQuerySchema, ur as spaceDispatchTraceFinalVisibleOutcomeSourceFactSchema, us as REPLY_READINESS_LEVEL_VALUES, ut as startHandoffProfileSchema, v as prepareSessionResponseSchema, va as localRuntimeDeviceTypeSchema, vc as spaceConversationLiveResumeCheckStatusSchema, vi as submitRuntimeCapabilityReportsResponseSchema, vl as AGENT_EXECUTION_READINESS_IMPACT_FRESH_TTL_MS, vn as hasSpaceSignalWakeActivationTarget, vo as agentProfileBindingProjectionSchema, vr as spaceDispatchTraceResultInboxSchema, vs as MENTION_DISPATCH_ERROR_CODES, vt as startSharedStateSchema, w as prepareStepIdSchema, wa as localRuntimeReplyReadinessNextActionSchema, wc as spaceConversationUpstreamConversationBindingSchema, wi as createAgentProfileBodySchema, wl as AGENT_EXECUTION_READINESS_IMPACT_TAXONOMY, wn as presenceEnvelopeSchema, wo as agentProfileBindingWriteModeSchema, wr as spaceDispatchTraceSnapshotSchema, ws as DAEMON_PROFILE_SKIP_REASON_VALUES, wt as startSessionStepIdSchema, x as prepareSessionStreamRoleSchema, xa as localRuntimeExecutionTargetSchema, xc as spaceConversationRuntimeWorkspaceSchema, xi as authProfileKindSchema, xl as AGENT_EXECUTION_READINESS_IMPACT_REASON_CODE_ALIASES, xn as spaceSignalAuthoringPolicySchema, xo as agentProfileBindingRuntimeCapabilitySchema, xr as spaceDispatchTraceRuntimeCoordinatorEventSchema, xs as planTargetDispatchDecisions, xt as startSessionHandoffFailureSchema, y as prepareSessionSnapshotSchema, ya as localRuntimeDisplayNameSourceSchema, yc as spaceConversationLocalRuntimeContextSchema, yi as submitRuntimeRegistrationBodySchema, yl as AGENT_EXECUTION_READINESS_IMPACT_KINDS, yn as postNormalMessageBodySchema, yo as agentProfileBindingResolutionSourceSchema, yr as spaceDispatchTraceResultSchema, ys as buildMentionDispatchResultEnvelope, yt as startSessionHandoffFailureGateSchema, z as localCliComponentProjectionSchema, za as startOpaqueTokenSchema, zc as removeSpaceMembersResponseSchema, zi as upsertProfileSpaceHistoryBodySchema, zl as canonicalizeControllerRefForKind, zn as spaceNameSchema, zo as dbFactSubjectSchema, zr as deleteSpaceResponseSchema, zs as atsdConversationExecutionRuntimeWorkspaceInvalidSchema, zt as WAKE_TRACE_WATERFALL_STEP_NAMES } from \"./entry-brief-BgrRW0ZT.js\";\nimport { $ as daemonHubRuntimeCoordinatorHeadWaitingRequestSchema, $i as MAX_PROFILE_HANDLE_LENGTH, $n as DISPATCH_ACTIVITY_FAILED_PURPOSE, $r as spaceThreadSchema, $t as RUNTIME_COORDINATOR_EXECUTION_TOKEN_REDACTION_MARKER, A as daemonHubRegisterSessionResponseSchema, Ai as isSpaceMessageAddressingRelationSupportedForTargetKind, An as runtimeExecutionAuthorityRuntimeIdSchema, Ar as localRuntimeContextExecutionSchema, At as atsSpacePostMessageActionSchema, B as daemonHubRuntimeCoordinatorHeadLifecycleStatusSchema, Bi as spaceMessageAddressingTargetKindSchema, Bn as parseAtsdDispatchQueueIngress, Br as runtimeAgentControllerLaunchCandidateSchema, Bt as RUNTIME_COORDINATOR_CREATION_DIAGNOSTIC_MODEL_VERSION, C as daemonHubLookupRouteResponseSchema, Ca as BUILTIN_UPSTREAM_CONVERSATION_REF_KIND_BY_PROVIDER, Ci as SPACE_MESSAGE_ADDRESSING_TARGET_FIELD_VALUES, Cn as providerRuntimeStreamingCapabilitySchema, Cr as conversationBindingObservedStateSchema, Ct as SPACE_UPDATES_DEFAULT_LIMIT, D as daemonHubPreExecutionHandoffRequestSchema, Da as resolveBuiltinUpstreamConversationRefKind, Di as collectCanonicalMentionTextFragments, Dn as daemonHubDeliveryExecutionIdentitySchema, Dr as conversationBootstrapReasonSchema, Dt as atsSpaceActionReplyToSchema, E as daemonHubPreExecutionHandoffReasonCodeSchema, Ea as conversationPolicySchema, Ei as canonicalMentionTextFragmentSchema, En as RUNTIME_EXECUTION_IDENTITY_MODEL_VERSION, Er as conversationExecutionStateSchema, Et as atsSpaceActionReadUpdatesFromSchema, F as daemonHubRuntimeCoordinatorDecisionResponseSchema, Fi as normalizeMessageEnvelope, Fn as atsdDispatchContinuitySnapshotSchema, Fr as upstreamConversationResumePlanSchema, Ft as DAEMON_SERVICE_CONTRACT_SCHEMA_VERSION, G as daemonHubRuntimeCoordinatorHeadNoExecutionPublicationCategorySchema, Gi as spacePasswordStateSchema, Gn as atsdMentionDispatchStatusSchema, Gr as runtimeDispatchPolicySchema, Gt as runtimeCoordinatorExecutionCreationStatusSchema, H as daemonHubRuntimeCoordinatorHeadLifecycleTraceRequestSchema, Hi as createSpacePasswordBodySchema, Hn as atsdMentionDispatchResultEnvelopeSchema, Hr as runtimeAgentControllerSettingsSchema, Ht as buildRuntimeCoordinatorExecutionEventId, I as daemonHubRuntimeCoordinatorDecisionTriggerSchema, Ii as parseCanonicalMentionLiteral, In as atsdDispatchQueueIngressSchema, Ir as upstreamConversationResumeSchema, It as daemonServiceContractSchema, J as daemonHubRuntimeCoordinatorHeadNoExecutionRequestSchema, Ji as SPACE_MENTION_LABEL_SOURCE_VALUES, Jn as AGENT_REPLY_FINAL_PURPOSE, Jr as spaceThreadActionRefSchema, Jt as runtimeCoordinatorExecutionRecordSchema, K as daemonHubRuntimeCoordinatorHeadNoExecutionReasonCodeSchema, Ki as upsertSpacePasswordBodySchema, Kn as AGENT_REPLYING_END_PURPOSE, Kr as runtimeStreamingModeSchema, Kt as runtimeCoordinatorExecutionEventSchema, L as daemonHubRuntimeCoordinatorHeadAcceptActionSchema, Li as resolveMessageEnvelopeTargetField, Ln as atsdDispatchQueueLegacyMessageSchemaV1, Lr as LEGACY_RUNTIME_DISPATCH_POLICY, Lt as daemonServiceControllerSchema, M as daemonHubRouteCatalogChangedReasonSchema, Mi as messageEnvelopeSchema, Mn as spaceTraceExecutionIdentityProjectionSchema, Mr as localRuntimeContextReasonSchema, Mt as atsSpaceReadResultActionSchema, N as daemonHubRuntimeCoordinatorDecisionEventKindSchema, Ni as messageEnvelopeTargetFieldSchema, Nn as ATSD_DISPATCH_CONTRACT_VERSION, Nr as nextDispatchPlanSchema, Nt as atsSpaceReadUpdatesActionSchema, O as daemonHubPreExecutionHandoffResponseSchema, Oa as upstreamConversationRefKindSchema, Oi as formatCanonicalMentionLiteral, On as daemonHubResultIdentityEchoSchema, Or as conversationBootstrapSchema, Ot as atsSpaceActionSchema, P as daemonHubRuntimeCoordinatorDecisionRequestSchema, Pi as messageMentionTypeSchema, Pn as ATSD_DISPATCH_QUEUE_SCHEMA_VERSION, Pr as upstreamConversationResumePlanBlockedReasonSchema, Pt as atsSpaceStaySilentActionSchema, Q as daemonHubRuntimeCoordinatorHeadWaitingRecoveryActionSchema, Qi as spaceMentionLabelSourceSchema, Qn as DISPATCH_ACTIVITY_DISPATCHING_PURPOSE, Qr as spaceThreadIdSchema, Qt as RUNTIME_COORDINATOR_EXECUTION_TOKEN_MODEL_VERSION, R as daemonHubRuntimeCoordinatorHeadAcceptRequestSchema, Ri as resolveSpaceMessageAddressingTargetField, Rn as atsdDispatchQueueMessageSchema, Rr as agentContextResolutionSchema, Rt as daemonServiceDesiredStateSchema, S as daemonHubLookupRouteRequestSchema, Sa as BUILTIN_PROVIDER_ALLOWS_DISTINCT_AGENT_CONTEXT_ID, Si as SPACE_MESSAGE_ADDRESSING_RELATION_VALUES, Sn as providerRuntimePreparationRequirementSchema, Sr as bootstrapTemplateFactsSchema, St as atsdTaskResultTelemetrySchema, T as daemonHubNotifyRouteCatalogChangedResponseSchema, Ta as builtinProviderAllowsDistinctAgentContextId, Ti as canonicalMentionLiteralSchema, Tn as providerRuntimeWorkspaceResumeBehaviorSchema, Tr as conversationBindingSourceSchema, Tt as atsSpaceActionReadResultBySchema, U as daemonHubRuntimeCoordinatorHeadLifecycleTraceResponseSchema, Ui as normalizeSpacePasswordText, Un as atsdMentionDispatchResultPayloadSchema, Ur as runtimeAgentExecutableLaunchContractSchema, Ut as buildRuntimeCoordinatorExecutionId, V as daemonHubRuntimeCoordinatorHeadLifecycleTraceRecordSchema, Vi as SPACE_PASSWORD_MIN_LENGTH, Vn as ATSD_MENTION_DISPATCH_RESULT_SCHEMA_VERSION, Vr as runtimeAgentControllerLaunchContractSchema, Vt as RUNTIME_COORDINATOR_EXECUTION_MODEL_VERSION, W as daemonHubRuntimeCoordinatorHeadNoExecutionDecisionSourceSchema, Wi as spacePasswordSchema, Wn as atsdMentionDispatchRuleSourceSchema, Wr as runtimeAgentNodeScriptLaunchContractSchema, Wt as runtimeCoordinatorExecutionCreationDiagnosticSchema, X as daemonHubRuntimeCoordinatorHeadWaitingCategorySchema, Xi as resolveSpaceMentionLabels, Xn as AGENT_REPLY_PREVIEW_PURPOSE, Xr as spaceThreadEventSchema, Xt as runtimeCoordinatorLegacyPointersSchema, Y as daemonHubRuntimeCoordinatorHeadNoExecutionResponseSchema, Yi as resolveSingleSpaceMentionLabels, Yn as AGENT_REPLY_PREVIEW_END_PURPOSE, Yr as spaceThreadContextSchema, Yt as runtimeCoordinatorExecutionStatusSchema, Z as daemonHubRuntimeCoordinatorHeadWaitingReasonCodeSchema, Zi as spaceMentionLabelSchema, Zn as CONVERSATION_CONTINUITY_WARNING_PURPOSE, Zr as spaceThreadEventTypeSchema, Zt as runtimeCoordinatorTerminalOutcomeSchema, _ as daemonHubHeartbeatRequestSchema, _a as createDaemonRouteObservationSummary, _i as targetWakeLifecycleIdentitySchema, _n as runtimeCoordinatorTokenStatusSchema, _r as signalStatusGeneratedBySchema, _t as atsdTaskResultErrorTypeSchema, a as daemonHubDeliverDispatchPayloadSchema, aa as profileKindSchema, ai as spaceNoteSchema, an as runtimeCoordinatorExecutionTokenEchoSchema, at as daemonRuntimeContractReasonCodeSchema, b as daemonHubLookupOwnerServiceRequestSchema, ba as daemonRouteObservationSummarySchema, bi as MESSAGE_ENVELOPE_TARGET_FIELD_VALUES, bn as providerRuntimeCapabilityDeclarationSchema, br as CORE_READINESS_FACTS_CHANGED_MARKER_KIND, bt as atsdTaskResultSpaceActionProvenanceSchema, c as daemonHubDispatchLifecyclePhaseSchema, ca as profileWorkingDirectorySchema, ci as spaceAllowedActionSchema, cn as runtimeCoordinatorSafeEventPayloadJsonSchema, cr as signalSystemNoticeSchema, ct as daemonStreamErrorFrameSchema, d as daemonHubDispatchPreviewEndRequestSchema, di as spaceDispatchPolicyModeSchema, dn as runtimeCoordinatorTokenDiagnosticEventSchema, dr as signalTextSchema, dt as atsdProviderAccessEvidenceProviderSchema, ea as MAX_PROFILE_WORKING_DIRECTORY_LENGTH, ei as spaceThreadSignalPlacementKindSchema, en as RUNTIME_COORDINATOR_RETIRED_TOKEN_REASON_CODE_BY_STATUS, er as DISPATCH_ACTIVITY_RETRYING_PURPOSE, et as daemonHubRuntimeCoordinatorHeadWaitingResponseSchema, f as daemonHubDispatchPreviewRequestSchema, fi as spaceDispatchPolicySchema, fn as runtimeCoordinatorTokenExecutionScopeSchema, fr as signalSystemNoticeDataSchema, ft as atsdProviderAccessEvidenceReasonCodeSchema, g as daemonHubErrorCodeSchema, ga as MAX_TEXT_LENGTH, gi as projectTargetWakeLifecycleIdentity, gn as runtimeCoordinatorTokenRunAuthoritySchema, gr as signalStatusDataSchema, gt as atsdTaskResultEnvelopeWriteSchema, h as daemonHubDispatchSourceSignalSchema, ha as MAX_PROFILE_NAME_LENGTH, hi as buildTargetWakeLifecycleId, hn as runtimeCoordinatorTokenReasonCodeSchema, hr as signalSystemNoticeTypeSchema, ht as atsdTaskResultEnvelopeSchema, i as daemonHubCapabilitiesSchema, ia as profileHandleSchema, ii as spaceContractSchema, in as runtimeCoordinatorExecutionTokenAuthorityRecordSchema, ir as sanitizeSignalTextPreview, it as daemonHubWaitDispatchResultResponseSchema, j as daemonHubRouteCatalogChangedFramePayloadSchema, ji as messageEnvelopeInputSchema, jn as runtimeExecutionIdentityCoreSchema, jr as localRuntimeContextPlanSchema, jt as atsSpacePostStatusActionSchema, k as daemonHubRegisterSessionRequestSchema, ka as upstreamConversationRefSchema, ki as getSpaceMessageAddressingRelationSupportForTargetKind, kn as daemonHubRuntimeEvidenceIdentityEchoSchema, kr as dispatchExecutionSchema, kt as atsSpaceEgressActionSchema, l as daemonHubDispatchLifecycleRequestSchema, la as profileWorkspaceModeSchema, li as spaceAllowedActionsSchema, ln as runtimeCoordinatorTokenAuthorityScopeSchema, lr as signalTextDataSchema, lt as daemonStreamFrameSchema, m as daemonHubDispatchRuntimeEvidenceRequestSchema, ma as MAX_PROFILE_ID_LENGTH, mi as TARGET_WAKE_LIFECYCLE_IDENTITY_MODEL_VERSION, mn as runtimeCoordinatorTokenProjectionSchema, mr as signalSystemNoticeSchema$1, mt as atsdProviderAccessEvidenceSourceSchema, n as DAEMON_HUB_SCHEMA_VERSION, na as atsRuntimeProfileIdSchema, ni as spaceBriefModeSchema, nn as RUNTIME_COORDINATOR_TOKEN_DIAGNOSTIC_MODEL_VERSION, nr as SPACE_MEMBER_REMOVE_NOTICE_PURPOSE, nt as daemonHubSubmitTaskResultResponseSchema, o as daemonHubDeliverDispatchRequestSchema, oa as profileLabelSchema, oi as resultArchiveModeSchema, on as runtimeCoordinatorExecutionTokenEnvelopeSchema, or as signalStatusSchema, ot as daemonRuntimeContractSchema, p as daemonHubDispatchRuntimeEvidencePhaseSchema, pi as spaceAuthorityOrderSchema, pn as runtimeCoordinatorTokenFingerprintSchema, pr as signalSystemNoticeGeneratedBySchema, pt as atsdProviderAccessEvidenceSchema, q as daemonHubRuntimeCoordinatorHeadNoExecutionRecoveryActionSchema, qi as SPACE_MENTION_LABEL_MAX_LENGTH, qn as AGENT_REPLYING_PURPOSE, qr as runtimeTransportModeSchema, qt as runtimeCoordinatorExecutionEventTypeSchema, r as daemonExecutionCompatibilitySchema, ra as normalizeOptionalWorkingDirectory, ri as spaceContractFieldsSchema, rn as RUNTIME_COORDINATOR_TOKEN_SECRET_FIELD_NAMES, rr as SPACE_MENTION_REJECT_NOTICE_PURPOSE, rt as daemonHubWaitDispatchResultRequestSchema, s as daemonHubDeliverDispatchResponseSchema, sa as profileSchema, si as resultArchivePolicySchema, sn as runtimeCoordinatorExecutionTokenSchema, sr as signalSystemNoticeDataSchema$1, st as daemonStreamCodeSchema, t as CURRENT_DAEMON_EXECUTION_CONTRACT_EPOCH, ta as agentProfileIdSchema, ti as spaceThreadSignalPlacementSchema, tn as RUNTIME_COORDINATOR_TOKEN_AUTHORITY_MODEL_VERSION, tr as SPACE_MEMBER_JOIN_NOTICE_PURPOSE, tt as daemonHubSubmitTaskResultRequestSchema, u as daemonHubDispatchLifecycleSnapshotSchema, ua as uuidProfileIdSchema, ui as spacePublicationModeSchema, un as runtimeCoordinatorTokenDeliveryProvenanceSchema, ur as signalTextReplyToSchema, ut as ATSD_TASK_RESULT_SCHEMA_VERSION, v as daemonHubHeartbeatResponseSchema, va as daemonRouteObservationReasonCodeSchema, vi as clientMessageIdSchema, vn as runtimeCoordinatorTokenValidationHashSchema, vr as spaceStatusSchema, vt as atsdTaskResultOpenClawGatewayVisibilityStatusSchema, w as daemonHubNotifyRouteCatalogChangedRequestSchema, wa as buildUpstreamConversationRef, wi as SPACE_MESSAGE_ADDRESSING_TARGET_KIND_VALUES, wn as providerRuntimeWorkingDirectoryModeSchema, wr as conversationBindingRecordSchema, wt as SPACE_UPDATES_MAX_LIMIT, x as daemonHubLookupOwnerServiceResponseSchema, xa as daemonRouteObservationUnavailableReasonCodeSchema, xi as MESSAGE_MENTION_TYPE_VALUES, xn as providerRuntimeContinuationCapabilitySchema, xr as coreReadinessFactsChangedSchema, xt as atsdTaskResultStatusSchema, y as daemonHubLeaseSchema, ya as daemonRouteObservationStatusSchema, yi as parseOptionalClientMessageId, yn as daemonRuntimeAdapterCapabilitySnapshotSchema, yr as MAX_SIGNAL_REPLY_TO_PREVIEW_LENGTH, yt as atsdTaskResultPayloadSchema, z as daemonHubRuntimeCoordinatorHeadAcceptResponseSchema, zi as spaceMessageAddressingRelationSchema, zn as atsdDispatchReplyToSnapshotSchema, zr as runtimeAgentContextIdMappingSpecSchema, zt as daemonServiceLaneSchema } from \"./daemon-hub-DecCVKaH.js\";\nimport { ATS_SCHEMA_VERSION } from \"./schemas/index.js\";\n\n//#region src/agent-controller-brand.ts\nconst BUILTIN_AGENT_CONTROLLER_BRAND_IDS = [\n\t\"codex\",\n\t\"claude-code\",\n\t\"openclaw\"\n];\nconst BUILTIN_AGENT_CONTROLLER_BRANDS = {\n\t\"claude-code\": {\n\t\taccentHex: \"#d97757\",\n\t\taccentRgb: [\n\t\t\t217,\n\t\t\t119,\n\t\t\t87\n\t\t],\n\t\tcontrollerId: \"claude-code\",\n\t\tselectionMixPercent: 34\n\t},\n\tcodex: {\n\t\taccentHex: \"#869fff\",\n\t\taccentRgb: [\n\t\t\t134,\n\t\t\t159,\n\t\t\t255\n\t\t],\n\t\tcontrollerId: \"codex\",\n\t\tselectionMixPercent: 36\n\t},\n\topenclaw: {\n\t\taccentHex: \"#d43838\",\n\t\taccentRgb: [\n\t\t\t212,\n\t\t\t56,\n\t\t\t56\n\t\t],\n\t\tcontrollerId: \"openclaw\",\n\t\tselectionMixPercent: 32\n\t}\n};\nfunction isBuiltinAgentControllerBrandId(value) {\n\treturn value in BUILTIN_AGENT_CONTROLLER_BRANDS;\n}\nfunction resolveBuiltinAgentControllerBrand(controllerRef) {\n\tif (!controllerRef) return null;\n\tconst controllerId = normalizeBuiltinControllerProviderId(controllerRef);\n\tif (!(controllerId && isBuiltinAgentControllerBrandId(controllerId))) return null;\n\treturn BUILTIN_AGENT_CONTROLLER_BRANDS[controllerId];\n}\n\n//#endregion\n//#region src/agent-recovery-action.ts\nconst agentRecoveryActionLabels = {\n\tchoose_local_agent: \"Choose local agent\",\n\tconnect_ats_service: \"Connect ATS Service\",\n\tconnect_local_agent: \"Connect local agent\",\n\treconnect_ats_service: \"Reconnect ATS Service\",\n\treconnect_local_agent: \"Reconnect local agent\",\n\treview_agent_settings: \"Review agent settings\",\n\tturn_on_local_agent: \"Turn on local agent\",\n\tupdate_ats_service: \"Update ATS Service\",\n\tupdate_ats_skills: \"Update ATS skills\"\n};\nfunction formatAgentRecoveryActionLabel(actionId) {\n\treturn agentRecoveryActionLabels[actionId];\n}\n\n//#endregion\n//#region src/public-agent-failure-reason.ts\nconst CODEX_UPGRADE_REQUIRED_REASON = \"Codex on this device is too old for the current model. Upgrade Codex on this device, then try again.\";\nconst EXACT_PATTERN_PREFIX = \"=\";\nconst PUBLIC_FAILURE_RECOVERY_BY_CODE = [\n\t{\n\t\tbody: \"ATS needs a storage update before this Wake can run. Try again in a moment.\",\n\t\tkind: \"system_retry\",\n\t\tpatterns: [\"dispatch.storage_not_ready\", \"dispatch.storage_unavailable\"],\n\t\trecoveryTarget: null\n\t},\n\t{\n\t\tbody: (targetName) => `${targetName} needs account access before this Wake can reply. Review agent settings and check the provider account for this agent.`,\n\t\tkind: \"account_access\",\n\t\tmappedReasonBody: \"Authentication failed.\",\n\t\tpatterns: [\n\t\t\t\"auth.\",\n\t\t\t\"auth.required\",\n\t\t\t\"credential.\",\n\t\t\t\"login.\"\n\t\t],\n\t\tprimaryActionId: \"review_agent_settings\",\n\t\trecoveryTarget: \"agents\"\n\t},\n\t{\n\t\tbody: (targetName) => `${targetName} needs account access before this Wake can reply. Review agent settings and check the provider account for this agent.`,\n\t\tkind: \"account_access\",\n\t\tmappedReasonBody: \"The current model is not available for this agent's account.\",\n\t\tpatterns: [\"model.unsupported\", \"unsupported_model\"],\n\t\tprimaryActionId: \"review_agent_settings\",\n\t\trecoveryTarget: \"agents\"\n\t},\n\t{\n\t\tbody: (targetName) => `${targetName} needs account access before this Wake can reply. Review agent settings and check the provider account for this agent.`,\n\t\tkind: \"account_access\",\n\t\tmappedReasonBody: \"The agent does not have permission to reply here.\",\n\t\tpatterns: [\"permission.denied.runtime\"],\n\t\tprimaryActionId: \"review_agent_settings\",\n\t\trecoveryTarget: \"agents\"\n\t},\n\t{\n\t\tbody: (targetName) => `${targetName} needs account access before this Wake can reply. Review agent settings and check the provider account for this agent.`,\n\t\tkind: \"account_access\",\n\t\tmappedReasonBody: \"The agent hit a rate limit.\",\n\t\tpatterns: [\"quota.\", \"rate_limit.\"],\n\t\tprimaryActionId: \"review_agent_settings\",\n\t\trecoveryTarget: \"agents\"\n\t},\n\t{\n\t\tbody: (targetName) => `${targetName} needs account access before this Wake can reply. Review agent settings and check the provider account for this agent.`,\n\t\tkind: \"account_access\",\n\t\tpatterns: [\"provider_account.\"],\n\t\tprimaryActionId: \"review_agent_settings\",\n\t\trecoveryTarget: \"agents\"\n\t},\n\t{\n\t\tbody: (targetName) => `${targetName} is connected to a different ATS account. Sign in with the correct ATS account, then run setup again.`,\n\t\tkind: \"local_agent_connection\",\n\t\tpatterns: [\n\t\t\t\"agent_profile_binding.owner_mismatch\",\n\t\t\t\"claim_eligibility.binding_owner_mismatch\",\n\t\t\t\"claim_eligibility.owner_mismatch\",\n\t\t\t\"dispatch.claim_eligibility.binding.owner_mismatch\"\n\t\t],\n\t\tprimaryActionId: \"review_agent_settings\",\n\t\trecoveryTarget: \"agents\"\n\t},\n\t{\n\t\tbody: (targetName) => `${targetName} is connected to an older computer setup. Update setup on this computer, then try again.`,\n\t\tkind: \"local_agent_prepare\",\n\t\tpatterns: [\n\t\t\t\"claim_eligibility.binding_runtime_mismatch\",\n\t\t\t\"claim_eligibility.runtime_id_missing\",\n\t\t\t\"claim_eligibility.runtime_id_mismatch\",\n\t\t\t\"claim_eligibility.runtime_id_not_opaque\",\n\t\t\t\"claim_eligibility.runtime_identity_invalid\",\n\t\t\t\"claim_eligibility.runtime_missing\",\n\t\t\t\"claim_eligibility.runtime_unavailable\",\n\t\t\t\"claim_eligibility.runtime_capability_unknown\",\n\t\t\t\"claim_eligibility.runtime_capability_missing\",\n\t\t\t\"claim_eligibility.runtime_capability_stale\",\n\t\t\t\"claim_eligibility.runtime_capability_disabled\",\n\t\t\t\"claim_eligibility.runtime_capability_unavailable\"\n\t\t],\n\t\tprimaryActionId: \"connect_local_agent\",\n\t\trecoveryTarget: \"prepare_setup\"\n\t},\n\t{\n\t\tbody: (targetName) => `${targetName} is connected to a different local agent setup. Update setup on this computer, then try again.`,\n\t\tkind: \"local_agent_prepare\",\n\t\tpatterns: [\"claim_eligibility.binding_capability_mismatch\"],\n\t\tprimaryActionId: \"connect_local_agent\",\n\t\trecoveryTarget: \"prepare_setup\"\n\t},\n\t{\n\t\tbody: (targetName) => `${targetName} is in this space, but ATS cannot tell which local agent should reply for it yet.`,\n\t\tkind: \"local_agent_connection\",\n\t\tmappedReasonBody: \"This agent needs setup before it can reply.\",\n\t\tpatterns: [\n\t\t\t\"agent_profile_binding.missing\",\n\t\t\t\"claim_eligibility.binding_missing\",\n\t\t\t\"claim_eligibility.binding_disabled\",\n\t\t\t\"claim_eligibility.binding_not_routable\",\n\t\t\t\"dispatch.claim_eligibility.blocked\",\n\t\t\t\"dispatch.claim_eligibility.binding.disabled_historical\",\n\t\t\t\"dispatch.claim_eligibility.binding.enabled_primary\",\n\t\t\t\"dispatch.claim_eligibility.binding.missing\",\n\t\t\t\"profile.unbound\"\n\t\t],\n\t\tprimaryActionId: \"choose_local_agent\",\n\t\trecoveryTarget: \"agents\"\n\t},\n\t{\n\t\tbody: (targetName) => `${targetName} has a conflicting reply connection. Wait a moment, then run setup again if the issue continues.`,\n\t\tkind: \"local_agent_prepare\",\n\t\tpatterns: [\n\t\t\t\"claim_eligibility.binding_conflict\",\n\t\t\t\"claim_eligibility.lease_conflict\",\n\t\t\t\"claim_eligibility.runtime_conflict\",\n\t\t\t\"dispatch.claim_eligibility.binding.conflict\"\n\t\t],\n\t\tprimaryActionId: \"connect_local_agent\",\n\t\trecoveryTarget: \"prepare_setup\"\n\t},\n\t{\n\t\tbody: \"ATS could not verify permission to run this agent. Sign in again, then try once more.\",\n\t\tkind: \"account_access\",\n\t\tpatterns: [\"claim_eligibility.caller_not_allowed\", \"claim_eligibility.not_read_after_caller_authorization_failed\"],\n\t\tprimaryActionId: \"review_agent_settings\",\n\t\trecoveryTarget: \"agents\"\n\t},\n\t{\n\t\tbody: \"This Wake request is no longer active. Send a new message and wake the agent again.\",\n\t\tkind: \"system_retry\",\n\t\tpatterns: [\n\t\t\t\"claim_eligibility.non_wake_relation_not_dispatchable\",\n\t\t\t\"claim_eligibility.dispatch_evidence_missing\",\n\t\t\t\"claim_eligibility.dispatch_evidence_stale\",\n\t\t\t\"claim_eligibility.dispatch_missing\",\n\t\t\t\"claim_eligibility.dispatch_terminal\",\n\t\t\t\"claim_eligibility.wake_not_allowed_at_creation\",\n\t\t\t\"claim_eligibility.wake_no_longer_allowed_by_policy\",\n\t\t\t\"claim_eligibility.space_liveness_missing\",\n\t\t\t\"claim_eligibility.space_liveness_stale\",\n\t\t\t\"claim_eligibility.policy_version_mismatch\"\n\t\t],\n\t\trecoveryTarget: null\n\t},\n\t{\n\t\tbody: \"This agent is no longer available in this space. Add the agent to the space, then try again.\",\n\t\tkind: \"local_agent_connection\",\n\t\tpatterns: [\"claim_eligibility.target_no_longer_member\", \"claim_eligibility.target_not_claimable_agent_member\"],\n\t\tprimaryActionId: \"review_agent_settings\",\n\t\trecoveryTarget: \"agents\"\n\t},\n\t{\n\t\tbody: (targetName) => `This Wake expired before it reached ${formatObjectTargetName(targetName)}. Start or reconnect ATS Service, then wake the agent again.`,\n\t\tkind: \"local_service\",\n\t\tpatterns: [\"runtime_coordinator.delivery_expired\"],\n\t\tprimaryActionId: \"reconnect_ats_service\",\n\t\trecoveryTarget: \"prepare_setup\"\n\t},\n\t{\n\t\tbody: (targetName) => `ATS could not start ${formatObjectTargetName(targetName)} in time. Start or reconnect ATS Service, then wake the agent again.`,\n\t\tkind: \"local_service\",\n\t\tpatterns: [\"daemon.delivery.start_timeout\", \"delivery.start_timeout\"],\n\t\tprimaryActionId: \"reconnect_ats_service\",\n\t\trecoveryTarget: \"prepare_setup\"\n\t},\n\t{\n\t\tbody: (targetName) => `${targetName} stopped making progress on this Wake. Reconnect ATS Service before trying again.`,\n\t\tkind: \"local_service\",\n\t\tpatterns: [\"daemon.delivery.execution_stalled\", \"runtime.progress_stale\"],\n\t\tprimaryActionId: \"reconnect_ats_service\",\n\t\trecoveryTarget: \"prepare_setup\"\n\t},\n\t{\n\t\tbody: (targetName) => `ATS received progress from ${formatObjectTargetName(targetName)}, but could not finish the final result in time.`,\n\t\tkind: \"local_service\",\n\t\tpatterns: [\"daemon.delivery.finalization_timeout\", \"delivery.result_timeout\"],\n\t\tprimaryActionId: \"reconnect_ats_service\",\n\t\trecoveryTarget: \"prepare_setup\"\n\t},\n\t{\n\t\tbody: (targetName) => `${targetName} took too long to finish this Wake. Reconnect ATS Service before trying again.`,\n\t\tkind: \"local_service\",\n\t\tpatterns: [\n\t\t\t\"daemon.delivery.timeout\",\n\t\t\t\"local_adapter.timeout\",\n\t\t\t\"timed_out_after_output\",\n\t\t\t\"timed_out_no_output\",\n\t\t\t\"=timeout\"\n\t\t],\n\t\tprimaryActionId: \"reconnect_ats_service\",\n\t\trecoveryTarget: \"prepare_setup\"\n\t},\n\t{\n\t\tbody: \"ATS Service must be updated before this computer can receive local Wake work.\",\n\t\tkind: \"local_service\",\n\t\tpatterns: [\n\t\t\t\"background_helper.installed_outdated\",\n\t\t\t\"background_helper.update_required\",\n\t\t\t\"service.update_required\"\n\t\t],\n\t\tprimaryActionId: \"update_ats_service\",\n\t\trecoveryTarget: \"prepare_setup\"\n\t},\n\t{\n\t\tbody: \"ATS Service is not installed on this computer.\",\n\t\tkind: \"local_service\",\n\t\tpatterns: [\"background_helper.not_installed\", \"service.not_installed\"],\n\t\tprimaryActionId: \"connect_ats_service\",\n\t\trecoveryTarget: \"prepare_setup\"\n\t},\n\t{\n\t\tbody: (targetName) => `ATS could not reach ${formatObjectTargetName(targetName)} on this computer for this Wake. Reconnect ATS Service, then try again.`,\n\t\tkind: \"local_service\",\n\t\tpatterns: [\n\t\t\t\"daemon.profile.offline\",\n\t\t\t\"daemon.session.not_found\",\n\t\t\t\"local_service.\",\n\t\t\t\"route.\",\n\t\t\t\"service.\",\n\t\t\t\"service.not_running\"\n\t\t],\n\t\tprimaryActionId: \"reconnect_ats_service\",\n\t\trecoveryTarget: \"prepare_setup\"\n\t},\n\t{\n\t\tbody: (targetName) => `${targetName} replied, but not with a valid Space reply action.`,\n\t\tkind: \"local_agent_prepare\",\n\t\tpatterns: [\n\t\t\t\"ats.space_action.repair_failed\",\n\t\t\t\"runtime.reply.empty_output\",\n\t\t\t\"runtime.reply.metadata_missing.agent_context_id\",\n\t\t\t\"runtime.reply.metadata_missing.controller_ref\"\n\t\t],\n\t\tprimaryActionId: \"connect_local_agent\",\n\t\trecoveryTarget: \"prepare_setup\"\n\t},\n\t{\n\t\tbody: \"ATS found more than one working install for this agent on this device. Choose which one ATS should use here, then try again.\",\n\t\tkind: \"local_agent_prepare\",\n\t\tpatterns: [\"controller.launch.choice_required\", \"launch choice\"],\n\t\tprimaryActionId: \"connect_local_agent\",\n\t\trecoveryTarget: \"prepare_setup\"\n\t},\n\t{\n\t\tbody: \"This agent is missing its local workspace on this device. Run `ats doctor --repair`, then `ats setup --profile <agent-profile-id>`, and try again.\",\n\t\tkind: \"local_agent_prepare\",\n\t\tpatterns: [\"workspace.missing\", \"profile.workspace.missing\"],\n\t\tprimaryActionId: \"connect_local_agent\",\n\t\trecoveryTarget: \"prepare_setup\"\n\t},\n\t{\n\t\tbody: \"This agent's local workspace is broken on this device. Run `ats doctor --repair`, then `ats setup --profile <agent-profile-id>`, and try again.\",\n\t\tkind: \"local_agent_prepare\",\n\t\tpatterns: [\"workspace.invalid\", \"profile.workspace.invalid\"],\n\t\tprimaryActionId: \"connect_local_agent\",\n\t\trecoveryTarget: \"prepare_setup\"\n\t},\n\t{\n\t\tbody: CODEX_UPGRADE_REQUIRED_REASON,\n\t\tkind: \"local_agent_prepare\",\n\t\tpatterns: [\"controller.client.upgrade_required\"],\n\t\tprimaryActionId: \"connect_local_agent\",\n\t\trecoveryTarget: \"prepare_setup\"\n\t},\n\t{\n\t\tbody: \"This local agent is not available on this device. Connect a local agent, then try again.\",\n\t\tkind: \"local_agent_prepare\",\n\t\tpatterns: [\"controller.runtime.missing\"],\n\t\tprimaryActionId: \"connect_local_agent\",\n\t\trecoveryTarget: \"prepare_setup\"\n\t},\n\t{\n\t\tbody: (targetName) => `${targetName} could not start on this device. Repair it on this device, then try again.`,\n\t\tkind: \"local_agent_prepare\",\n\t\tpatterns: [\"controller.launch.needs_repair\"],\n\t\tprimaryActionId: \"connect_local_agent\",\n\t\trecoveryTarget: \"prepare_setup\"\n\t},\n\t{\n\t\tbody: \"Authentication failed.\",\n\t\tkind: \"account_access\",\n\t\tpatterns: [\n\t\t\t\"auth\",\n\t\t\t\"credential\",\n\t\t\t\"login\"\n\t\t],\n\t\tprimaryActionId: \"review_agent_settings\",\n\t\trecoveryTarget: \"agents\"\n\t},\n\t{\n\t\tbody: \"The current model is not available for this agent's account.\",\n\t\tkind: \"account_access\",\n\t\tpatterns: [\"model.unsupported\", \"unsupported_model\"],\n\t\tprimaryActionId: \"review_agent_settings\",\n\t\trecoveryTarget: \"agents\"\n\t},\n\t{\n\t\tbody: \"The agent hit a rate limit.\",\n\t\tkind: \"account_access\",\n\t\tpatterns: [\"quota\", \"rate\"],\n\t\tprimaryActionId: \"review_agent_settings\",\n\t\trecoveryTarget: \"agents\"\n\t},\n\t{\n\t\tbody: \"The agent does not have permission to reply here.\",\n\t\tkind: \"account_access\",\n\t\tpatterns: [\n\t\t\t\"forbidden\",\n\t\t\t\"permission\",\n\t\t\t\"unauthorized\"\n\t\t],\n\t\tprimaryActionId: \"review_agent_settings\",\n\t\trecoveryTarget: \"agents\"\n\t},\n\t{\n\t\tbody: \"The agent could not complete this reply right now.\",\n\t\tkind: \"unknown\",\n\t\tpatterns: [\n\t\t\t\"network\",\n\t\t\t\"provider\",\n\t\t\t\"unavailable\",\n\t\t\t\"upstream\"\n\t\t],\n\t\tprimaryActionId: \"review_agent_settings\",\n\t\trecoveryTarget: \"agents\"\n\t}\n];\nfunction resolvePublicAgentFailureRecovery(input) {\n\tconst normalizedErrorCode = normalizeOptionalText(input.errorCode)?.toLowerCase();\n\tif (!normalizedErrorCode) return null;\n\tconst targetName = normalizeOptionalText(input.targetLabel) ?? \"This agent\";\n\tconst mapping = PUBLIC_FAILURE_RECOVERY_BY_CODE.find((candidate) => candidate.patterns.some((pattern) => matchesPublicFailureReasonPattern(normalizedErrorCode, pattern))) ?? null;\n\tif (!mapping) return input.includeUnknown === false ? null : {\n\t\tbody: `${targetName} could not reply to this Wake. Review agent settings before trying again.`,\n\t\tkind: \"unknown\",\n\t\tprimaryActionId: \"review_agent_settings\",\n\t\tprimaryActionLabel: formatAgentRecoveryActionLabel(\"review_agent_settings\"),\n\t\trecoveryTarget: \"agents\"\n\t};\n\tconst body = resolvePublicAgentFailureBody(mapping.body, targetName);\n\tif (mapping.recoveryTarget === null) return {\n\t\tbody,\n\t\tkind: \"system_retry\",\n\t\trecoveryTarget: null\n\t};\n\treturn {\n\t\tbody,\n\t\tkind: mapping.kind,\n\t\tprimaryActionId: mapping.primaryActionId,\n\t\tprimaryActionLabel: formatAgentRecoveryActionLabel(mapping.primaryActionId),\n\t\trecoveryTarget: mapping.recoveryTarget\n\t};\n}\nfunction resolveMappedPublicAgentFailureReason(errorCode) {\n\tconst normalizedErrorCode = normalizeOptionalText(errorCode)?.toLowerCase();\n\tif (!normalizedErrorCode) return null;\n\tconst mapping = PUBLIC_FAILURE_RECOVERY_BY_CODE.find((candidate) => candidate.patterns.some((pattern) => matchesPublicFailureReasonPattern(normalizedErrorCode, pattern))) ?? null;\n\tif (!mapping) return null;\n\treturn resolvePublicAgentFailureBody(mapping.mappedReasonBody ?? mapping.body, \"This agent\");\n}\nfunction normalizeOptionalText(value) {\n\tconst normalized = typeof value === \"string\" ? value.trim() : \"\";\n\treturn normalized.length > 0 ? normalized : null;\n}\nfunction formatObjectTargetName(targetName) {\n\treturn targetName === \"This agent\" ? \"this agent\" : targetName;\n}\nfunction matchesPublicFailureReasonPattern(normalizedErrorCode, pattern) {\n\tif (pattern.startsWith(EXACT_PATTERN_PREFIX)) return normalizedErrorCode === pattern.slice(1);\n\treturn normalizedErrorCode.includes(pattern);\n}\nfunction resolvePublicAgentFailureBody(body, targetName) {\n\treturn typeof body === \"function\" ? body(targetName) : body;\n}\n\n//#endregion\nexport { AGENT_EXECUTION_READINESS_IMPACT_CLEARING_TRIGGERS, AGENT_EXECUTION_READINESS_IMPACT_EFFECTS, AGENT_EXECUTION_READINESS_IMPACT_FRESH_TTL_MS, AGENT_EXECUTION_READINESS_IMPACT_KINDS, AGENT_EXECUTION_READINESS_IMPACT_REASON_CODES, AGENT_EXECUTION_READINESS_IMPACT_REASON_CODE_ALIASES, AGENT_EXECUTION_READINESS_IMPACT_SCOPES, AGENT_EXECUTION_READINESS_IMPACT_SOURCES, AGENT_EXECUTION_READINESS_IMPACT_TAXONOMY, AGENT_REPLYING_END_PURPOSE, AGENT_REPLYING_PURPOSE, AGENT_REPLY_FINAL_PURPOSE, AGENT_REPLY_PREVIEW_END_PURPOSE, AGENT_REPLY_PREVIEW_PURPOSE, ATSD_CONTROL_PLANE_SCHEMA_VERSION, ATSD_DISPATCH_CONTRACT_VERSION, ATSD_DISPATCH_QUEUE_SCHEMA_VERSION, ATSD_MENTION_DISPATCH_RESULT_SCHEMA_VERSION, ATSD_TASK_RESULT_SCHEMA_VERSION, ATS_SCHEMA_VERSION, BUILTIN_AGENT_CONTROLLER_BRANDS, BUILTIN_AGENT_CONTROLLER_BRAND_IDS, BUILTIN_PROVIDER_ALLOWS_DISTINCT_AGENT_CONTEXT_ID, BUILTIN_PROVIDER_CONVERSATION_CAPABILITY_BY_PROVIDER, BUILTIN_UPSTREAM_CONVERSATION_REF_KIND_BY_PROVIDER, CODEX_UPGRADE_REQUIRED_REASON, CONVERSATION_CONTINUITY_WARNING_PURPOSE, CORE_READINESS_FACTS_CHANGED_MARKER_KIND, CURRENT_DAEMON_EXECUTION_CONTRACT_EPOCH, DAEMON_HUB_SCHEMA_VERSION, DAEMON_PROFILE_SKIP_REASON_VALUES, DAEMON_RUNTIME_LEASE_SCHEMA_VERSION, DAEMON_SERVICE_CONTRACT_SCHEMA_VERSION, DB_FACT_SCHEMA_VERSION, DISPATCH_ACTIVITY_DISPATCHING_PURPOSE, DISPATCH_ACTIVITY_FAILED_PURPOSE, DISPATCH_ACTIVITY_RETRYING_PURPOSE, KNOWN_FINAL_FAILURE_REASON_CODES_WITHOUT_READINESS_IMPACT, LEGACY_RUNTIME_DISPATCH_POLICY, LOCAL_COMPONENTS_SCHEMA_VERSION, MAX_PROFILE_HANDLE_LENGTH, MAX_PROFILE_ID_LENGTH, MAX_PROFILE_NAME_LENGTH, MAX_PROFILE_WORKING_DIRECTORY_LENGTH, MAX_SIGNAL_REPLY_TO_PREVIEW_LENGTH, MAX_SPACE_NAME_LENGTH, MAX_TEXT_LENGTH, MENTION_DISPATCH_ERROR_CODES, MESSAGE_ENVELOPE_TARGET_FIELD_VALUES, MESSAGE_MENTION_TYPE_VALUES, OBSERVABILITY_CLOUDFLARE_ANALYTICS_BLOBS, OBSERVABILITY_CLOUDFLARE_ANALYTICS_DOUBLES, OBSERVABILITY_CLOUDFLARE_RUNTIME_EVENT_MODEL_VERSION, OBSERVABILITY_WAKE_CORRELATION_MODEL_VERSION, REPLY_READINESS_LEVEL_VALUES, REPLY_READINESS_REASON_CODE_VALUES, RUNTIME_COORDINATOR_CREATION_DIAGNOSTIC_MODEL_VERSION, RUNTIME_COORDINATOR_EXECUTION_MODEL_VERSION, RUNTIME_COORDINATOR_EXECUTION_TOKEN_MODEL_VERSION, RUNTIME_COORDINATOR_EXECUTION_TOKEN_REDACTION_MARKER, RUNTIME_COORDINATOR_FAILURE_PUBLICATION_COMMAND_MODEL_VERSION, RUNTIME_COORDINATOR_FINALIZATION_COMMAND_MODEL_VERSION, RUNTIME_COORDINATOR_RETIRED_TOKEN_REASON_CODE_BY_STATUS, RUNTIME_COORDINATOR_TOKEN_AUTHORITY_MODEL_VERSION, RUNTIME_COORDINATOR_TOKEN_DIAGNOSTIC_MODEL_VERSION, RUNTIME_COORDINATOR_TOKEN_SECRET_FIELD_NAMES, RUNTIME_EXECUTION_IDENTITY_MODEL_VERSION, SPACE_DISPATCH_TRACE_PROMPT_PREVIEW_MAX_CHARS, SPACE_MEMBER_JOIN_NOTICE_PURPOSE, SPACE_MEMBER_REMOVE_NOTICE_PURPOSE, SPACE_MENTION_LABEL_MAX_LENGTH, SPACE_MENTION_LABEL_SOURCE_VALUES, SPACE_MENTION_REJECT_NOTICE_PURPOSE, SPACE_MESSAGE_ADDRESSING_RELATION_VALUES, SPACE_MESSAGE_ADDRESSING_TARGET_FIELD_VALUES, SPACE_MESSAGE_ADDRESSING_TARGET_KIND_VALUES, SPACE_PASSWORD_MIN_LENGTH, SPACE_SIGNAL_AUTHORING_POLICY_REQUIRED_ERROR_CODE, SPACE_SIGNAL_AUTHORING_POLICY_REQUIRED_MESSAGE, SPACE_UPDATES_DEFAULT_LIMIT, SPACE_UPDATES_MAX_LIMIT, SPACE_WAKE_CLIENT_MESSAGE_ID_REQUIRED_ERROR_CODE, SPACE_WAKE_CLIENT_MESSAGE_ID_REQUIRED_MESSAGE, STRUCTURED_GUIDE_SCHEMA_VERSION, TARGET_WAKE_LIFECYCLE_IDENTITY_MODEL_VERSION, WAKE_TRACE_WATERFALL_STEP_NAMES, agentContextResolutionSchema, agentExecutionReadinessImpactClearingTriggerSchema, agentExecutionReadinessImpactEffectSchema, agentExecutionReadinessImpactKindSchema, agentExecutionReadinessImpactReasonCodeSchema, agentExecutionReadinessImpactScopeSchema, agentExecutionReadinessImpactSourceSchema, agentExecutionReadinessPrimaryActionPlanSchema, agentExecutionReadinessPrimaryActionSchema, agentExecutionReadinessRouteParamsSchema, agentExecutionReadinessSchema, agentExecutionReadinessTargetRuntimeSchema, agentProfileBindingAuthoritySourceSchema, agentProfileBindingDispatchEligibilitySchema, agentProfileBindingProjectionSchema, agentProfileBindingResolutionSourceSchema, agentProfileBindingRouteParamsSchema, agentProfileBindingRuntimeCapabilitySchema, agentProfileBindingRuntimeIdSchema, agentProfileBindingStateSchema, agentProfileBindingWriteModeSchema, agentProfileIdSchema, agentRecoveryActionLabels, areBuiltinControllerRefsEquivalent, atsActorContextSchema, atsProfileIdSchema, atsRequestContextSchema, atsRuntimeProfileIdSchema, atsSpaceActionReadResultBySchema, atsSpaceActionReadUpdatesFromSchema, atsSpaceActionReplyToSchema, atsSpaceActionSchema, atsSpaceEgressActionSchema, atsSpacePostMessageActionSchema, atsSpacePostStatusActionSchema, atsSpaceReadResultActionSchema, atsSpaceReadUpdatesActionSchema, atsSpaceStaySilentActionSchema, atsdCancelPayloadSchema, atsdCancelRequestPayloadSchema, atsdCancelResponseSchema, atsdClearImportedUpstreamConversationLocalStatePayloadSchema, atsdClearImportedUpstreamConversationLocalStateRequestPayloadSchema, atsdClearImportedUpstreamConversationLocalStateResponseSchema, atsdControlPlaneCommandSchema, atsdControlPlaneErrorPayloadSchema, atsdControlPlaneErrorResponseSchema, atsdControlPlaneRequestSchema, atsdControlPlaneResponseSchema, atsdControlTargetSelectorSchema, atsdConversationExecutionControllerKindSchema, atsdConversationExecutionControllerLaunchStatusSchema, atsdConversationExecutionRuntimeWorkspaceInvalidSchema, atsdConversationExecutionRuntimeWorkspaceMissingSchema, atsdConversationExecutionRuntimeWorkspaceReadySchema, atsdConversationExecutionRuntimeWorkspaceSchema, atsdConversationExecutionStatusPayloadSchema, atsdConversationExecutionStatusRequestPayloadSchema, atsdConversationExecutionStatusResponseSchema, atsdDispatchContinuitySnapshotSchema, atsdDispatchQueueIngressSchema, atsdDispatchQueueLegacyMessageSchemaV1, atsdDispatchQueueMessageSchema, atsdDispatchReplyToSnapshotSchema, atsdHealthPayloadSchema, atsdHealthResponseSchema, atsdHealthStateSchema, atsdHistoryEntrySchema, atsdHistoryPayloadSchema, atsdHistoryResponseSchema, atsdInterruptPayloadSchema, atsdInterruptRequestPayloadSchema, atsdInterruptResponseSchema, atsdMentionDispatchResultEnvelopeSchema, atsdMentionDispatchResultPayloadSchema, atsdMentionDispatchRuleSourceSchema, atsdMentionDispatchStatusSchema, atsdProviderAccessEvidenceProviderSchema, atsdProviderAccessEvidenceReasonCodeSchema, atsdProviderAccessEvidenceSchema, atsdProviderAccessEvidenceSourceSchema, atsdRuntimeHealthStateSchema, atsdShutdownPayloadSchema, atsdShutdownRequestPayloadSchema, atsdShutdownResponseSchema, atsdStatusPayloadSchema, atsdStatusResponseSchema, atsdTaskResultEnvelopeSchema, atsdTaskResultEnvelopeWriteSchema, atsdTaskResultErrorTypeSchema, atsdTaskResultOpenClawGatewayVisibilityStatusSchema, atsdTaskResultPayloadSchema, atsdTaskResultSpaceActionProvenanceSchema, atsdTaskResultStatusSchema, atsdTaskResultTelemetrySchema, authProfileKindSchema, authProfileStatusSchema, authProfileViewSchema, bootstrapTemplateFactsSchema, buildControllerRoutingKeyForKind, buildMentionDispatchResultEnvelope, buildRuntimeCoordinatorExecutionEventId, buildRuntimeCoordinatorExecutionId, buildRuntimeCoordinatorFailurePublicationCommandId, buildRuntimeCoordinatorFinalizationCommandId, buildTargetWakeLifecycleId, buildUpstreamConversationRef, builtinProviderAllowsDistinctAgentContextId, canonicalMentionLiteralSchema, canonicalMentionTextFragmentSchema, canonicalizeBuiltinControllerRef, canonicalizeControllerRefForKind, catchupResponseSchema, claimExecutionDiagnosticsClaimLeaseSchema, claimExecutionDiagnosticsDispatchSchema, claimExecutionDiagnosticsQuerySchema, claimExecutionDiagnosticsResponseSchema, claimExecutionDiagnosticsResultSchema, clientMessageIdSchema, collectCanonicalMentionTextFragments, commonErrorSchema, continuitySchema, conversationBindingObservedStateSchema, conversationBindingRecordSchema, conversationBindingSourceSchema, conversationBootstrapReasonSchema, conversationBootstrapSchema, conversationExecutionStateSchema, conversationPolicySchema, coreReadinessFactsChangedSchema, createAgentProfileBodySchema, createAgentProfileResponseSchema, createDaemonRouteObservationSummary, createHumanProfileBodySchema, createHumanProfileResponseSchema, createPrepareSessionRequestSchema, createPrepareSessionResponseSchema, createSpaceBodySchema, createSpaceDiagnosticReportBodySchema, createSpaceDiagnosticReportResponseSchema, createSpaceDiagnosticReportRouteParamsSchema, createSpacePasswordBodySchema, createSpaceResponseSchema, createSpaceThreadBodySchema, createSpaceThreadResponseSchema, createStartSessionBodySchema, currentDeviceTargetActivationSourceSchema, currentDeviceTargetDeviceIdSchema, currentDeviceTargetMissingSchema, currentDeviceTargetResolvedSchema, currentDeviceTargetResponseSchema, currentLocalRuntimeReplyReadinessResponseSchema, daemonBootstrapAutoInstallModeSchema, daemonBootstrapRecommendationPayloadSchema, daemonBootstrapRecommendationResultSchema, daemonExecutionCompatibilitySchema, daemonHubCapabilitiesSchema, daemonHubDeliverDispatchPayloadSchema, daemonHubDeliverDispatchRequestSchema, daemonHubDeliverDispatchResponseSchema, daemonHubDeliveryExecutionIdentitySchema, daemonHubDispatchLifecyclePhaseSchema, daemonHubDispatchLifecycleRequestSchema, daemonHubDispatchLifecycleSnapshotSchema, daemonHubDispatchPreviewEndRequestSchema, daemonHubDispatchPreviewRequestSchema, daemonHubDispatchRuntimeEvidencePhaseSchema, daemonHubDispatchRuntimeEvidenceRequestSchema, daemonHubDispatchSourceSignalSchema, daemonHubErrorCodeSchema, daemonHubHeartbeatRequestSchema, daemonHubHeartbeatResponseSchema, daemonHubLeaseSchema, daemonHubLookupOwnerServiceRequestSchema, daemonHubLookupOwnerServiceResponseSchema, daemonHubLookupRouteRequestSchema, daemonHubLookupRouteResponseSchema, daemonHubNotifyRouteCatalogChangedRequestSchema, daemonHubNotifyRouteCatalogChangedResponseSchema, daemonHubPreExecutionHandoffReasonCodeSchema, daemonHubPreExecutionHandoffRequestSchema, daemonHubPreExecutionHandoffResponseSchema, daemonHubRegisterSessionRequestSchema, daemonHubRegisterSessionResponseSchema, daemonHubResultIdentityEchoSchema, daemonHubRouteCatalogChangedFramePayloadSchema, daemonHubRouteCatalogChangedReasonSchema, daemonHubRuntimeCoordinatorDecisionEventKindSchema, daemonHubRuntimeCoordinatorDecisionRequestSchema, daemonHubRuntimeCoordinatorDecisionResponseSchema, daemonHubRuntimeCoordinatorDecisionTriggerSchema, daemonHubRuntimeCoordinatorHeadAcceptActionSchema, daemonHubRuntimeCoordinatorHeadAcceptRequestSchema, daemonHubRuntimeCoordinatorHeadAcceptResponseSchema, daemonHubRuntimeCoordinatorHeadLifecycleStatusSchema, daemonHubRuntimeCoordinatorHeadLifecycleTraceRecordSchema, daemonHubRuntimeCoordinatorHeadLifecycleTraceRequestSchema, daemonHubRuntimeCoordinatorHeadLifecycleTraceResponseSchema, daemonHubRuntimeCoordinatorHeadNoExecutionDecisionSourceSchema, daemonHubRuntimeCoordinatorHeadNoExecutionPublicationCategorySchema, daemonHubRuntimeCoordinatorHeadNoExecutionReasonCodeSchema, daemonHubRuntimeCoordinatorHeadNoExecutionRecoveryActionSchema, daemonHubRuntimeCoordinatorHeadNoExecutionRequestSchema, daemonHubRuntimeCoordinatorHeadNoExecutionResponseSchema, daemonHubRuntimeCoordinatorHeadWaitingCategorySchema, daemonHubRuntimeCoordinatorHeadWaitingReasonCodeSchema, daemonHubRuntimeCoordinatorHeadWaitingRecoveryActionSchema, daemonHubRuntimeCoordinatorHeadWaitingRequestSchema, daemonHubRuntimeCoordinatorHeadWaitingResponseSchema, daemonHubRuntimeEvidenceIdentityEchoSchema, daemonHubSubmitTaskResultRequestSchema, daemonHubSubmitTaskResultResponseSchema, daemonHubWaitDispatchResultRequestSchema, daemonHubWaitDispatchResultResponseSchema, daemonProfileSkipReasonSchema, daemonRouteObservationReasonCodeSchema, daemonRouteObservationResponseSchema, daemonRouteObservationStatusSchema, daemonRouteObservationSummarySchema, daemonRouteObservationUnavailableReasonCodeSchema, daemonRuntimeAdapterCapabilitySnapshotSchema, daemonRuntimeContractReasonCodeSchema, daemonRuntimeContractSchema, daemonRuntimeLeaseModeSchema, daemonRuntimeLeaseSchema, daemonServiceContractSchema, daemonServiceControllerSchema, daemonServiceDesiredStateSchema, daemonServiceLaneSchema, daemonStreamCodeSchema, daemonStreamErrorFrameSchema, daemonStreamFrameSchema, dbCommandFactSummarySchema, dbDebtRegistryItemSchema, dbDiagnosticsPayloadSchema, dbFactModeSchema, dbFactPhaseSchema, dbFactResultSchema, dbFactSnapshotSchema, dbFactSourceSchema, dbFactSubjectSchema, dbFactTargetSchema, dbInspectionCheckSchema, dbInspectionCheckStatusSchema, dbInspectionModeSchema, dbInspectionResultSchema, dbInspectionSummarySchema, deleteProfileResponseSchema, deleteSpaceResponseSchema, dispatchBriefSchema, dispatchExecutionSchema, dispatchResultKindSchema, dispatchResultPublicOutcomeSchema, dispatchResultSchema, dispatchStorageReadinessSchema, dualViewGuideInputSchema, ensureAgentProfilePrimaryBindingBodySchema, ensureAgentProfilePrimaryBindingResponseSchema, entryBriefSchema, errorResponseSchema, forgetComputerResponseSchema, forgetComputerRouteParamsSchema, forgetCurrentComputerResponseSchema, forgetCurrentComputerStatusSchema, formatAgentRecoveryActionLabel, formatCanonicalMentionLiteral, formatLocalComponentsSummaryDescription, formatLocalComponentsSummaryLabel, formatLocalSetupActionDescription, formatLocalSetupActionLabel, gatewayErrorCodeSchema, gatewayErrorEnvelopeSchema, getAgentExecutionReadinessBatchBodySchema, getAgentExecutionReadinessBatchResponseSchema, getAgentExecutionReadinessResponseSchema, getAgentProfilePrimaryBindingResponseSchema, getPrepareReadinessQuerySchema, getPrepareReadinessResponseSchema, getSpaceContractResponseSchema, getSpaceConversationRemoteStatusInputSchema, getSpaceConversationRemoteStatusResponseSchema, getSpaceConversationStatusInputSchema, getSpaceConversationStatusResponseSchema, getSpaceDispatchLookupInputSchema, getSpaceDispatchLookupResponseSchema, getSpaceDispatchResultInputSchema, getSpaceDispatchResultResponseSchema, getSpaceMessageAddressingRelationSupportForTargetKind, getSpaceMetaResponseSchema, getSpaceStatusInputSchema, getSpaceStatusResponseSchema, getSpaceThreadResponseSchema, getSpaceUpdatesInputSchema, getSpaceUpdatesResponseSchema, getSpaceWakeProgressInputSchema, getSpaceWakeProgressResponseSchema, getSpaceWakeTraceWaterfallInputSchema, getSpaceWakeTraceWaterfallResponseSchema, hasSpaceSignalWakeActivationTarget, helloAckSchema, helloSchema, incomingServerMessageSchema, installedLocalComponentsSnapshotSchema, isAgentExecutionReadinessImpactReasonCode, isBuiltinAgentControllerBrandId, isExplicitBuiltinControllerRef, isKnownFinalFailureReasonCodeWithoutReadinessImpact, isSpaceMessageAddressingRelationSupportedForTargetKind, joinWaitlistBodySchema, joinWaitlistResponseSchema, leaveSpaceResponseSchema, listProfileSpaceHistoryQuerySchema, listProfileSpaceHistoryResponseSchema, listProfilesResponseSchema, listSignalsQuerySchema, listSpaceDispatchTraceFinalVisibleSignalCandidates, listSpaceThreadEventsResponseSchema, listSpaceThreadSignalsResponseSchema, listSpaceThreadsResponseSchema, localAgentCatalogEntrySchema, localAgentCatalogLaunchStatusSchema, localAgentCatalogSchema, localAgentCatalogSelectableReasonSchema, localAgentCatalogTargetKindSchema, localCliComponentProjectionSchema, localComponentProjectionSchema, localComponentStatusSchema, localComponentsManifestSchema, localComponentsStatusSchema, localRuntimeComputerSchema, localRuntimeContextExecutionSchema, localRuntimeContextPlanSchema, localRuntimeContextReasonSchema, localRuntimeDeviceTypeSchema, localRuntimeDisplayNameSourceSchema, localRuntimeExecutionTargetCapabilitySchema, localRuntimeExecutionTargetSchema, localRuntimeExecutionTargetStatusSchema, localRuntimePlatformFamilySchema, localRuntimeReplyReadinessNextActionSchema, localRuntimeReplyReadinessPrimaryBlockerSchema, localRuntimeReplyReadinessStatusSchema, localRuntimesConnectionIdentityAdoptionSchema, localRuntimesQuerySchema, localRuntimesResponseSchema, localServiceComponentProjectionSchema, localSetupActionSchema, localSetupEntrypointSchema, localSkillsComponentProjectionSchema, messageEnvelopeInputSchema, messageEnvelopeSchema, messageEnvelopeTargetFieldSchema, messageMentionTypeSchema, nextDispatchPlanSchema, normalizeBuiltinControllerAgentId, normalizeBuiltinControllerProviderId, normalizeListSignalsReadQuerySemantics, normalizeMessageEnvelope, normalizeOptionalWorkingDirectory, normalizeSpaceCursorPatch, normalizeSpacePasswordText, notifyAgentProfileRouteCatalogChangedBodySchema, notifyAgentProfileRouteCatalogChangedResponseSchema, observabilityCloudflareAnalyticsDataPointSchema, observabilityCloudflareRuntimeEventSchema, observabilityCloudflareRuntimeEvidenceSchema, observabilityCloudflareRuntimeKindSchema, observabilityCloudflareWorkerNameSchema, observabilityRuntimeEvidenceStatusSchema, observabilityWakeCorrelationSchema, observabilityWakeTraceSelectorSchema, observedDeviceMetadataSchema, observedDeviceTypeSchema, parseAtsdDispatchQueueIngress, parseCanonicalMentionLiteral, parseOptionalClientMessageId, patchCursorLastSeenTsSchema, patchCursorStringSchema, patchProfileSpaceHistoryStatusBodySchema, patchProfileSpaceHistoryStatusResponseSchema, patchSpaceContractBodySchema, patchSpaceContractResponseSchema, patchSpaceCursorBodySchema, patchSpaceMetaBodySchema, patchSpaceMetaResponseSchema, patchStartSessionBodySchema, planMentionDispatchDecisions, planTargetDispatchDecisions, postNormalMessageBodySchema, postNormalMessageResponseSchema, postResolvedSpaceMembersBodySchema, postSpaceDispatchOutboxRedriveBodySchema, postSpaceDispatchOutboxRedriveResponseSchema, postSpaceMembersBodySchema, postSpaceMembersResponseSchema, postSpaceThreadSignalBodySchema, postSpaceThreadSignalResponseSchema, prepareBlockerRetryActionSchema, prepareBlockerSchema, prepareBlockerSeveritySchema, prepareDiagnosticResponseSchema, prepareLocalAgentCatalogSchema, prepareLocalAgentIdsSchema, prepareOpaqueTokenSchema, prepareReadinessDisplayStateSchema, prepareReadinessNonRunnableCapabilitySchema, prepareReadinessProjectionSchema, prepareReadinessRouteParamsSchema, prepareReadinessRunnableCapabilitySchema, prepareReadinessRuntimeIdSchema, prepareReadinessSummarySchema, prepareSessionEventActorSchema, prepareSessionEventSchema, prepareSessionEventTypeSchema, prepareSessionLifecycleStatusSchema, prepareSessionPhaseSchema, prepareSessionResponseSchema, prepareSessionSnapshotSchema, prepareSessionStreamClientFrameSchema, prepareSessionStreamRoleSchema, prepareSessionStreamServerFrameSchema, prepareSessionWithTokenResponseSchema, prepareStepIdSchema, prepareStepSchema, prepareStepStateSchema, prepareTerminalConnectionSchema, prepareTerminalConnectionStatusSchema, presenceEnvelopeSchema, profileHandleSchema, profileKindSchema, profileLabelSchema, profileSchema, profileSpaceCreatorKindSchema, profileSpaceHistoryRecordSchema, profileSpaceHistoryStatusSchema, profileWorkingDirectorySchema, profileWorkspaceModeSchema, projectObservabilityCloudflareAnalyticsDataPoint, projectObservabilityCloudflareRuntimeConsoleEvent, projectObservabilityCloudflareRuntimeEvent, projectObservabilityWakeCorrelation, projectSpaceDispatchTraceFinalVisibleOutcome, projectSpaceDispatchTraceRootCause, projectTargetWakeLifecycleIdentity, providerConversationCapabilitySchema, providerConversationDiscoverCapabilitySchema, providerConversationExternalImportCapabilitySchema, providerConversationResumeCapabilitySchema, providerConversationTurnOverrideCapabilitySchema, providerDispatchRuntimeContextSchema, providerRuntimeCapabilityDeclarationSchema, providerRuntimeContinuationCapabilitySchema, providerRuntimePreparationRequirementSchema, providerRuntimeStreamingCapabilitySchema, providerRuntimeWorkingDirectoryModeSchema, providerRuntimeWorkspaceResumeBehaviorSchema, putSpaceContractBodySchema, putSpaceContractResponseSchema, querySpaceDeletionTombstonesBodySchema, querySpaceDeletionTombstonesResponseSchema, readListSignalsQueryRawValues, removeSpaceMembersBodySchema, removeSpaceMembersResponseSchema, replyReadinessLevelSchema, replyReadinessReasonCodeSchema, resolveAgentExecutionReadinessImpactReasonCode, resolveAgentExecutionReadinessImpactTaxonomyEntry, resolveBuiltinAgentControllerBrand, resolveBuiltinProviderConversationCapability, resolveBuiltinUpstreamConversationRefKind, resolveListSignalsReadQuerySemantics, resolveMappedPublicAgentFailureReason, resolveMessageEnvelopeTargetField, resolveProfileResponseSchema, resolvePublicAgentFailureRecovery, resolveSingleSpaceMentionLabels, resolveSpaceDispatchTraceRootCause, resolveSpaceMentionLabels, resolveSpaceMessageAddressingTargetField, resolveStartHandoffBodySchema, resolveStartHandoffResponseSchema, resolvedAtsProfileSchema, resolvedSpaceMemberProfileSchema, resultArchiveModeSchema, resultArchivePolicySchema, runtimeAgentContextIdMappingSpecSchema, runtimeAgentControllerLaunchCandidateSchema, runtimeAgentControllerLaunchContractSchema, runtimeAgentControllerSettingsSchema, runtimeAgentExecutableLaunchContractSchema, runtimeAgentNodeScriptLaunchContractSchema, runtimeCapabilityReportRejectedReasonSchema, runtimeCapabilityReportStatusSchema, runtimeCoordinatorExecutionCreationDiagnosticSchema, runtimeCoordinatorExecutionCreationStatusSchema, runtimeCoordinatorExecutionEventSchema, runtimeCoordinatorExecutionEventTypeSchema, runtimeCoordinatorExecutionRecordSchema, runtimeCoordinatorExecutionStatusSchema, runtimeCoordinatorExecutionTokenAuthorityRecordSchema, runtimeCoordinatorExecutionTokenEchoSchema, runtimeCoordinatorExecutionTokenEnvelopeSchema, runtimeCoordinatorExecutionTokenSchema, runtimeCoordinatorFailurePublicationCommandSchema, runtimeCoordinatorFailurePublicationFinalMessageKindSchema, runtimeCoordinatorFailurePublicationOutcomeSchema, runtimeCoordinatorFinalizationAcceptedResultSchema, runtimeCoordinatorFinalizationCommandSchema, runtimeCoordinatorFinalizationDispatchFactSchema, runtimeCoordinatorFinalizationDispatchOwnerSchema, runtimeCoordinatorFinalizationOutcomeSchema, runtimeCoordinatorLegacyPointersSchema, runtimeCoordinatorSafeEventPayloadJsonSchema, runtimeCoordinatorTerminalOutcomeSchema, runtimeCoordinatorTokenAuthorityScopeSchema, runtimeCoordinatorTokenDeliveryProvenanceSchema, runtimeCoordinatorTokenDiagnosticEventSchema, runtimeCoordinatorTokenExecutionScopeSchema, runtimeCoordinatorTokenFingerprintSchema, runtimeCoordinatorTokenProjectionSchema, runtimeCoordinatorTokenReasonCodeSchema, runtimeCoordinatorTokenRunAuthoritySchema, runtimeCoordinatorTokenStatusSchema, runtimeCoordinatorTokenValidationHashSchema, runtimeDispatchPolicySchema, runtimeExecutionAuthorityRuntimeIdSchema, runtimeExecutionIdentityCoreSchema, runtimeRegistrationRejectedReasonSchema, runtimeReportingRouteParamsSchema, runtimeReportingRuntimeIdSchema, runtimeStreamingModeSchema, runtimeTransportModeSchema, sanitizeSignalTextPreview, serverErrorFrameSchema, setAuthPasswordBodySchema, setAuthPasswordResponseSchema, setCurrentDeviceTargetBodySchema, setLocalRuntimeDisplayNameBodySchema, shouldLogObservabilityCloudflareRuntimeEvent, signalEnvelopeSchema, signalStatusDataSchema, signalStatusEnvelopeSchema, signalStatusGeneratedBySchema, signalStatusSchema, signalSystemNoticeDataSchema as signalSystemNoticeDataPayloadSchema, signalSystemNoticeDataSchema$1 as signalSystemNoticeDataSchema, signalSystemNoticeEnvelopeSchema, signalSystemNoticeGeneratedBySchema, signalSystemNoticeSchema, signalSystemNoticeTypeSchema, signalTextDataSchema, signalTextEnvelopeSchema, signalTextReplyToSchema, signalTextSchema, skippedDaemonProfileSchema, spaceAllowedActionSchema, spaceAllowedActionsSchema, spaceAuthorityOrderSchema, spaceBriefModeSchema, spaceContractFieldsSchema, spaceContractSchema, spaceConversationBindingConflictResponseSchema, spaceConversationBindingDeleteResponseSchema, spaceConversationBindingImportBodySchema, spaceConversationBindingImportResponseSchema, spaceConversationBindingResponseSchema, spaceConversationBindingUpsertBodySchema, spaceConversationBindingUpsertResponseSchema, spaceConversationLatestRemoteObservationMissingSchema, spaceConversationLatestRemoteObservationObservedSchema, spaceConversationLatestRemoteObservationSchema, spaceConversationLiveResumeCheckSchema, spaceConversationLiveResumeCheckStatusSchema, spaceConversationLocalRuntimeContextSchema, spaceConversationLocalRuntimeContextStatusSchema, spaceConversationRuntimeWorkspaceSchema, spaceConversationUpstreamConversationBindingMissingSchema, spaceConversationUpstreamConversationBindingPresentSchema, spaceConversationUpstreamConversationBindingSchema, spaceConversationWakeReadinessSchema, spaceCreatorSchema, spaceDeletionTombstoneRecordSchema, spaceDiagnosticReportProblemTypeSchema, spaceDiagnosticReportReasonCodeSchema, spaceDiagnosticReportWakePointerDerivationSchema, spaceDiagnosticReportWakePointerDerivationStatusSchema, spaceDiagnosticReportWakePointerSchema, spaceDispatchLookupMatchSchema, spaceDispatchOutboxRedriveReasonSchema, spaceDispatchPolicyModeSchema, spaceDispatchPolicySchema, spaceDispatchTraceAttemptStatusSchema, spaceDispatchTraceClaimLeaseSchema, spaceDispatchTraceDispatchExecutionSchema, spaceDispatchTraceDispatchSchema, spaceDispatchTraceDispatchStatusSchema, spaceDispatchTraceExecutionIdentitySchema, spaceDispatchTraceFinalVisibleMessageFactSourceSchema, spaceDispatchTraceFinalVisibleMessageLinkageSchema, spaceDispatchTraceFinalVisibleMessageLinkageSourceFactSchema, spaceDispatchTraceFinalVisibleMessageLinkageStatusSchema, spaceDispatchTraceFinalVisibleMessageSchema, spaceDispatchTraceFinalVisibleOutcomePublicationKindSchema, spaceDispatchTraceFinalVisibleOutcomeSchema, spaceDispatchTraceFinalVisibleOutcomeSourceFactSchema, spaceDispatchTraceFinalVisibleOutcomeStatusSchema, spaceDispatchTraceLatestAttemptSchema, spaceDispatchTraceOpsDecisionSchema, spaceDispatchTraceQuerySchema, spaceDispatchTraceReplySignalSchema, spaceDispatchTraceResponseSchema, spaceDispatchTraceResultInboxPublishStateSchema, spaceDispatchTraceResultInboxSchema, spaceDispatchTraceResultSchema, spaceDispatchTraceRuntimeCoordinatorCreationDiagnosticSchema, spaceDispatchTraceRuntimeCoordinatorEventSchema, spaceDispatchTraceRuntimeCoordinatorExecutionSchema, spaceDispatchTraceRuntimeCoordinatorHeadLifecycleSchema, spaceDispatchTraceSnapshotSchema, spaceDispatchTraceStreamingSchema, spaceLiveSignalFrameSchema, spaceMemberAgentExecutionReadinessSchema, spaceMemberAgentPublicReplyPresenceSchema, spaceMemberAgentSnapshotSchema, spaceMemberAgentViewerLocalControlSchema, spaceMemberHumanSnapshotSchema, spaceMemberKindSchema, spaceMemberSourceSchema, spaceMemberStatusSchema, spaceMembersEventSchema, spaceMembersSnapshotSchema, spaceMembersSummarySchema, spaceMentionLabelSchema, spaceMentionLabelSourceSchema, signalSystemNoticeSchema$1 as spaceMeshSignalSystemNoticeSchema, spaceMessageAddressingRelationSchema, spaceMessageAddressingTargetKindSchema, spaceMetaSchema, spaceNameSchema, spaceNoteSchema, spacePasswordSchema, spacePasswordStateSchema, spacePublicationModeSchema, spaceRouteParamsSchema, spaceSignalAuthoringPolicySchema, spaceStatusLatestVisibleUpdateSchema, spaceStatusMembersSummarySchema, spaceStatusSchema, spaceStorageUsageSchema, spaceThreadActionRefSchema, spaceThreadContextSchema, spaceThreadEventSchema, spaceThreadEventTypeSchema, spaceThreadIdSchema, spaceThreadPreviewSchema, spaceThreadSchema, spaceThreadSignalPlacementKindSchema, spaceThreadSignalPlacementSchema, spaceTraceExecutionIdentityProjectionSchema, spaceViewerMembershipProfileSchema, spaceViewerMembershipResponseSchema, startBackgroundHelperInstallStatusSchema, startBackgroundHelperRuntimeStatusSchema, startDeviceAgentCatalogSchema, startDeviceAgentSelectableReasonSchema, startDeviceProjectionSchema, startDeviceProjectionSlotSchema, startHandoffProfileSchema, startLocalAgentIdsSchema, startLocalAgentPreparationModeSchema, startLocalAgentPreparationSchema, startNextActionIdSchema, startObservationSchema, startOpaqueTokenSchema, startPlannerDecisionSchema, startPlannerReasonCodeSchema, startPlannerSignalSchema, startPlannerStatusSchema, startProfileChoiceModeSchema, startProfileChoiceSchema, startProfileReadinessEntrySchema, startProfileReadinessProjectionSlotSchema, startProfileReadinessSummarySchema, startProjectionAvailabilitySchema, startRouteObservationReasonCodeSchema, startRouteObservationStatusSchema, startSelectedSpaceMemberProfileIdsSchema, startSessionHandoffFailureGateSchema, startSessionHandoffFailureRetryActionSchema, startSessionHandoffFailureSchema, startSessionInitiatorSchema, startSessionLifecycleStatusSchema, startSessionProgressSchema, startSessionProgressSlotSchema, startSessionProgressStatusSchema, startSessionResponseSchema, startSessionRouteParamsSchema, startSessionSchema, startSessionSpaceChoiceBodySchema, startSessionSpaceChoiceCreateNewBodySchema, startSessionSpaceChoiceJoinExistingBodySchema, startSessionSpaceChoiceResponseSchema, startSessionStepIdSchema, startSessionWithTokenResponseSchema, startSharedReadModelSchema, startSharedStateSchema, startSkillsReadinessStatusSchema, startSpaceChoiceModeSchema, startSpaceChoiceSchema, startSpaceMemberSelectionModeSchema, startSpaceMemberSelectionSchema, startTargetSpaceIdSchema, structuredGuidePayloadFromInputSchema, structuredGuidePayloadSchema, submitRuntimeCapabilityReportItemSchema, submitRuntimeCapabilityReportResultSchema, submitRuntimeCapabilityReportsBodySchema, submitRuntimeCapabilityReportsResponseSchema, submitRuntimeRegistrationBodySchema, submitRuntimeRegistrationResponseSchema, targetWakeLifecycleIdentitySchema, terminalLocalAgentCatalogWriteSchema, terminalStepWriteSchema, terminalStepWriteStatusSchema, updateProfileResponseSchema, upsertProfileSpaceHistoryBodySchema, upsertProfileSpaceHistoryResponseSchema, upsertSpaceDeletionTombstoneBodySchema, upsertSpaceDeletionTombstoneResponseSchema, upsertSpacePasswordBodySchema, upstreamConversationRefKindSchema, upstreamConversationRefSchema, upstreamConversationResumePlanBlockedReasonSchema, upstreamConversationResumePlanSchema, upstreamConversationResumeSchema, uuidProfileIdSchema, validateSpaceSignalClientMessageIdPolicy, waitlistErrorCodeSchema, waitlistErrorResponseSchema, waitlistJoinStatusSchema, wakeProgressItemSchema, wakeProgressPhaseSchema, wakeTraceWaterfallFactSourceSchema, wakeTraceWaterfallItemSchema, wakeTraceWaterfallStepIdsSchema, wakeTraceWaterfallStepNameSchema, wakeTraceWaterfallStepSchema, wakeTraceWaterfallStepStatusSchema, wakeTraceWaterfallSummaryStatusSchema, webAgentSelectionWriteSchema, writeCurrentDeviceObservedMetadataBodySchema, writeCurrentDeviceObservedMetadataResponseSchema, writeSetupTokenLocalRuntimeObservedMetadataBodySchema, writeSetupTokenLocalRuntimeObservedMetadataResponseSchema };\n//# sourceMappingURL=index.js.map","import { createHash } from \"node:crypto\";\nimport { mkdir, open, readdir, readFile, rename, rm } from \"node:fs/promises\";\nimport { join } from \"node:path\";\nimport { type AtsProfileId, normalizeAtsProfileId, sessionsDir } from \"./paths\";\n\nexport const ATS_RUNTIME_SESSION_ENV_KEY = \"ATS_RUNTIME_SESSION_ID\";\nexport const LEGACY_ATS_RUNTIME_SESSION_ENV_KEY = \"ATS_AGENT_SESSION_ID\";\n\nexport const RUNTIME_SESSION_ENV_KEYS = [\n ATS_RUNTIME_SESSION_ENV_KEY,\n LEGACY_ATS_RUNTIME_SESSION_ENV_KEY,\n] as const;\n\nconst SESSION_FILE_MAX_LENGTH = 128;\nconst SESSION_FILE_HASH_LENGTH = 8;\n\nexport type RuntimeSessionResolution = {\n runtimeSessionId: string;\n source: string;\n};\n\nexport type RuntimeSessionStateV1 = {\n v: 1;\n sessionId: string;\n updatedAt: string;\n runtimeSessionSource?: string;\n atsProfileId?: string;\n selectedAtsProfileId?: string;\n};\n\nexport function resolveRuntimeSession(\n profileIdInput?: string\n): RuntimeSessionResolution | null {\n const explicit = normalizeSessionId(profileIdInput);\n if (explicit) {\n return {\n runtimeSessionId: explicit,\n source: \"manual\",\n };\n }\n\n for (const key of RUNTIME_SESSION_ENV_KEYS) {\n const sessionId = normalizeSessionId(process.env[key]);\n if (sessionId) {\n return {\n runtimeSessionId: sessionId,\n source: `environment:${key}`,\n };\n }\n }\n\n return resolveTerminalSessionId();\n}\n\nexport function resolveRuntimeSessionId(\n profileIdInput?: string\n): string | null {\n return resolveRuntimeSession(profileIdInput)?.runtimeSessionId ?? null;\n}\n\nexport function buildSessionProfilePayload(\n session: RuntimeSessionResolution,\n atsProfileId: AtsProfileId\n): RuntimeSessionStateV1 {\n return {\n v: 1,\n sessionId: session.runtimeSessionId,\n runtimeSessionSource: session.source,\n atsProfileId: normalizeAtsProfileId(atsProfileId),\n updatedAt: new Date().toISOString(),\n };\n}\n\nexport function formatRuntimeSessionSource(source: string): string {\n if (source === \"manual\") {\n return \"manual\";\n }\n if (source.startsWith(\"environment:\")) {\n return `environment:${source.slice(\"environment:\".length)}`;\n }\n if (source.startsWith(\"terminal:\")) {\n return \"terminal-fingerprint\";\n }\n return source;\n}\n\nexport function normalizeRuntimeSessionResolution(\n value: unknown\n): RuntimeSessionResolution | null {\n if (!value || typeof value !== \"object\") {\n return null;\n }\n\n const maybe = value as {\n runtimeSessionId?: unknown;\n source?: unknown;\n };\n const runtimeSessionId = normalizeSessionId(maybe.runtimeSessionId);\n const source = normalizeSessionSource(maybe.source);\n if (!(runtimeSessionId && source)) {\n return null;\n }\n\n return { runtimeSessionId, source };\n}\n\nfunction normalizeSessionSource(raw: unknown): string | null {\n const value = String(raw ?? \"\").trim();\n if (!value) {\n return null;\n }\n return value;\n}\n\nexport async function setSessionAtsProfileId(\n atsProfileId: AtsProfileId\n): Promise<boolean> {\n return await writeRuntimeSessionState({\n atsProfileId,\n });\n}\n\nexport async function getSessionAtsProfileId(): Promise<AtsProfileId | null> {\n return (await readRuntimeSessionState())?.atsProfileId ?? null;\n}\n\nexport async function clearSessionAtsProfileId(): Promise<boolean> {\n return await writeRuntimeSessionState({\n atsProfileId: null,\n });\n}\n\nexport async function readRuntimeSessionState(input?: {\n sessionId?: string;\n}): Promise<RuntimeSessionStateV1 | null> {\n const runtimeSessionId = resolveSessionStateId(input?.sessionId);\n if (!runtimeSessionId) {\n return null;\n }\n\n const raw = await readFile(\n runtimeSessionStatePath(runtimeSessionId),\n \"utf8\"\n ).catch(() => null);\n if (!raw) {\n return null;\n }\n\n return parseRuntimeSessionState(raw);\n}\n\nexport async function listRuntimeSessionStates(): Promise<\n RuntimeSessionStateV1[]\n> {\n const entryNames = await readdir(sessionsDir()).catch(() => []);\n const states: RuntimeSessionStateV1[] = [];\n for (const entryName of entryNames) {\n if (!entryName.endsWith(\".json\")) {\n continue;\n }\n const raw = await readFile(join(sessionsDir(), entryName), \"utf8\").catch(\n () => null\n );\n if (!raw) {\n continue;\n }\n const parsed = parseRuntimeSessionState(raw);\n if (!parsed) {\n continue;\n }\n states.push(parsed);\n }\n return states.sort((left, right) =>\n left.sessionId.localeCompare(right.sessionId)\n );\n}\n\nexport async function writeRuntimeSessionState(input: {\n sessionId?: string;\n sessionSource?: string;\n atsProfileId?: string | null;\n selectedAtsProfileId?: string | null;\n}): Promise<boolean> {\n const runtimeSession =\n resolveRuntimeSessionStateInput(input) ?? resolveRuntimeSession();\n if (!runtimeSession) {\n return false;\n }\n\n await mkdir(sessionsDir(), { recursive: true });\n const existing = await readRuntimeSessionState({\n sessionId: runtimeSession.runtimeSessionId,\n });\n const nextAtsProfileId = resolveNextSessionAtsProfileId(existing, input);\n const nextSelectedAtsProfileId = resolveNextSelectedAtsProfileId(\n existing,\n input\n );\n const outputPath = runtimeSessionStatePath(runtimeSession.runtimeSessionId);\n\n if (!(nextAtsProfileId || nextSelectedAtsProfileId)) {\n await rm(outputPath, { force: true });\n return true;\n }\n\n const payload: RuntimeSessionStateV1 = {\n v: 1,\n sessionId: runtimeSession.runtimeSessionId,\n runtimeSessionSource:\n runtimeSession.source ?? existing?.runtimeSessionSource ?? \"manual\",\n ...(nextAtsProfileId ? { atsProfileId: nextAtsProfileId } : {}),\n ...(nextSelectedAtsProfileId\n ? { selectedAtsProfileId: nextSelectedAtsProfileId }\n : {}),\n updatedAt: new Date().toISOString(),\n };\n\n await writeRuntimeSessionStateFile(outputPath, payload);\n return true;\n}\n\nexport function runtimeSessionStatePath(sessionId: string): string {\n return join(sessionsDir(), `${toSafeSessionFile(sessionId)}.json`);\n}\n\nfunction toSafeSessionFile(value: string): string {\n const hash = createHash(\"sha1\")\n .update(value, \"utf8\")\n .digest(\"hex\")\n .slice(0, SESSION_FILE_HASH_LENGTH);\n const safeBaseRaw = value.replace(/[^a-zA-Z0-9._-]+/g, \"_\");\n const safeBase = safeBaseRaw.length > 0 ? safeBaseRaw : \"session\";\n const maxBaseLength = Math.max(\n 1,\n SESSION_FILE_MAX_LENGTH - SESSION_FILE_HASH_LENGTH - 1\n );\n const truncatedBase = safeBase.slice(0, maxBaseLength);\n return `${truncatedBase}-${hash}`;\n}\n\nfunction resolveRuntimeSessionStateInput(input: {\n sessionId?: string;\n sessionSource?: string;\n}): RuntimeSessionResolution | null {\n const sessionId = normalizeSessionId(input.sessionId);\n if (!sessionId) {\n return null;\n }\n return {\n runtimeSessionId: sessionId,\n source: normalizeSessionSource(input.sessionSource) ?? \"manual\",\n };\n}\n\nfunction resolveSessionStateId(sessionId?: string): string | null {\n const explicit = normalizeSessionId(sessionId);\n if (explicit) {\n return explicit;\n }\n return resolveRuntimeSession()?.runtimeSessionId ?? null;\n}\n\nfunction parseRuntimeSessionState(raw: string): RuntimeSessionStateV1 | null {\n let parsed: Partial<RuntimeSessionStateV1> & {\n profile?: unknown;\n };\n try {\n parsed = JSON.parse(raw) as Partial<RuntimeSessionStateV1> & {\n profile?: unknown;\n };\n } catch {\n return null;\n }\n\n if (parsed.v !== 1) {\n return null;\n }\n const sessionId = normalizeSessionId(parsed.sessionId);\n if (!sessionId) {\n return null;\n }\n const atsProfileId = resolveStoredSessionAtsProfileId(parsed);\n const selectedAtsProfileId = resolveStoredSelectedAtsProfileId(parsed);\n if (!(atsProfileId || selectedAtsProfileId)) {\n return null;\n }\n const runtimeSessionSource = normalizeSessionSource(\n parsed.runtimeSessionSource\n );\n return {\n v: 1,\n sessionId,\n ...(runtimeSessionSource ? { runtimeSessionSource } : {}),\n ...(atsProfileId ? { atsProfileId } : {}),\n ...(selectedAtsProfileId ? { selectedAtsProfileId } : {}),\n updatedAt:\n typeof parsed.updatedAt === \"string\" && parsed.updatedAt.trim().length > 0\n ? parsed.updatedAt\n : new Date(0).toISOString(),\n };\n}\n\nfunction resolveNextSessionAtsProfileId(\n existing: RuntimeSessionStateV1 | null,\n input: {\n atsProfileId?: string | null;\n selectedAtsProfileId?: string | null;\n }\n): string | undefined {\n if (!(\"atsProfileId\" in input)) {\n return existing?.atsProfileId;\n }\n return normalizeOptionalAtsProfileId(input.atsProfileId) ?? undefined;\n}\n\nfunction resolveNextSelectedAtsProfileId(\n existing: RuntimeSessionStateV1 | null,\n input: {\n atsProfileId?: string | null;\n selectedAtsProfileId?: string | null;\n }\n): string | undefined {\n if (!(\"selectedAtsProfileId\" in input)) {\n return existing?.selectedAtsProfileId;\n }\n return normalizeOptionalAtsProfileId(input.selectedAtsProfileId) ?? undefined;\n}\n\nasync function writeRuntimeSessionStateFile(\n outputPath: string,\n payload: RuntimeSessionStateV1\n): Promise<void> {\n const tempPath = `${outputPath}.tmp-${process.pid}-${Date.now()}`;\n const file = await open(tempPath, \"w\");\n let writeFailure: unknown = null;\n try {\n await file.writeFile(`${JSON.stringify(payload, null, 2)}\\n`, \"utf8\");\n await file.sync();\n } catch (error) {\n writeFailure = error;\n }\n try {\n await file.close();\n } catch (error) {\n if (!writeFailure) {\n writeFailure = error;\n }\n }\n if (writeFailure) {\n await rm(tempPath, { force: true }).catch(() => undefined);\n throw writeFailure;\n }\n\n try {\n await rename(tempPath, outputPath);\n } catch (error) {\n await rm(tempPath, { force: true }).catch(() => undefined);\n throw error;\n }\n}\n\nfunction normalizeSessionId(value: unknown): string | null {\n const raw = String(value ?? \"\").trim();\n if (!raw) {\n return null;\n }\n return raw.slice(0, 256);\n}\n\nfunction resolveTerminalSessionId(): RuntimeSessionResolution | null {\n if (!(process.stdin.isTTY || process.stdout.isTTY)) {\n return null;\n }\n\n const parentPid = Number(process.ppid);\n if (!Number.isInteger(parentPid) || parentPid <= 1) {\n return null;\n }\n\n return {\n runtimeSessionId: `terminal-ppid-${parentPid}`,\n source: `terminal:ppid-${parentPid}`,\n };\n}\n\nfunction resolveStoredSessionAtsProfileId(input: {\n atsProfileId?: unknown;\n profile?: unknown;\n}): AtsProfileId | null {\n const atsProfileId = normalizeOptionalAtsProfileId(input.atsProfileId);\n const legacyProfile = normalizeOptionalAtsProfileId(input.profile);\n if (atsProfileId && legacyProfile && atsProfileId !== legacyProfile) {\n throw new Error(\n `conflicting stored ATS profile identity: atsProfileId=${atsProfileId}, profile=${legacyProfile}. Remove or reconcile the legacy profile field so it matches atsProfileId.`\n );\n }\n return atsProfileId ?? legacyProfile;\n}\n\nfunction resolveStoredSelectedAtsProfileId(input: {\n selectedAtsProfileId?: unknown;\n}): AtsProfileId | null {\n return normalizeOptionalAtsProfileId(input.selectedAtsProfileId);\n}\n\nfunction normalizeOptionalAtsProfileId(value: unknown): AtsProfileId | null {\n if (typeof value !== \"string\") {\n return null;\n }\n try {\n return normalizeAtsProfileId(value);\n } catch {\n return null;\n }\n}\n","import { mkdir, readFile, rm, writeFile } from \"node:fs/promises\";\nimport { join } from \"node:path\";\nimport process from \"node:process\";\nimport { normalizeAtsProfileId, locksDir as resolveLocksDir } from \"./paths\";\nimport { resolveRuntimeSessionId } from \"./session-profile\";\n\nexport type AtsLock = {\n path: string;\n};\n\nexport type AtsLockMeta = Record<string, unknown>;\ntype HeldLockReleaseContext = Record<string, unknown>;\n\nexport class AtsLockError extends Error {\n readonly code = \"ats.locked\";\n readonly lockPath: string;\n readonly lockKey: string;\n readonly metaRaw: string | null;\n readonly meta: AtsLockMeta | null;\n\n constructor(input: { path: string; key: string; metaRaw?: string }) {\n const normalizedMetaRaw = normalizeMetaRaw(input.metaRaw);\n super(buildAtsLockErrorMessage(input.path, normalizedMetaRaw));\n this.name = \"AtsLockError\";\n this.lockPath = input.path;\n this.lockKey = input.key;\n this.metaRaw = normalizedMetaRaw;\n this.meta = parseAtsLockMeta(normalizedMetaRaw);\n }\n}\n\nexport function isAtsLockError(error: unknown): error is AtsLockError {\n return error instanceof AtsLockError;\n}\n\nexport async function acquireLock(input: {\n atsProfileId: string;\n key: string;\n meta?: AtsLockMeta;\n}): Promise<AtsLock> {\n const atsProfileId = normalizeAtsProfileId(input.atsProfileId);\n const sessionId = resolveRuntimeSessionId();\n const dir = resolveLocksDir(atsProfileId);\n await mkdir(dir, { recursive: true });\n\n const path = resolveLockPath({\n atsProfileId,\n key: input.key,\n });\n\n // Exclusive create, with basic stale-lock recovery.\n for (let attempt = 0; attempt < 2; attempt++) {\n try {\n await writeFile(\n path,\n `${JSON.stringify({\n pid: process.pid,\n atsProfileId,\n ...(sessionId ? { sessionId } : {}),\n at: new Date().toISOString(),\n ...(input.meta ? { ...input.meta } : {}),\n })}\\n`,\n {\n encoding: \"utf8\",\n flag: \"wx\",\n }\n );\n return { path };\n } catch {\n const existingLock = await readLockSnapshot(path);\n\n if (await tryCleanupStaleLockPath(path, existingLock)) {\n continue;\n }\n\n throw new AtsLockError({\n path,\n key: input.key,\n metaRaw: existingLock.metaRaw ?? undefined,\n });\n }\n }\n\n throw new AtsLockError({\n path,\n key: input.key,\n });\n}\n\nexport async function releaseLock(lock: AtsLock): Promise<void> {\n await rm(lock.path, { force: true });\n}\n\nexport async function runWithCleanupPreservingRunError<T>(input: {\n run: () => Promise<T>;\n cleanup: () => Promise<void>;\n onCleanupErrorAfterRunFailure?: (cleanupError: unknown) => void;\n}): Promise<T> {\n let runResult: T | undefined;\n let runSucceeded = false;\n let runError: unknown;\n\n try {\n runResult = await input.run();\n runSucceeded = true;\n } catch (error) {\n runError = error;\n }\n\n try {\n await input.cleanup();\n } catch (cleanupError) {\n if (!runSucceeded) {\n input.onCleanupErrorAfterRunFailure?.(cleanupError);\n throw runError;\n }\n throw cleanupError;\n }\n\n if (!runSucceeded) {\n throw runError;\n }\n\n return runResult as T;\n}\n\nexport async function runWithHeldLock<T>(input: {\n lock: AtsLock;\n run: () => Promise<T>;\n releaseContext?: HeldLockReleaseContext;\n}): Promise<T> {\n return await runWithCleanupPreservingRunError({\n run: input.run,\n cleanup: () => releaseLock(input.lock),\n onCleanupErrorAfterRunFailure: (releaseError) => {\n warnLockReleaseFailure({\n error: releaseError,\n lock: input.lock,\n releaseContext: input.releaseContext,\n });\n },\n });\n}\n\nexport async function readLockMeta(input: {\n atsProfileId: string;\n key: string;\n}): Promise<AtsLockMeta | null> {\n const existingLock = await readLockSnapshot(\n resolveLockPath({\n atsProfileId: input.atsProfileId,\n key: input.key,\n })\n );\n return existingLock.meta;\n}\n\nexport async function tryCleanupStaleLock(input: {\n atsProfileId: string;\n key: string;\n}): Promise<boolean> {\n return await tryCleanupStaleLockPath(\n resolveLockPath({\n atsProfileId: input.atsProfileId,\n key: input.key,\n })\n );\n}\n\ntype LockSnapshot = {\n metaRaw: string | null;\n meta: AtsLockMeta | null;\n pid: number | null;\n hasStalePid: boolean;\n};\n\nfunction resolveLockPath(input: { atsProfileId: string; key: string }): string {\n const atsProfileId = normalizeAtsProfileId(input.atsProfileId);\n return join(\n resolveLocksDir(atsProfileId),\n `${sanitizeFilename(input.key)}.lock`\n );\n}\n\nfunction sanitizeFilename(value: string): string {\n return value.replace(/[^a-zA-Z0-9._-]+/g, \"_\");\n}\n\nfunction safeParse(value: string): unknown {\n try {\n return JSON.parse(value);\n } catch {\n return null;\n }\n}\n\nfunction normalizeMetaRaw(metaRaw: string | undefined): string | null {\n if (typeof metaRaw !== \"string\") {\n return null;\n }\n const normalized = metaRaw.trim();\n return normalized.length > 0 ? normalized : null;\n}\n\nfunction parseAtsLockMeta(metaRaw: string | null): AtsLockMeta | null {\n if (!metaRaw) {\n return null;\n }\n const parsed = safeParse(metaRaw);\n if (!parsed || typeof parsed !== \"object\") {\n return null;\n }\n return parsed as AtsLockMeta;\n}\n\nfunction buildAtsLockErrorMessage(\n path: string,\n metaRaw: string | null\n): string {\n if (!metaRaw) {\n return `space is locked (${path})`;\n }\n return `space is locked (${path}). Meta: ${metaRaw}`;\n}\n\nfunction getPidFromMeta(meta: unknown): number | null {\n if (!meta || typeof meta !== \"object\") {\n return null;\n }\n const pid = (meta as Record<string, unknown>).pid;\n return typeof pid === \"number\" ? pid : null;\n}\n\nasync function readLockSnapshot(path: string): Promise<LockSnapshot> {\n const metaRaw = await readFile(path, \"utf8\").catch((error) => {\n if (getErrorCode(error) === \"ENOENT\") {\n return null;\n }\n throw error;\n });\n const normalizedMetaRaw = normalizeMetaRaw(metaRaw ?? undefined);\n if (normalizedMetaRaw === null) {\n return {\n metaRaw: null,\n meta: null,\n pid: null,\n hasStalePid: false,\n };\n }\n\n const meta = parseAtsLockMeta(normalizedMetaRaw);\n const pid = getPidFromMeta(meta);\n return {\n metaRaw: normalizedMetaRaw,\n meta,\n pid,\n hasStalePid: pid !== null && !isPidAlive(pid),\n };\n}\n\nasync function tryCleanupStaleLockPath(\n path: string,\n initialSnapshot?: LockSnapshot\n): Promise<boolean> {\n const firstSnapshot = initialSnapshot ?? (await readLockSnapshot(path));\n\n if (\n firstSnapshot.metaRaw === null ||\n firstSnapshot.pid === null ||\n !firstSnapshot.hasStalePid\n ) {\n return false;\n }\n\n const confirmedSnapshot = await readLockSnapshot(path);\n if (\n confirmedSnapshot.metaRaw !== firstSnapshot.metaRaw ||\n confirmedSnapshot.pid !== firstSnapshot.pid ||\n !confirmedSnapshot.hasStalePid\n ) {\n return false;\n }\n\n await rm(path, { force: true });\n return true;\n}\n\nfunction isPidAlive(pid: number): boolean {\n try {\n process.kill(pid, 0);\n return true;\n } catch (err) {\n if (getErrorCode(err) === \"ESRCH\") {\n return false;\n }\n return true;\n }\n}\n\nfunction getErrorCode(err: unknown): string | undefined {\n if (!err || typeof err !== \"object\") {\n return undefined;\n }\n const code = (err as { code?: unknown }).code;\n return typeof code === \"string\" ? code : undefined;\n}\n\nfunction warnLockReleaseFailure(input: {\n error: unknown;\n lock: AtsLock;\n releaseContext?: HeldLockReleaseContext;\n}): void {\n console.warn(\"[ats.lock.release.warning]\", {\n lockPath: input.lock.path,\n releaseError: toErrorMessage(input.error),\n releaseContext: input.releaseContext ?? {},\n });\n}\n\nfunction toErrorMessage(error: unknown): string {\n return error instanceof Error ? error.message : String(error);\n}\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17],"mappings":";;;;;;;;;;AACA,MAAa,QAAQ,OAAO,OAAO,EAC/B,QAAQ,WACX,CAAC;AACF,SAAyC,aAAa,MAAM,aAAa,QAAQ;CAC7E,SAAS,KAAK,MAAM,KAAK;AACrB,MAAI,CAAC,KAAK,KACN,QAAO,eAAe,MAAM,QAAQ;GAChC,OAAO;IACH;IACA,QAAQ;IACR,wBAAQ,IAAI,KAAK;IACpB;GACD,YAAY;GACf,CAAC;AAEN,MAAI,KAAK,KAAK,OAAO,IAAI,KAAK,CAC1B;AAEJ,OAAK,KAAK,OAAO,IAAI,KAAK;AAC1B,cAAY,MAAM,IAAI;EAEtB,MAAM,QAAQ,EAAE;EAChB,MAAM,OAAO,OAAO,KAAK,MAAM;AAC/B,OAAK,IAAI,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;GAClC,MAAM,IAAI,KAAK;AACf,OAAI,EAAE,KAAK,MACP,MAAK,KAAK,MAAM,GAAG,KAAK,KAAK;;;CAKzC,MAAM,SAAS,QAAQ,UAAU;CACjC,MAAM,mBAAmB,OAAO;AAEhC,QAAO,eAAe,YAAY,QAAQ,EAAE,OAAO,MAAM,CAAC;CAC1D,SAAS,EAAE,KAAK;EACZ,IAAI;EACJ,MAAM,OAAO,QAAQ,SAAS,IAAI,YAAY,GAAG;AACjD,OAAK,MAAM,IAAI;AACf,GAAC,KAAK,KAAK,MAAM,aAAa,GAAG,WAAW,EAAE;AAC9C,OAAK,MAAM,MAAM,KAAK,KAAK,SACvB,KAAI;AAER,SAAO;;AAEX,QAAO,eAAe,GAAG,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ACD;EACC,OAAO,eAAe,GAAG,WAAW;EACpC,MAAM;EACN,UAAU;GACT;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,iBAAiB;EACjB,gBAAgB;EAChB;CACD;EACC,OAAO,eAAe,GAAG,WAAW;EACpC,MAAM;EACN,UAAU,CAAC,gDAAgD;EAC3D,iBAAiB;EACjB,gBAAgB;EAChB;CACD;EACC,OAAO,eAAe,GAAG,WAAW;EACpC,MAAM;EACN,kBAAkB;EAClB,UAAU;GACT;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,iBAAiB;EACjB,gBAAgB;EAChB;CACD;EACC,OAAO,eAAe,GAAG,WAAW;EACpC,MAAM;EACN,UAAU;GACT;GACA;GACA;GACA;GACA;EACD,iBAAiB;EACjB,gBAAgB;EAChB;CACD;EACC,MAAM;EACN,MAAM;EACN,UAAU,CAAC,wCAAwC,+DAA+D;EAClH,iBAAiB;EACjB,gBAAgB;EAChB;CACD;EACC,MAAM;EACN,MAAM;EACN,UAAU;GACT;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,gBAAgB;EAChB;CACD;EACC,MAAM;EACN,MAAM;EACN,UAAU,CAAC,6CAA6C,sDAAsD;EAC9G,iBAAiB;EACjB,gBAAgB;EAChB;CACD;EACC,OAAO,eAAe,uCAAuC,uBAAuB,WAAW,CAAC;EAChG,MAAM;EACN,UAAU,CAAC,uCAAuC;EAClD,iBAAiB;EACjB,gBAAgB;EAChB;CACD;EACC,OAAO,eAAe,uBAAuB,uBAAuB,WAAW,CAAC;EAChF,MAAM;EACN,UAAU,CAAC,iCAAiC,yBAAyB;EACrE,iBAAiB;EACjB,gBAAgB;EAChB;CACD;EACC,OAAO,eAAe,GAAG,WAAW;EACpC,MAAM;EACN,UAAU,CAAC,qCAAqC,yBAAyB;EACzE,iBAAiB;EACjB,gBAAgB;EAChB;CACD;EACC,OAAO,eAAe,8BAA8B,uBAAuB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