@tankpkg/mcp-server 0.15.3 → 0.15.5

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/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["REGISTRY_URL","supportLevelSchema","adapterCapabilitiesSchema","compilationWarningSchema","extensionBagSchema","modelTierSchema","canonicalToolNameSchema","agentIRSchema","hookEventSchema","hookActionIRSchema","hookHandlerIRSchema","hookIRSchema","instructionIRSchema","networkPermissionsSchema","filesystemPermissionsSchema","permissionsSchema","promptIRSchema","resourceIRSchema","ruleIRSchema","mcpServerConfigSchema","toolIRSchema","NAME_PATTERN","SEMVER_PATTERN","atomIRSchema","commandSchema","argSchema","envSchema","remoteUrlSchema","mcpServerSchema","perToolOverrideSchema","baseManifestFields","SKILL_SOURCES","SCAN_VERDICTS","lockedSkillV1Schema","lockedSkillSchema","SEMVER_PATTERN","ALPHANUMERIC","SCOPED_NAME_PATTERN","parseLockKey","SCOPED_NAME_PATTERN","SCOPED_NAME_PATTERN","getSkillDir","crypto","SCOPED_NAME_PATTERN","getSkillDir","crypto","SCOPED_NAME_PATTERN","getSkillDir","SCOPED_NAME_PATTERN","getSkillDir","parseLockKey"],"sources":["../../internals-schemas/dist/index.js","../../sdk/dist/index.mjs","../src/lib/config.ts","../src/lib/api-client.ts","../src/tools/audit-skill.ts","../src/tools/doctor.ts","../src/tools/init-skill.ts","../../internals-helpers/dist/index.js","../src/tools/install-skill.ts","../src/tools/link-skill.ts","../src/tools/login.ts","../src/tools/logout.ts","../src/lib/packer.ts","../src/tools/publish-skill.ts","../src/tools/remove-skill.ts","../src/tools/scan-skill.ts","../src/tools/search-skills.ts","../src/tools/skill-info.ts","../src/tools/skill-permissions.ts","../src/tools/unlink-skill.ts","../src/tools/update-skill.ts","../src/tools/verify-skills.ts","../src/tools/whoami.ts","../src/index.ts"],"sourcesContent":["import { z } from \"zod\";\n//#region src/constants/permissions.ts\nconst PERMISSION_CATEGORIES = [\n\t\"network\",\n\t\"filesystem\",\n\t\"subprocess\"\n];\nconst DEFAULT_PERMISSIONS = {\n\tnetwork: void 0,\n\tfilesystem: void 0,\n\tsubprocess: false\n};\n//#endregion\n//#region src/constants/registry.ts\nconst REGISTRY_URL = process.env.TANK_REGISTRY_URL || \"https://www.tankpkg.dev\";\nconst REGISTRY_API_VERSION = \"v1\";\nconst MAX_PACKAGE_SIZE = 50 * 1024 * 1024;\nconst MAX_FILE_COUNT = 1e3;\nconst MAX_NAME_LENGTH = 214;\nconst MAX_DESCRIPTION_LENGTH = 500;\nconst LOCKFILE_VERSION = 2;\nconst MANIFEST_FILENAME = \"tank.json\";\nconst LEGACY_MANIFEST_FILENAME = \"skills.json\";\nconst LOCKFILE_FILENAME = \"tank.lock\";\nconst LEGACY_LOCKFILE_FILENAME = \"skills.lock\";\n//#endregion\n//#region src/schemas/adapters/capabilities.ts\nconst supportLevelSchema = z.enum([\n\t\"full\",\n\t\"degraded\",\n\t\"none\"\n]);\nconst adapterCapabilitiesSchema = z.object({\n\tinstruction: supportLevelSchema,\n\thook: supportLevelSchema,\n\ttool: supportLevelSchema,\n\tagent: supportLevelSchema,\n\trule: supportLevelSchema,\n\tresource: supportLevelSchema,\n\tprompt: supportLevelSchema\n}).strict();\n//#endregion\n//#region src/schemas/adapters/platform-adapter.ts\nconst compilationWarningSchema = z.object({\n\tlevel: z.enum([\"degraded\", \"skipped\"]),\n\tatomKind: z.string(),\n\tmessage: z.string()\n}).strict();\nconst fileWriteSchema = z.object({\n\tpath: z.string().min(1),\n\tcontent: z.string()\n}).strict();\nconst platformOutputSchema = z.object({\n\tfiles: z.array(fileWriteSchema),\n\twarnings: z.array(compilationWarningSchema)\n}).strict();\nconst platformAdapterMetaSchema = z.object({\n\tname: z.string().min(1, \"Adapter name must not be empty\"),\n\tsupportedRange: z.string().min(1, \"Supported range must not be empty\"),\n\tcapabilities: adapterCapabilitiesSchema\n}).strict();\n//#endregion\n//#region src/schemas/atoms/base.ts\nconst atomKindSchema = z.enum([\n\t\"instruction\",\n\t\"hook\",\n\t\"tool\",\n\t\"agent\",\n\t\"rule\",\n\t\"resource\",\n\t\"prompt\"\n]);\nconst extensionBagSchema = z.record(z.string(), z.unknown()).optional();\n//#endregion\n//#region src/schemas/atoms/model-tiers.ts\nconst modelTierSchema = z.enum([\n\t\"fast\",\n\t\"balanced\",\n\t\"powerful\",\n\t\"custom\"\n]);\nconst MODEL_TIERS = modelTierSchema.options;\n//#endregion\n//#region src/schemas/atoms/tool-names.ts\nconst canonicalToolNameSchema = z.enum([\n\t\"bash\",\n\t\"read\",\n\t\"write\",\n\t\"edit\",\n\t\"grep\",\n\t\"glob\",\n\t\"lsp\",\n\t\"mcp\",\n\t\"browser\",\n\t\"fetch\",\n\t\"git\",\n\t\"task\",\n\t\"notebook\"\n]);\nconst CANONICAL_TOOL_NAMES = canonicalToolNameSchema.options;\n//#endregion\n//#region src/schemas/atoms/agent.ts\nconst agentIRSchema = z.object({\n\tkind: z.literal(\"agent\"),\n\tname: z.string().min(1, \"Agent name must not be empty\"),\n\trole: z.string().min(1, \"Agent role must not be empty\"),\n\ttools: z.array(canonicalToolNameSchema.or(z.string().min(1))).optional(),\n\tmodel: modelTierSchema.or(z.string().min(1)).optional(),\n\treadonly: z.boolean().optional(),\n\textensions: extensionBagSchema\n}).strict();\n//#endregion\n//#region src/schemas/atoms/events.ts\nconst hookEventSchema = z.enum([\n\t\"pre-tool-use\",\n\t\"post-tool-use\",\n\t\"pre-file-read\",\n\t\"post-file-read\",\n\t\"pre-file-write\",\n\t\"post-file-write\",\n\t\"file-edited\",\n\t\"file-watcher-updated\",\n\t\"pre-command\",\n\t\"post-command\",\n\t\"pre-mcp-tool-use\",\n\t\"post-mcp-tool-use\",\n\t\"session-created\",\n\t\"session-updated\",\n\t\"session-idle\",\n\t\"session-error\",\n\t\"session-deleted\",\n\t\"pre-stop\",\n\t\"task-start\",\n\t\"task-resume\",\n\t\"task-complete\",\n\t\"task-cancel\",\n\t\"pre-user-prompt\",\n\t\"post-response\",\n\t\"message-updated\",\n\t\"message-removed\",\n\t\"system-prompt-transform\",\n\t\"pre-context-compact\",\n\t\"post-context-compact\",\n\t\"permission-asked\",\n\t\"permission-replied\",\n\t\"lsp-diagnostics\",\n\t\"lsp-updated\",\n\t\"subagent-start\",\n\t\"subagent-complete\",\n\t\"subagent-tool-use\",\n\t\"shell-env\",\n\t\"todo-updated\",\n\t\"installation-updated\"\n]);\nconst HOOK_EVENTS = hookEventSchema.options;\n//#endregion\n//#region src/schemas/atoms/hook.ts\nconst hookActionIRSchema = z.object({\n\taction: z.enum([\n\t\t\"block\",\n\t\t\"allow\",\n\t\t\"rewrite\",\n\t\t\"injectContext\"\n\t]),\n\tmatch: z.string().optional(),\n\treason: z.string().optional(),\n\tvalue: z.string().optional()\n}).strict();\nconst hookDslHandlerSchema = z.object({\n\ttype: z.literal(\"dsl\"),\n\tactions: z.array(hookActionIRSchema).min(1, \"DSL handler must have at least one action\")\n}).strict();\nconst hookJsHandlerSchema = z.object({\n\ttype: z.literal(\"js\"),\n\tentry: z.string().min(1, \"JS handler entry path must not be empty\")\n}).strict();\nconst hookHandlerIRSchema = z.discriminatedUnion(\"type\", [hookDslHandlerSchema, hookJsHandlerSchema]);\nconst hookIRSchema = z.object({\n\tkind: z.literal(\"hook\"),\n\tname: z.string().optional(),\n\tevent: hookEventSchema,\n\tmatch: canonicalToolNameSchema.or(z.string().min(1)).optional(),\n\thandler: hookHandlerIRSchema,\n\tscope: z.enum([\"project\", \"global\"]).optional(),\n\textensions: extensionBagSchema\n}).strict();\n//#endregion\n//#region src/schemas/atoms/instruction.ts\nconst instructionIRSchema = z.object({\n\tkind: z.literal(\"instruction\"),\n\tcontent: z.string().min(1, \"Content path must not be empty\"),\n\tscope: z.enum([\n\t\t\"project\",\n\t\t\"global\",\n\t\t\"directory\"\n\t]).optional(),\n\tglobs: z.array(z.string()).optional(),\n\textensions: extensionBagSchema\n}).strict();\n//#endregion\n//#region src/schemas/permissions.ts\nconst networkPermissionsSchema = z.object({ outbound: z.array(z.string()).optional() }).strict();\nconst filesystemPermissionsSchema = z.object({\n\tread: z.array(z.string()).optional(),\n\twrite: z.array(z.string()).optional()\n}).strict();\nconst permissionsSchema = z.object({\n\tnetwork: networkPermissionsSchema.optional(),\n\tfilesystem: filesystemPermissionsSchema.optional(),\n\tsubprocess: z.boolean().optional()\n}).strict();\nconst userRoleSchema = z.enum([\"user\", \"admin\"]);\nconst userStatusSchema = z.enum([\n\t\"active\",\n\t\"suspended\",\n\t\"banned\"\n]);\nconst skillStatusSchema = z.enum([\n\t\"active\",\n\t\"deprecated\",\n\t\"quarantined\",\n\t\"removed\"\n]);\nconst adminActionSchema = z.enum([\n\t\"user.ban\",\n\t\"user.suspend\",\n\t\"user.unban\",\n\t\"user.promote\",\n\t\"user.demote\",\n\t\"skill.quarantine\",\n\t\"skill.remove\",\n\t\"skill.deprecate\",\n\t\"skill.restore\",\n\t\"skill.feature\",\n\t\"skill.unfeature\",\n\t\"org.suspend\",\n\t\"org.member.remove\",\n\t\"org.delete\"\n]);\nfunction isAdmin(role) {\n\treturn role === \"admin\";\n}\n//#endregion\n//#region src/schemas/atoms/prompt.ts\nconst promptIRSchema = z.object({\n\tkind: z.literal(\"prompt\"),\n\tname: z.string().min(1, \"Prompt name must not be empty\"),\n\tdescription: z.string().optional(),\n\ttemplate: z.string().min(1, \"Prompt template path must not be empty\"),\n\targuments: z.array(z.object({\n\t\tname: z.string(),\n\t\tdescription: z.string().optional(),\n\t\trequired: z.boolean().optional()\n\t}).strict()).optional(),\n\textensions: extensionBagSchema\n}).strict();\n//#endregion\n//#region src/schemas/atoms/resource.ts\nconst resourceIRSchema = z.object({\n\tkind: z.literal(\"resource\"),\n\tname: z.string().optional(),\n\turi: z.string().min(1, \"Resource URI must not be empty\"),\n\tdescription: z.string().optional(),\n\tmimeType: z.string().optional(),\n\textensions: extensionBagSchema\n}).strict();\n//#endregion\n//#region src/schemas/atoms/rule.ts\nconst ruleIRSchema = z.object({\n\tkind: z.literal(\"rule\"),\n\tname: z.string().optional(),\n\tevent: hookEventSchema,\n\tmatch: canonicalToolNameSchema.or(z.string().min(1)).optional(),\n\tpolicy: z.enum([\n\t\t\"block\",\n\t\t\"allow\",\n\t\t\"warn\"\n\t]),\n\treason: z.string().optional(),\n\textensions: extensionBagSchema\n}).strict();\n//#endregion\n//#region src/schemas/atoms/tool.ts\nconst mcpServerConfigSchema = z.object({\n\tcommand: z.string().min(1).optional(),\n\targs: z.array(z.string()).optional(),\n\tenv: z.record(z.string(), z.string()).optional(),\n\truntime: z.string().min(1).optional(),\n\tentry: z.string().min(1).optional()\n}).strict().refine((data) => data.command || data.runtime && data.entry, \"MCP config must have either \\\"command\\\" or both \\\"runtime\\\" and \\\"entry\\\"\");\nconst toolIRSchema = z.object({\n\tkind: z.literal(\"tool\"),\n\tname: z.string().min(1, \"Tool name must not be empty\"),\n\tdescription: z.string().optional(),\n\tmcp: mcpServerConfigSchema.optional(),\n\textensions: extensionBagSchema\n}).strict();\n//#endregion\n//#region src/schemas/atoms/package.ts\nconst NAME_PATTERN = /^@[a-z0-9-]+\\/[a-z0-9][a-z0-9-]*$/;\nconst SEMVER_PATTERN = /^\\d+\\.\\d+\\.\\d+(-[a-zA-Z0-9.-]+)?(\\+[a-zA-Z0-9.-]+)?$/;\nconst atomIRSchema = z.discriminatedUnion(\"kind\", [\n\tinstructionIRSchema,\n\thookIRSchema,\n\ttoolIRSchema,\n\tagentIRSchema,\n\truleIRSchema,\n\tresourceIRSchema,\n\tpromptIRSchema\n]);\nconst packageIRSchema = z.object({\n\tname: z.string().min(1, \"Name must not be empty\").max(214, `Name must be 214 characters or fewer`).regex(NAME_PATTERN, \"Name must be scoped (@org/name), lowercase alphanumeric and hyphens\"),\n\tversion: z.string().regex(SEMVER_PATTERN, \"Version must be valid semver\"),\n\tdescription: z.string().max(500).optional(),\n\tatoms: z.array(atomIRSchema),\n\tincludes: z.array(z.string()).optional(),\n\tskills: z.record(z.string(), z.string()).optional(),\n\tpermissions: permissionsSchema.optional(),\n\trepository: z.string().url(\"Repository must be a valid URL\").optional(),\n\tvisibility: z.enum([\"public\", \"private\"]).optional(),\n\taudit: z.object({ min_score: z.number().min(0).max(10) }).strict().optional()\n}).strict();\n//#endregion\n//#region src/schemas/mcp-server.ts\nconst commandSchema = z.string().min(1, \"command must not be empty\");\nconst argSchema = z.array(z.string()).default([]);\nconst envSchema = z.record(z.string(), z.string()).optional();\nconst remoteUrlSchema = z.string().url(\"remote must be a valid URL\");\nconst localMcpServerSchema = z.object({\n\tcommand: commandSchema,\n\targs: argSchema,\n\tenv: envSchema,\n\trequires_auth: z.literal(false).optional()\n}).strict();\nconst remoteMcpServerSchema = z.object({\n\tremote: remoteUrlSchema,\n\trequires_auth: z.boolean().default(false),\n\tenv: envSchema\n}).strict();\nconst mcpServerSchema = z.union([localMcpServerSchema, remoteMcpServerSchema]);\nfunction isRemoteMcpServer(server) {\n\treturn \"remote\" in server;\n}\n//#endregion\n//#region src/schemas/proxy-policy.ts\nconst perToolOverrideSchema = z.object({\n\tscan: z.boolean().optional(),\n\tblockOnMatch: z.boolean().optional()\n}).strict();\nconst proxyPolicySchema = z.object({\n\tperfBudgetMs: z.number().positive().optional(),\n\tblockOnMatch: z.boolean().optional(),\n\tresetPinsOnMismatch: z.boolean().optional(),\n\tperTool: z.record(z.string(), perToolOverrideSchema).optional()\n}).strict();\n//#endregion\n//#region src/schemas/skills-json.ts\nconst baseManifestFields = {\n\tname: z.string().min(1, \"Name must not be empty\").max(214, `Name must be 214 characters or fewer`).regex(/^@[a-z0-9-]+\\/[a-z0-9][a-z0-9-]*$/, \"Name must be scoped (@org/name), lowercase alphanumeric and hyphens\"),\n\tversion: z.string().regex(/^\\d+\\.\\d+\\.\\d+(-[a-zA-Z0-9.-]+)?(\\+[a-zA-Z0-9.-]+)?$/, \"Version must be valid semver\"),\n\tdescription: z.string().max(500, `Description must be 500 characters or fewer`).optional(),\n\tskills: z.record(z.string(), z.string()).optional(),\n\tpermissions: permissionsSchema.optional(),\n\trepository: z.string().url(\"Repository must be a valid URL\").optional(),\n\tvisibility: z.enum([\"public\", \"private\"]).optional(),\n\taudit: z.object({ min_score: z.number().min(0).max(10) }).strict().optional(),\n\tmcp_server: mcpServerSchema.optional()\n};\n/** Legacy skills.json schema — strict, no atoms. Used for backward-compatible consumers. */\nconst skillsJsonSchema = z.object(baseManifestFields).strict();\n/**\n* Publish manifest schema — accepts both legacy skills.json AND atom-enriched tank.json.\n* The `atoms` and `includes` fields are passed through as opaque JSON arrays,\n* validated only at surface level. Full atom IR validation happens at build time.\n*/\nconst publishManifestSchema = z.object({\n\t...baseManifestFields,\n\tatoms: z.array(z.record(z.string(), z.unknown())).optional(),\n\tincludes: z.array(z.string()).optional()\n}).strict();\n//#endregion\n//#region src/schemas/skills-lock.ts\nconst SKILL_SOURCES = [\n\t\"registry\",\n\t\"github\",\n\t\"clawhub\",\n\t\"skills_sh\",\n\t\"agentskills_il\",\n\t\"npm\",\n\t\"local\"\n];\nconst SCAN_VERDICTS = [\n\t\"pass\",\n\t\"pass_with_notes\",\n\t\"flagged\",\n\t\"fail\",\n\t\"error\"\n];\nconst lockedSkillV1Schema = z.object({\n\tresolved: z.string().url(),\n\tintegrity: z.string().regex(/^sha512-/, \"Integrity must start with sha512-\"),\n\tpermissions: permissionsSchema,\n\taudit_score: z.number().min(0).max(10).nullable()\n});\nconst skillsLockV1Schema = z.object({\n\tlockfileVersion: z.literal(1),\n\tskills: z.record(z.string(), lockedSkillV1Schema)\n});\nconst lockedSkillSchema = z.object({\n\tresolved: z.string().url(),\n\tintegrity: z.string().regex(/^sha512-/, \"Integrity must start with sha512-\"),\n\tpermissions: permissionsSchema,\n\taudit_score: z.number().min(0).max(10).nullable(),\n\tdependencies: z.record(z.string(), z.string()).optional(),\n\tsource: z.enum(SKILL_SOURCES).optional(),\n\tscan_verdict: z.enum(SCAN_VERDICTS).optional(),\n\tscanned_at: z.string().optional()\n});\nconst skillsLockSchema = z.object({\n\tlockfileVersion: z.union([z.literal(1), z.literal(2)]),\n\tskills: z.record(z.string(), lockedSkillSchema)\n});\n//#endregion\nexport { CANONICAL_TOOL_NAMES, DEFAULT_PERMISSIONS, HOOK_EVENTS, LEGACY_LOCKFILE_FILENAME, LEGACY_MANIFEST_FILENAME, LOCKFILE_FILENAME, LOCKFILE_VERSION, MANIFEST_FILENAME, MAX_DESCRIPTION_LENGTH, MAX_FILE_COUNT, MAX_NAME_LENGTH, MAX_PACKAGE_SIZE, MODEL_TIERS, PERMISSION_CATEGORIES, REGISTRY_API_VERSION, REGISTRY_URL, SCAN_VERDICTS, SKILL_SOURCES, adapterCapabilitiesSchema, adminActionSchema, agentIRSchema, atomIRSchema, atomKindSchema, canonicalToolNameSchema, compilationWarningSchema, extensionBagSchema, fileWriteSchema, filesystemPermissionsSchema, hookActionIRSchema, hookDslHandlerSchema, hookEventSchema, hookHandlerIRSchema, hookIRSchema, hookJsHandlerSchema, instructionIRSchema, isAdmin, isRemoteMcpServer, lockedSkillSchema, lockedSkillV1Schema, mcpServerConfigSchema, mcpServerSchema, modelTierSchema, networkPermissionsSchema, packageIRSchema, perToolOverrideSchema, permissionsSchema, platformAdapterMetaSchema, platformOutputSchema, promptIRSchema, proxyPolicySchema, publishManifestSchema, resourceIRSchema, ruleIRSchema, skillStatusSchema, skillsJsonSchema, skillsLockSchema, skillsLockV1Schema, supportLevelSchema, toolIRSchema, userRoleSchema, userStatusSchema };\n\n//# sourceMappingURL=index.js.map","import { createRequire } from \"node:module\";\nimport fs from \"node:fs\";\nimport os from \"node:os\";\nimport path from \"node:path\";\nimport crypto$1 from \"node:crypto\";\nimport { extract } from \"tar\";\n//#region \\0rolldown/runtime.js\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {\n\t\tkey = keys[i];\n\t\tif (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {\n\t\t\tget: ((k) => from[k]).bind(null, key),\n\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t});\n\t}\n\treturn to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", {\n\tvalue: mod,\n\tenumerable: true\n}) : target, mod));\nObject.freeze({ status: \"aborted\" });\nfunction $constructor(name, initializer, params) {\n\tfunction init(inst, def) {\n\t\tif (!inst._zod) Object.defineProperty(inst, \"_zod\", {\n\t\t\tvalue: {\n\t\t\t\tdef,\n\t\t\t\tconstr: _,\n\t\t\t\ttraits: /* @__PURE__ */ new Set()\n\t\t\t},\n\t\t\tenumerable: false\n\t\t});\n\t\tif (inst._zod.traits.has(name)) return;\n\t\tinst._zod.traits.add(name);\n\t\tinitializer(inst, def);\n\t\tconst proto = _.prototype;\n\t\tconst keys = Object.keys(proto);\n\t\tfor (let i = 0; i < keys.length; i++) {\n\t\t\tconst k = keys[i];\n\t\t\tif (!(k in inst)) inst[k] = proto[k].bind(inst);\n\t\t}\n\t}\n\tconst Parent = params?.Parent ?? Object;\n\tclass Definition extends Parent {}\n\tObject.defineProperty(Definition, \"name\", { value: name });\n\tfunction _(def) {\n\t\tvar _a;\n\t\tconst inst = params?.Parent ? new Definition() : this;\n\t\tinit(inst, def);\n\t\t(_a = inst._zod).deferred ?? (_a.deferred = []);\n\t\tfor (const fn of inst._zod.deferred) fn();\n\t\treturn inst;\n\t}\n\tObject.defineProperty(_, \"init\", { value: init });\n\tObject.defineProperty(_, Symbol.hasInstance, { value: (inst) => {\n\t\tif (params?.Parent && inst instanceof params.Parent) return true;\n\t\treturn inst?._zod?.traits?.has(name);\n\t} });\n\tObject.defineProperty(_, \"name\", { value: name });\n\treturn _;\n}\nvar $ZodAsyncError = class extends Error {\n\tconstructor() {\n\t\tsuper(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);\n\t}\n};\nvar $ZodEncodeError = class extends Error {\n\tconstructor(name) {\n\t\tsuper(`Encountered unidirectional transform during encode: ${name}`);\n\t\tthis.name = \"ZodEncodeError\";\n\t}\n};\nconst globalConfig = {};\nfunction config(newConfig) {\n\tif (newConfig) Object.assign(globalConfig, newConfig);\n\treturn globalConfig;\n}\n//#endregion\n//#region ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/util.js\nfunction getEnumValues(entries) {\n\tconst numericValues = Object.values(entries).filter((v) => typeof v === \"number\");\n\treturn Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);\n}\nfunction jsonStringifyReplacer(_, value) {\n\tif (typeof value === \"bigint\") return value.toString();\n\treturn value;\n}\nfunction cached(getter) {\n\treturn { get value() {\n\t\t{\n\t\t\tconst value = getter();\n\t\t\tObject.defineProperty(this, \"value\", { value });\n\t\t\treturn value;\n\t\t}\n\t\tthrow new Error(\"cached value already set\");\n\t} };\n}\nfunction nullish(input) {\n\treturn input === null || input === void 0;\n}\nfunction cleanRegex(source) {\n\tconst start = source.startsWith(\"^\") ? 1 : 0;\n\tconst end = source.endsWith(\"$\") ? source.length - 1 : source.length;\n\treturn source.slice(start, end);\n}\nfunction floatSafeRemainder(val, step) {\n\tconst valDecCount = (val.toString().split(\".\")[1] || \"\").length;\n\tconst stepString = step.toString();\n\tlet stepDecCount = (stepString.split(\".\")[1] || \"\").length;\n\tif (stepDecCount === 0 && /\\d?e-\\d?/.test(stepString)) {\n\t\tconst match = stepString.match(/\\d?e-(\\d?)/);\n\t\tif (match?.[1]) stepDecCount = Number.parseInt(match[1]);\n\t}\n\tconst decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;\n\treturn Number.parseInt(val.toFixed(decCount).replace(\".\", \"\")) % Number.parseInt(step.toFixed(decCount).replace(\".\", \"\")) / 10 ** decCount;\n}\nconst EVALUATING = Symbol(\"evaluating\");\nfunction defineLazy(object, key, getter) {\n\tlet value = void 0;\n\tObject.defineProperty(object, key, {\n\t\tget() {\n\t\t\tif (value === EVALUATING) return;\n\t\t\tif (value === void 0) {\n\t\t\t\tvalue = EVALUATING;\n\t\t\t\tvalue = getter();\n\t\t\t}\n\t\t\treturn value;\n\t\t},\n\t\tset(v) {\n\t\t\tObject.defineProperty(object, key, { value: v });\n\t\t},\n\t\tconfigurable: true\n\t});\n}\nfunction assignProp(target, prop, value) {\n\tObject.defineProperty(target, prop, {\n\t\tvalue,\n\t\twritable: true,\n\t\tenumerable: true,\n\t\tconfigurable: true\n\t});\n}\nfunction mergeDefs(...defs) {\n\tconst mergedDescriptors = {};\n\tfor (const def of defs) Object.assign(mergedDescriptors, Object.getOwnPropertyDescriptors(def));\n\treturn Object.defineProperties({}, mergedDescriptors);\n}\nfunction esc(str) {\n\treturn JSON.stringify(str);\n}\nfunction slugify(input) {\n\treturn input.toLowerCase().trim().replace(/[^\\w\\s-]/g, \"\").replace(/[\\s_-]+/g, \"-\").replace(/^-+|-+$/g, \"\");\n}\nconst captureStackTrace = \"captureStackTrace\" in Error ? Error.captureStackTrace : (..._args) => {};\nfunction isObject(data) {\n\treturn typeof data === \"object\" && data !== null && !Array.isArray(data);\n}\nconst allowsEval = cached(() => {\n\tif (typeof navigator !== \"undefined\" && navigator?.userAgent?.includes(\"Cloudflare\")) return false;\n\ttry {\n\t\tnew Function(\"\");\n\t\treturn true;\n\t} catch (_) {\n\t\treturn false;\n\t}\n});\nfunction isPlainObject(o) {\n\tif (isObject(o) === false) return false;\n\tconst ctor = o.constructor;\n\tif (ctor === void 0) return true;\n\tif (typeof ctor !== \"function\") return true;\n\tconst prot = ctor.prototype;\n\tif (isObject(prot) === false) return false;\n\tif (Object.prototype.hasOwnProperty.call(prot, \"isPrototypeOf\") === false) return false;\n\treturn true;\n}\nfunction shallowClone(o) {\n\tif (isPlainObject(o)) return { ...o };\n\tif (Array.isArray(o)) return [...o];\n\treturn o;\n}\nconst propertyKeyTypes = new Set([\n\t\"string\",\n\t\"number\",\n\t\"symbol\"\n]);\nfunction escapeRegex(str) {\n\treturn str.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n}\nfunction clone(inst, def, params) {\n\tconst cl = new inst._zod.constr(def ?? inst._zod.def);\n\tif (!def || params?.parent) cl._zod.parent = inst;\n\treturn cl;\n}\nfunction normalizeParams(_params) {\n\tconst params = _params;\n\tif (!params) return {};\n\tif (typeof params === \"string\") return { error: () => params };\n\tif (params?.message !== void 0) {\n\t\tif (params?.error !== void 0) throw new Error(\"Cannot specify both `message` and `error` params\");\n\t\tparams.error = params.message;\n\t}\n\tdelete params.message;\n\tif (typeof params.error === \"string\") return {\n\t\t...params,\n\t\terror: () => params.error\n\t};\n\treturn params;\n}\nfunction optionalKeys(shape) {\n\treturn Object.keys(shape).filter((k) => {\n\t\treturn shape[k]._zod.optin === \"optional\" && shape[k]._zod.optout === \"optional\";\n\t});\n}\nconst NUMBER_FORMAT_RANGES = {\n\tsafeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],\n\tint32: [-2147483648, 2147483647],\n\tuint32: [0, 4294967295],\n\tfloat32: [-34028234663852886e22, 34028234663852886e22],\n\tfloat64: [-Number.MAX_VALUE, Number.MAX_VALUE]\n};\nfunction pick(schema, mask) {\n\tconst currDef = schema._zod.def;\n\tconst checks = currDef.checks;\n\tif (checks && checks.length > 0) throw new Error(\".pick() cannot be used on object schemas containing refinements\");\n\treturn clone(schema, mergeDefs(schema._zod.def, {\n\t\tget shape() {\n\t\t\tconst newShape = {};\n\t\t\tfor (const key in mask) {\n\t\t\t\tif (!(key in currDef.shape)) throw new Error(`Unrecognized key: \"${key}\"`);\n\t\t\t\tif (!mask[key]) continue;\n\t\t\t\tnewShape[key] = currDef.shape[key];\n\t\t\t}\n\t\t\tassignProp(this, \"shape\", newShape);\n\t\t\treturn newShape;\n\t\t},\n\t\tchecks: []\n\t}));\n}\nfunction omit(schema, mask) {\n\tconst currDef = schema._zod.def;\n\tconst checks = currDef.checks;\n\tif (checks && checks.length > 0) throw new Error(\".omit() cannot be used on object schemas containing refinements\");\n\treturn clone(schema, mergeDefs(schema._zod.def, {\n\t\tget shape() {\n\t\t\tconst newShape = { ...schema._zod.def.shape };\n\t\t\tfor (const key in mask) {\n\t\t\t\tif (!(key in currDef.shape)) throw new Error(`Unrecognized key: \"${key}\"`);\n\t\t\t\tif (!mask[key]) continue;\n\t\t\t\tdelete newShape[key];\n\t\t\t}\n\t\t\tassignProp(this, \"shape\", newShape);\n\t\t\treturn newShape;\n\t\t},\n\t\tchecks: []\n\t}));\n}\nfunction extend(schema, shape) {\n\tif (!isPlainObject(shape)) throw new Error(\"Invalid input to extend: expected a plain object\");\n\tconst checks = schema._zod.def.checks;\n\tif (checks && checks.length > 0) {\n\t\tconst existingShape = schema._zod.def.shape;\n\t\tfor (const key in shape) if (Object.getOwnPropertyDescriptor(existingShape, key) !== void 0) throw new Error(\"Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.\");\n\t}\n\treturn clone(schema, mergeDefs(schema._zod.def, { get shape() {\n\t\tconst _shape = {\n\t\t\t...schema._zod.def.shape,\n\t\t\t...shape\n\t\t};\n\t\tassignProp(this, \"shape\", _shape);\n\t\treturn _shape;\n\t} }));\n}\nfunction safeExtend(schema, shape) {\n\tif (!isPlainObject(shape)) throw new Error(\"Invalid input to safeExtend: expected a plain object\");\n\treturn clone(schema, mergeDefs(schema._zod.def, { get shape() {\n\t\tconst _shape = {\n\t\t\t...schema._zod.def.shape,\n\t\t\t...shape\n\t\t};\n\t\tassignProp(this, \"shape\", _shape);\n\t\treturn _shape;\n\t} }));\n}\nfunction merge(a, b) {\n\treturn clone(a, mergeDefs(a._zod.def, {\n\t\tget shape() {\n\t\t\tconst _shape = {\n\t\t\t\t...a._zod.def.shape,\n\t\t\t\t...b._zod.def.shape\n\t\t\t};\n\t\t\tassignProp(this, \"shape\", _shape);\n\t\t\treturn _shape;\n\t\t},\n\t\tget catchall() {\n\t\t\treturn b._zod.def.catchall;\n\t\t},\n\t\tchecks: []\n\t}));\n}\nfunction partial(Class, schema, mask) {\n\tconst checks = schema._zod.def.checks;\n\tif (checks && checks.length > 0) throw new Error(\".partial() cannot be used on object schemas containing refinements\");\n\treturn clone(schema, mergeDefs(schema._zod.def, {\n\t\tget shape() {\n\t\t\tconst oldShape = schema._zod.def.shape;\n\t\t\tconst shape = { ...oldShape };\n\t\t\tif (mask) for (const key in mask) {\n\t\t\t\tif (!(key in oldShape)) throw new Error(`Unrecognized key: \"${key}\"`);\n\t\t\t\tif (!mask[key]) continue;\n\t\t\t\tshape[key] = Class ? new Class({\n\t\t\t\t\ttype: \"optional\",\n\t\t\t\t\tinnerType: oldShape[key]\n\t\t\t\t}) : oldShape[key];\n\t\t\t}\n\t\t\telse for (const key in oldShape) shape[key] = Class ? new Class({\n\t\t\t\ttype: \"optional\",\n\t\t\t\tinnerType: oldShape[key]\n\t\t\t}) : oldShape[key];\n\t\t\tassignProp(this, \"shape\", shape);\n\t\t\treturn shape;\n\t\t},\n\t\tchecks: []\n\t}));\n}\nfunction required(Class, schema, mask) {\n\treturn clone(schema, mergeDefs(schema._zod.def, { get shape() {\n\t\tconst oldShape = schema._zod.def.shape;\n\t\tconst shape = { ...oldShape };\n\t\tif (mask) for (const key in mask) {\n\t\t\tif (!(key in shape)) throw new Error(`Unrecognized key: \"${key}\"`);\n\t\t\tif (!mask[key]) continue;\n\t\t\tshape[key] = new Class({\n\t\t\t\ttype: \"nonoptional\",\n\t\t\t\tinnerType: oldShape[key]\n\t\t\t});\n\t\t}\n\t\telse for (const key in oldShape) shape[key] = new Class({\n\t\t\ttype: \"nonoptional\",\n\t\t\tinnerType: oldShape[key]\n\t\t});\n\t\tassignProp(this, \"shape\", shape);\n\t\treturn shape;\n\t} }));\n}\nfunction aborted(x, startIndex = 0) {\n\tif (x.aborted === true) return true;\n\tfor (let i = startIndex; i < x.issues.length; i++) if (x.issues[i]?.continue !== true) return true;\n\treturn false;\n}\nfunction prefixIssues(path, issues) {\n\treturn issues.map((iss) => {\n\t\tvar _a;\n\t\t(_a = iss).path ?? (_a.path = []);\n\t\tiss.path.unshift(path);\n\t\treturn iss;\n\t});\n}\nfunction unwrapMessage(message) {\n\treturn typeof message === \"string\" ? message : message?.message;\n}\nfunction finalizeIssue(iss, ctx, config) {\n\tconst full = {\n\t\t...iss,\n\t\tpath: iss.path ?? []\n\t};\n\tif (!iss.message) full.message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config.customError?.(iss)) ?? unwrapMessage(config.localeError?.(iss)) ?? \"Invalid input\";\n\tdelete full.inst;\n\tdelete full.continue;\n\tif (!ctx?.reportInput) delete full.input;\n\treturn full;\n}\nfunction getLengthableOrigin(input) {\n\tif (Array.isArray(input)) return \"array\";\n\tif (typeof input === \"string\") return \"string\";\n\treturn \"unknown\";\n}\nfunction issue(...args) {\n\tconst [iss, input, inst] = args;\n\tif (typeof iss === \"string\") return {\n\t\tmessage: iss,\n\t\tcode: \"custom\",\n\t\tinput,\n\t\tinst\n\t};\n\treturn { ...iss };\n}\n//#endregion\n//#region ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/errors.js\nconst initializer$1 = (inst, def) => {\n\tinst.name = \"$ZodError\";\n\tObject.defineProperty(inst, \"_zod\", {\n\t\tvalue: inst._zod,\n\t\tenumerable: false\n\t});\n\tObject.defineProperty(inst, \"issues\", {\n\t\tvalue: def,\n\t\tenumerable: false\n\t});\n\tinst.message = JSON.stringify(def, jsonStringifyReplacer, 2);\n\tObject.defineProperty(inst, \"toString\", {\n\t\tvalue: () => inst.message,\n\t\tenumerable: false\n\t});\n};\nconst $ZodError = $constructor(\"$ZodError\", initializer$1);\nconst $ZodRealError = $constructor(\"$ZodError\", initializer$1, { Parent: Error });\nfunction flattenError(error, mapper = (issue) => issue.message) {\n\tconst fieldErrors = {};\n\tconst formErrors = [];\n\tfor (const sub of error.issues) if (sub.path.length > 0) {\n\t\tfieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];\n\t\tfieldErrors[sub.path[0]].push(mapper(sub));\n\t} else formErrors.push(mapper(sub));\n\treturn {\n\t\tformErrors,\n\t\tfieldErrors\n\t};\n}\nfunction formatError(error, mapper = (issue) => issue.message) {\n\tconst fieldErrors = { _errors: [] };\n\tconst processError = (error) => {\n\t\tfor (const issue of error.issues) if (issue.code === \"invalid_union\" && issue.errors.length) issue.errors.map((issues) => processError({ issues }));\n\t\telse if (issue.code === \"invalid_key\") processError({ issues: issue.issues });\n\t\telse if (issue.code === \"invalid_element\") processError({ issues: issue.issues });\n\t\telse if (issue.path.length === 0) fieldErrors._errors.push(mapper(issue));\n\t\telse {\n\t\t\tlet curr = fieldErrors;\n\t\t\tlet i = 0;\n\t\t\twhile (i < issue.path.length) {\n\t\t\t\tconst el = issue.path[i];\n\t\t\t\tif (!(i === issue.path.length - 1)) curr[el] = curr[el] || { _errors: [] };\n\t\t\t\telse {\n\t\t\t\t\tcurr[el] = curr[el] || { _errors: [] };\n\t\t\t\t\tcurr[el]._errors.push(mapper(issue));\n\t\t\t\t}\n\t\t\t\tcurr = curr[el];\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t};\n\tprocessError(error);\n\treturn fieldErrors;\n}\n//#endregion\n//#region ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/parse.js\nconst _parse = (_Err) => (schema, value, _ctx, _params) => {\n\tconst ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };\n\tconst result = schema._zod.run({\n\t\tvalue,\n\t\tissues: []\n\t}, ctx);\n\tif (result instanceof Promise) throw new $ZodAsyncError();\n\tif (result.issues.length) {\n\t\tconst e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));\n\t\tcaptureStackTrace(e, _params?.callee);\n\t\tthrow e;\n\t}\n\treturn result.value;\n};\nconst _parseAsync = (_Err) => async (schema, value, _ctx, params) => {\n\tconst ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };\n\tlet result = schema._zod.run({\n\t\tvalue,\n\t\tissues: []\n\t}, ctx);\n\tif (result instanceof Promise) result = await result;\n\tif (result.issues.length) {\n\t\tconst e = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));\n\t\tcaptureStackTrace(e, params?.callee);\n\t\tthrow e;\n\t}\n\treturn result.value;\n};\nconst _safeParse = (_Err) => (schema, value, _ctx) => {\n\tconst ctx = _ctx ? {\n\t\t..._ctx,\n\t\tasync: false\n\t} : { async: false };\n\tconst result = schema._zod.run({\n\t\tvalue,\n\t\tissues: []\n\t}, ctx);\n\tif (result instanceof Promise) throw new $ZodAsyncError();\n\treturn result.issues.length ? {\n\t\tsuccess: false,\n\t\terror: new (_Err ?? $ZodError)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())))\n\t} : {\n\t\tsuccess: true,\n\t\tdata: result.value\n\t};\n};\nconst safeParse$1 = /* @__PURE__ */ _safeParse($ZodRealError);\nconst _safeParseAsync = (_Err) => async (schema, value, _ctx) => {\n\tconst ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };\n\tlet result = schema._zod.run({\n\t\tvalue,\n\t\tissues: []\n\t}, ctx);\n\tif (result instanceof Promise) result = await result;\n\treturn result.issues.length ? {\n\t\tsuccess: false,\n\t\terror: new _Err(result.issues.map((iss) => finalizeIssue(iss, ctx, config())))\n\t} : {\n\t\tsuccess: true,\n\t\tdata: result.value\n\t};\n};\nconst safeParseAsync$1 = /* @__PURE__ */ _safeParseAsync($ZodRealError);\nconst _encode = (_Err) => (schema, value, _ctx) => {\n\tconst ctx = _ctx ? Object.assign(_ctx, { direction: \"backward\" }) : { direction: \"backward\" };\n\treturn _parse(_Err)(schema, value, ctx);\n};\nconst _decode = (_Err) => (schema, value, _ctx) => {\n\treturn _parse(_Err)(schema, value, _ctx);\n};\nconst _encodeAsync = (_Err) => async (schema, value, _ctx) => {\n\tconst ctx = _ctx ? Object.assign(_ctx, { direction: \"backward\" }) : { direction: \"backward\" };\n\treturn _parseAsync(_Err)(schema, value, ctx);\n};\nconst _decodeAsync = (_Err) => async (schema, value, _ctx) => {\n\treturn _parseAsync(_Err)(schema, value, _ctx);\n};\nconst _safeEncode = (_Err) => (schema, value, _ctx) => {\n\tconst ctx = _ctx ? Object.assign(_ctx, { direction: \"backward\" }) : { direction: \"backward\" };\n\treturn _safeParse(_Err)(schema, value, ctx);\n};\nconst _safeDecode = (_Err) => (schema, value, _ctx) => {\n\treturn _safeParse(_Err)(schema, value, _ctx);\n};\nconst _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {\n\tconst ctx = _ctx ? Object.assign(_ctx, { direction: \"backward\" }) : { direction: \"backward\" };\n\treturn _safeParseAsync(_Err)(schema, value, ctx);\n};\nconst _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {\n\treturn _safeParseAsync(_Err)(schema, value, _ctx);\n};\n//#endregion\n//#region ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/regexes.js\nconst cuid = /^[cC][^\\s-]{8,}$/;\nconst cuid2 = /^[0-9a-z]+$/;\nconst ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;\nconst xid = /^[0-9a-vA-V]{20}$/;\nconst ksuid = /^[A-Za-z0-9]{27}$/;\nconst 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. */\nconst duration$1 = /^P(?:(\\d+W)|(?!.*W)(?=\\d|T\\d)(\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+([.,]\\d+)?S)?)?)$/;\n/** A regex for any UUID-like identifier: 8-4-4-4-12 hex pattern */\nconst 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. */\nconst uuid = (version) => {\n\tif (!version) 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\treturn 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};\n/** Practical email validation */\nconst email = /^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$/;\nconst _emoji$1 = `^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$`;\nfunction emoji() {\n\treturn new RegExp(_emoji$1, \"u\");\n}\nconst 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])$/;\nconst 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}|:))$/;\nconst 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])$/;\nconst 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])$/;\nconst base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;\nconst base64url = /^[A-Za-z0-9_-]*$/;\nconst e164 = /^\\+[1-9]\\d{6,14}$/;\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])))`;\nconst date$1 = /* @__PURE__ */ new RegExp(`^${dateSource}$`);\nfunction timeSource(args) {\n\tconst hhmm = `(?:[01]\\\\d|2[0-3]):[0-5]\\\\d`;\n\treturn typeof args.precision === \"number\" ? args.precision === -1 ? `${hhmm}` : args.precision === 0 ? `${hhmm}:[0-5]\\\\d` : `${hhmm}:[0-5]\\\\d\\\\.\\\\d{${args.precision}}` : `${hhmm}(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?`;\n}\nfunction time$1(args) {\n\treturn new RegExp(`^${timeSource(args)}$`);\n}\nfunction datetime$1(args) {\n\tconst time = timeSource({ precision: args.precision });\n\tconst opts = [\"Z\"];\n\tif (args.local) opts.push(\"\");\n\tif (args.offset) opts.push(`([+-](?:[01]\\\\d|2[0-3]):[0-5]\\\\d)`);\n\tconst timeRegex = `${time}(?:${opts.join(\"|\")})`;\n\treturn new RegExp(`^${dateSource}T(?:${timeRegex})$`);\n}\nconst string$1 = (params) => {\n\tconst regex = params ? `[\\\\s\\\\S]{${params?.minimum ?? 0},${params?.maximum ?? \"\"}}` : `[\\\\s\\\\S]*`;\n\treturn new RegExp(`^${regex}$`);\n};\nconst integer = /^-?\\d+$/;\nconst number$1 = /^-?\\d+(?:\\.\\d+)?$/;\nconst boolean$1 = /^(?:true|false)$/i;\nconst lowercase = /^[^A-Z]*$/;\nconst uppercase = /^[^a-z]*$/;\n//#endregion\n//#region ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/checks.js\nconst $ZodCheck = /* @__PURE__ */ $constructor(\"$ZodCheck\", (inst, def) => {\n\tvar _a;\n\tinst._zod ?? (inst._zod = {});\n\tinst._zod.def = def;\n\t(_a = inst._zod).onattach ?? (_a.onattach = []);\n});\nconst numericOriginMap = {\n\tnumber: \"number\",\n\tbigint: \"bigint\",\n\tobject: \"date\"\n};\nconst $ZodCheckLessThan = /* @__PURE__ */ $constructor(\"$ZodCheckLessThan\", (inst, def) => {\n\t$ZodCheck.init(inst, def);\n\tconst origin = numericOriginMap[typeof def.value];\n\tinst._zod.onattach.push((inst) => {\n\t\tconst bag = inst._zod.bag;\n\t\tconst curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;\n\t\tif (def.value < curr) if (def.inclusive) bag.maximum = def.value;\n\t\telse bag.exclusiveMaximum = def.value;\n\t});\n\tinst._zod.check = (payload) => {\n\t\tif (def.inclusive ? payload.value <= def.value : payload.value < def.value) return;\n\t\tpayload.issues.push({\n\t\t\torigin,\n\t\t\tcode: \"too_big\",\n\t\t\tmaximum: typeof def.value === \"object\" ? def.value.getTime() : def.value,\n\t\t\tinput: payload.value,\n\t\t\tinclusive: def.inclusive,\n\t\t\tinst,\n\t\t\tcontinue: !def.abort\n\t\t});\n\t};\n});\nconst $ZodCheckGreaterThan = /* @__PURE__ */ $constructor(\"$ZodCheckGreaterThan\", (inst, def) => {\n\t$ZodCheck.init(inst, def);\n\tconst origin = numericOriginMap[typeof def.value];\n\tinst._zod.onattach.push((inst) => {\n\t\tconst bag = inst._zod.bag;\n\t\tconst curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;\n\t\tif (def.value > curr) if (def.inclusive) bag.minimum = def.value;\n\t\telse bag.exclusiveMinimum = def.value;\n\t});\n\tinst._zod.check = (payload) => {\n\t\tif (def.inclusive ? payload.value >= def.value : payload.value > def.value) return;\n\t\tpayload.issues.push({\n\t\t\torigin,\n\t\t\tcode: \"too_small\",\n\t\t\tminimum: typeof def.value === \"object\" ? def.value.getTime() : def.value,\n\t\t\tinput: payload.value,\n\t\t\tinclusive: def.inclusive,\n\t\t\tinst,\n\t\t\tcontinue: !def.abort\n\t\t});\n\t};\n});\nconst $ZodCheckMultipleOf = /* @__PURE__ */ $constructor(\"$ZodCheckMultipleOf\", (inst, def) => {\n\t$ZodCheck.init(inst, def);\n\tinst._zod.onattach.push((inst) => {\n\t\tvar _a;\n\t\t(_a = inst._zod.bag).multipleOf ?? (_a.multipleOf = def.value);\n\t});\n\tinst._zod.check = (payload) => {\n\t\tif (typeof payload.value !== typeof def.value) throw new Error(\"Cannot mix number and bigint in multiple_of check.\");\n\t\tif (typeof payload.value === \"bigint\" ? payload.value % def.value === BigInt(0) : floatSafeRemainder(payload.value, def.value) === 0) return;\n\t\tpayload.issues.push({\n\t\t\torigin: typeof payload.value,\n\t\t\tcode: \"not_multiple_of\",\n\t\t\tdivisor: def.value,\n\t\t\tinput: payload.value,\n\t\t\tinst,\n\t\t\tcontinue: !def.abort\n\t\t});\n\t};\n});\nconst $ZodCheckNumberFormat = /* @__PURE__ */ $constructor(\"$ZodCheckNumberFormat\", (inst, def) => {\n\t$ZodCheck.init(inst, def);\n\tdef.format = def.format || \"float64\";\n\tconst isInt = def.format?.includes(\"int\");\n\tconst origin = isInt ? \"int\" : \"number\";\n\tconst [minimum, maximum] = NUMBER_FORMAT_RANGES[def.format];\n\tinst._zod.onattach.push((inst) => {\n\t\tconst bag = inst._zod.bag;\n\t\tbag.format = def.format;\n\t\tbag.minimum = minimum;\n\t\tbag.maximum = maximum;\n\t\tif (isInt) bag.pattern = integer;\n\t});\n\tinst._zod.check = (payload) => {\n\t\tconst input = payload.value;\n\t\tif (isInt) {\n\t\t\tif (!Number.isInteger(input)) {\n\t\t\t\tpayload.issues.push({\n\t\t\t\t\texpected: origin,\n\t\t\t\t\tformat: def.format,\n\t\t\t\t\tcode: \"invalid_type\",\n\t\t\t\t\tcontinue: false,\n\t\t\t\t\tinput,\n\t\t\t\t\tinst\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!Number.isSafeInteger(input)) {\n\t\t\t\tif (input > 0) payload.issues.push({\n\t\t\t\t\tinput,\n\t\t\t\t\tcode: \"too_big\",\n\t\t\t\t\tmaximum: Number.MAX_SAFE_INTEGER,\n\t\t\t\t\tnote: \"Integers must be within the safe integer range.\",\n\t\t\t\t\tinst,\n\t\t\t\t\torigin,\n\t\t\t\t\tinclusive: true,\n\t\t\t\t\tcontinue: !def.abort\n\t\t\t\t});\n\t\t\t\telse payload.issues.push({\n\t\t\t\t\tinput,\n\t\t\t\t\tcode: \"too_small\",\n\t\t\t\t\tminimum: Number.MIN_SAFE_INTEGER,\n\t\t\t\t\tnote: \"Integers must be within the safe integer range.\",\n\t\t\t\t\tinst,\n\t\t\t\t\torigin,\n\t\t\t\t\tinclusive: true,\n\t\t\t\t\tcontinue: !def.abort\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif (input < minimum) payload.issues.push({\n\t\t\torigin: \"number\",\n\t\t\tinput,\n\t\t\tcode: \"too_small\",\n\t\t\tminimum,\n\t\t\tinclusive: true,\n\t\t\tinst,\n\t\t\tcontinue: !def.abort\n\t\t});\n\t\tif (input > maximum) payload.issues.push({\n\t\t\torigin: \"number\",\n\t\t\tinput,\n\t\t\tcode: \"too_big\",\n\t\t\tmaximum,\n\t\t\tinclusive: true,\n\t\t\tinst,\n\t\t\tcontinue: !def.abort\n\t\t});\n\t};\n});\nconst $ZodCheckMaxLength = /* @__PURE__ */ $constructor(\"$ZodCheckMaxLength\", (inst, def) => {\n\tvar _a;\n\t$ZodCheck.init(inst, def);\n\t(_a = inst._zod.def).when ?? (_a.when = (payload) => {\n\t\tconst val = payload.value;\n\t\treturn !nullish(val) && val.length !== void 0;\n\t});\n\tinst._zod.onattach.push((inst) => {\n\t\tconst curr = inst._zod.bag.maximum ?? Number.POSITIVE_INFINITY;\n\t\tif (def.maximum < curr) inst._zod.bag.maximum = def.maximum;\n\t});\n\tinst._zod.check = (payload) => {\n\t\tconst input = payload.value;\n\t\tif (input.length <= def.maximum) return;\n\t\tconst origin = getLengthableOrigin(input);\n\t\tpayload.issues.push({\n\t\t\torigin,\n\t\t\tcode: \"too_big\",\n\t\t\tmaximum: def.maximum,\n\t\t\tinclusive: true,\n\t\t\tinput,\n\t\t\tinst,\n\t\t\tcontinue: !def.abort\n\t\t});\n\t};\n});\nconst $ZodCheckMinLength = /* @__PURE__ */ $constructor(\"$ZodCheckMinLength\", (inst, def) => {\n\tvar _a;\n\t$ZodCheck.init(inst, def);\n\t(_a = inst._zod.def).when ?? (_a.when = (payload) => {\n\t\tconst val = payload.value;\n\t\treturn !nullish(val) && val.length !== void 0;\n\t});\n\tinst._zod.onattach.push((inst) => {\n\t\tconst curr = inst._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;\n\t\tif (def.minimum > curr) inst._zod.bag.minimum = def.minimum;\n\t});\n\tinst._zod.check = (payload) => {\n\t\tconst input = payload.value;\n\t\tif (input.length >= def.minimum) return;\n\t\tconst origin = getLengthableOrigin(input);\n\t\tpayload.issues.push({\n\t\t\torigin,\n\t\t\tcode: \"too_small\",\n\t\t\tminimum: def.minimum,\n\t\t\tinclusive: true,\n\t\t\tinput,\n\t\t\tinst,\n\t\t\tcontinue: !def.abort\n\t\t});\n\t};\n});\nconst $ZodCheckLengthEquals = /* @__PURE__ */ $constructor(\"$ZodCheckLengthEquals\", (inst, def) => {\n\tvar _a;\n\t$ZodCheck.init(inst, def);\n\t(_a = inst._zod.def).when ?? (_a.when = (payload) => {\n\t\tconst val = payload.value;\n\t\treturn !nullish(val) && val.length !== void 0;\n\t});\n\tinst._zod.onattach.push((inst) => {\n\t\tconst bag = inst._zod.bag;\n\t\tbag.minimum = def.length;\n\t\tbag.maximum = def.length;\n\t\tbag.length = def.length;\n\t});\n\tinst._zod.check = (payload) => {\n\t\tconst input = payload.value;\n\t\tconst length = input.length;\n\t\tif (length === def.length) return;\n\t\tconst origin = getLengthableOrigin(input);\n\t\tconst tooBig = length > def.length;\n\t\tpayload.issues.push({\n\t\t\torigin,\n\t\t\t...tooBig ? {\n\t\t\t\tcode: \"too_big\",\n\t\t\t\tmaximum: def.length\n\t\t\t} : {\n\t\t\t\tcode: \"too_small\",\n\t\t\t\tminimum: def.length\n\t\t\t},\n\t\t\tinclusive: true,\n\t\t\texact: true,\n\t\t\tinput: payload.value,\n\t\t\tinst,\n\t\t\tcontinue: !def.abort\n\t\t});\n\t};\n});\nconst $ZodCheckStringFormat = /* @__PURE__ */ $constructor(\"$ZodCheckStringFormat\", (inst, def) => {\n\tvar _a, _b;\n\t$ZodCheck.init(inst, def);\n\tinst._zod.onattach.push((inst) => {\n\t\tconst bag = inst._zod.bag;\n\t\tbag.format = def.format;\n\t\tif (def.pattern) {\n\t\t\tbag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());\n\t\t\tbag.patterns.add(def.pattern);\n\t\t}\n\t});\n\tif (def.pattern) (_a = inst._zod).check ?? (_a.check = (payload) => {\n\t\tdef.pattern.lastIndex = 0;\n\t\tif (def.pattern.test(payload.value)) return;\n\t\tpayload.issues.push({\n\t\t\torigin: \"string\",\n\t\t\tcode: \"invalid_format\",\n\t\t\tformat: def.format,\n\t\t\tinput: payload.value,\n\t\t\t...def.pattern ? { pattern: def.pattern.toString() } : {},\n\t\t\tinst,\n\t\t\tcontinue: !def.abort\n\t\t});\n\t});\n\telse (_b = inst._zod).check ?? (_b.check = () => {});\n});\nconst $ZodCheckRegex = /* @__PURE__ */ $constructor(\"$ZodCheckRegex\", (inst, def) => {\n\t$ZodCheckStringFormat.init(inst, def);\n\tinst._zod.check = (payload) => {\n\t\tdef.pattern.lastIndex = 0;\n\t\tif (def.pattern.test(payload.value)) return;\n\t\tpayload.issues.push({\n\t\t\torigin: \"string\",\n\t\t\tcode: \"invalid_format\",\n\t\t\tformat: \"regex\",\n\t\t\tinput: payload.value,\n\t\t\tpattern: def.pattern.toString(),\n\t\t\tinst,\n\t\t\tcontinue: !def.abort\n\t\t});\n\t};\n});\nconst $ZodCheckLowerCase = /* @__PURE__ */ $constructor(\"$ZodCheckLowerCase\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = lowercase);\n\t$ZodCheckStringFormat.init(inst, def);\n});\nconst $ZodCheckUpperCase = /* @__PURE__ */ $constructor(\"$ZodCheckUpperCase\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = uppercase);\n\t$ZodCheckStringFormat.init(inst, def);\n});\nconst $ZodCheckIncludes = /* @__PURE__ */ $constructor(\"$ZodCheckIncludes\", (inst, def) => {\n\t$ZodCheck.init(inst, def);\n\tconst escapedRegex = escapeRegex(def.includes);\n\tconst pattern = new RegExp(typeof def.position === \"number\" ? `^.{${def.position}}${escapedRegex}` : escapedRegex);\n\tdef.pattern = pattern;\n\tinst._zod.onattach.push((inst) => {\n\t\tconst bag = inst._zod.bag;\n\t\tbag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());\n\t\tbag.patterns.add(pattern);\n\t});\n\tinst._zod.check = (payload) => {\n\t\tif (payload.value.includes(def.includes, def.position)) return;\n\t\tpayload.issues.push({\n\t\t\torigin: \"string\",\n\t\t\tcode: \"invalid_format\",\n\t\t\tformat: \"includes\",\n\t\t\tincludes: def.includes,\n\t\t\tinput: payload.value,\n\t\t\tinst,\n\t\t\tcontinue: !def.abort\n\t\t});\n\t};\n});\nconst $ZodCheckStartsWith = /* @__PURE__ */ $constructor(\"$ZodCheckStartsWith\", (inst, def) => {\n\t$ZodCheck.init(inst, def);\n\tconst pattern = new RegExp(`^${escapeRegex(def.prefix)}.*`);\n\tdef.pattern ?? (def.pattern = pattern);\n\tinst._zod.onattach.push((inst) => {\n\t\tconst bag = inst._zod.bag;\n\t\tbag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());\n\t\tbag.patterns.add(pattern);\n\t});\n\tinst._zod.check = (payload) => {\n\t\tif (payload.value.startsWith(def.prefix)) return;\n\t\tpayload.issues.push({\n\t\t\torigin: \"string\",\n\t\t\tcode: \"invalid_format\",\n\t\t\tformat: \"starts_with\",\n\t\t\tprefix: def.prefix,\n\t\t\tinput: payload.value,\n\t\t\tinst,\n\t\t\tcontinue: !def.abort\n\t\t});\n\t};\n});\nconst $ZodCheckEndsWith = /* @__PURE__ */ $constructor(\"$ZodCheckEndsWith\", (inst, def) => {\n\t$ZodCheck.init(inst, def);\n\tconst pattern = new RegExp(`.*${escapeRegex(def.suffix)}$`);\n\tdef.pattern ?? (def.pattern = pattern);\n\tinst._zod.onattach.push((inst) => {\n\t\tconst bag = inst._zod.bag;\n\t\tbag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());\n\t\tbag.patterns.add(pattern);\n\t});\n\tinst._zod.check = (payload) => {\n\t\tif (payload.value.endsWith(def.suffix)) return;\n\t\tpayload.issues.push({\n\t\t\torigin: \"string\",\n\t\t\tcode: \"invalid_format\",\n\t\t\tformat: \"ends_with\",\n\t\t\tsuffix: def.suffix,\n\t\t\tinput: payload.value,\n\t\t\tinst,\n\t\t\tcontinue: !def.abort\n\t\t});\n\t};\n});\nconst $ZodCheckOverwrite = /* @__PURE__ */ $constructor(\"$ZodCheckOverwrite\", (inst, def) => {\n\t$ZodCheck.init(inst, def);\n\tinst._zod.check = (payload) => {\n\t\tpayload.value = def.tx(payload.value);\n\t};\n});\n//#endregion\n//#region ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/doc.js\nvar Doc = class {\n\tconstructor(args = []) {\n\t\tthis.content = [];\n\t\tthis.indent = 0;\n\t\tif (this) this.args = args;\n\t}\n\tindented(fn) {\n\t\tthis.indent += 1;\n\t\tfn(this);\n\t\tthis.indent -= 1;\n\t}\n\twrite(arg) {\n\t\tif (typeof arg === \"function\") {\n\t\t\targ(this, { execution: \"sync\" });\n\t\t\targ(this, { execution: \"async\" });\n\t\t\treturn;\n\t\t}\n\t\tconst lines = arg.split(\"\\n\").filter((x) => x);\n\t\tconst minIndent = Math.min(...lines.map((x) => x.length - x.trimStart().length));\n\t\tconst dedented = lines.map((x) => x.slice(minIndent)).map((x) => \" \".repeat(this.indent * 2) + x);\n\t\tfor (const line of dedented) this.content.push(line);\n\t}\n\tcompile() {\n\t\tconst F = Function;\n\t\tconst args = this?.args;\n\t\tconst lines = [...(this?.content ?? [``]).map((x) => ` ${x}`)];\n\t\treturn new F(...args, lines.join(\"\\n\"));\n\t}\n};\n//#endregion\n//#region ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/versions.js\nconst version = {\n\tmajor: 4,\n\tminor: 3,\n\tpatch: 6\n};\n//#endregion\n//#region ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/schemas.js\nconst $ZodType = /* @__PURE__ */ $constructor(\"$ZodType\", (inst, def) => {\n\tvar _a;\n\tinst ?? (inst = {});\n\tinst._zod.def = def;\n\tinst._zod.bag = inst._zod.bag || {};\n\tinst._zod.version = version;\n\tconst checks = [...inst._zod.def.checks ?? []];\n\tif (inst._zod.traits.has(\"$ZodCheck\")) checks.unshift(inst);\n\tfor (const ch of checks) for (const fn of ch._zod.onattach) fn(inst);\n\tif (checks.length === 0) {\n\t\t(_a = inst._zod).deferred ?? (_a.deferred = []);\n\t\tinst._zod.deferred?.push(() => {\n\t\t\tinst._zod.run = inst._zod.parse;\n\t\t});\n\t} else {\n\t\tconst runChecks = (payload, checks, ctx) => {\n\t\t\tlet isAborted = aborted(payload);\n\t\t\tlet asyncResult;\n\t\t\tfor (const ch of checks) {\n\t\t\t\tif (ch._zod.def.when) {\n\t\t\t\t\tif (!ch._zod.def.when(payload)) continue;\n\t\t\t\t} else if (isAborted) continue;\n\t\t\t\tconst currLen = payload.issues.length;\n\t\t\t\tconst _ = ch._zod.check(payload);\n\t\t\t\tif (_ instanceof Promise && ctx?.async === false) throw new $ZodAsyncError();\n\t\t\t\tif (asyncResult || _ instanceof Promise) asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {\n\t\t\t\t\tawait _;\n\t\t\t\t\tif (payload.issues.length === currLen) return;\n\t\t\t\t\tif (!isAborted) isAborted = aborted(payload, currLen);\n\t\t\t\t});\n\t\t\t\telse {\n\t\t\t\t\tif (payload.issues.length === currLen) continue;\n\t\t\t\t\tif (!isAborted) isAborted = aborted(payload, currLen);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (asyncResult) return asyncResult.then(() => {\n\t\t\t\treturn payload;\n\t\t\t});\n\t\t\treturn payload;\n\t\t};\n\t\tconst handleCanaryResult = (canary, payload, ctx) => {\n\t\t\tif (aborted(canary)) {\n\t\t\t\tcanary.aborted = true;\n\t\t\t\treturn canary;\n\t\t\t}\n\t\t\tconst checkResult = runChecks(payload, checks, ctx);\n\t\t\tif (checkResult instanceof Promise) {\n\t\t\t\tif (ctx.async === false) throw new $ZodAsyncError();\n\t\t\t\treturn checkResult.then((checkResult) => inst._zod.parse(checkResult, ctx));\n\t\t\t}\n\t\t\treturn inst._zod.parse(checkResult, ctx);\n\t\t};\n\t\tinst._zod.run = (payload, ctx) => {\n\t\t\tif (ctx.skipChecks) return inst._zod.parse(payload, ctx);\n\t\t\tif (ctx.direction === \"backward\") {\n\t\t\t\tconst canary = inst._zod.parse({\n\t\t\t\t\tvalue: payload.value,\n\t\t\t\t\tissues: []\n\t\t\t\t}, {\n\t\t\t\t\t...ctx,\n\t\t\t\t\tskipChecks: true\n\t\t\t\t});\n\t\t\t\tif (canary instanceof Promise) return canary.then((canary) => {\n\t\t\t\t\treturn handleCanaryResult(canary, payload, ctx);\n\t\t\t\t});\n\t\t\t\treturn handleCanaryResult(canary, payload, ctx);\n\t\t\t}\n\t\t\tconst result = inst._zod.parse(payload, ctx);\n\t\t\tif (result instanceof Promise) {\n\t\t\t\tif (ctx.async === false) throw new $ZodAsyncError();\n\t\t\t\treturn result.then((result) => runChecks(result, checks, ctx));\n\t\t\t}\n\t\t\treturn runChecks(result, checks, ctx);\n\t\t};\n\t}\n\tdefineLazy(inst, \"~standard\", () => ({\n\t\tvalidate: (value) => {\n\t\t\ttry {\n\t\t\t\tconst r = safeParse$1(inst, value);\n\t\t\t\treturn r.success ? { value: r.data } : { issues: r.error?.issues };\n\t\t\t} catch (_) {\n\t\t\t\treturn safeParseAsync$1(inst, value).then((r) => r.success ? { value: r.data } : { issues: r.error?.issues });\n\t\t\t}\n\t\t},\n\t\tvendor: \"zod\",\n\t\tversion: 1\n\t}));\n});\nconst $ZodString = /* @__PURE__ */ $constructor(\"$ZodString\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tinst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string$1(inst._zod.bag);\n\tinst._zod.parse = (payload, _) => {\n\t\tif (def.coerce) try {\n\t\t\tpayload.value = String(payload.value);\n\t\t} catch (_) {}\n\t\tif (typeof payload.value === \"string\") return payload;\n\t\tpayload.issues.push({\n\t\t\texpected: \"string\",\n\t\t\tcode: \"invalid_type\",\n\t\t\tinput: payload.value,\n\t\t\tinst\n\t\t});\n\t\treturn payload;\n\t};\n});\nconst $ZodStringFormat = /* @__PURE__ */ $constructor(\"$ZodStringFormat\", (inst, def) => {\n\t$ZodCheckStringFormat.init(inst, def);\n\t$ZodString.init(inst, def);\n});\nconst $ZodGUID = /* @__PURE__ */ $constructor(\"$ZodGUID\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = guid);\n\t$ZodStringFormat.init(inst, def);\n});\nconst $ZodUUID = /* @__PURE__ */ $constructor(\"$ZodUUID\", (inst, def) => {\n\tif (def.version) {\n\t\tconst v = {\n\t\t\tv1: 1,\n\t\t\tv2: 2,\n\t\t\tv3: 3,\n\t\t\tv4: 4,\n\t\t\tv5: 5,\n\t\t\tv6: 6,\n\t\t\tv7: 7,\n\t\t\tv8: 8\n\t\t}[def.version];\n\t\tif (v === void 0) throw new Error(`Invalid UUID version: \"${def.version}\"`);\n\t\tdef.pattern ?? (def.pattern = uuid(v));\n\t} else def.pattern ?? (def.pattern = uuid());\n\t$ZodStringFormat.init(inst, def);\n});\nconst $ZodEmail = /* @__PURE__ */ $constructor(\"$ZodEmail\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = email);\n\t$ZodStringFormat.init(inst, def);\n});\nconst $ZodURL = /* @__PURE__ */ $constructor(\"$ZodURL\", (inst, def) => {\n\t$ZodStringFormat.init(inst, def);\n\tinst._zod.check = (payload) => {\n\t\ttry {\n\t\t\tconst trimmed = payload.value.trim();\n\t\t\tconst url = new URL(trimmed);\n\t\t\tif (def.hostname) {\n\t\t\t\tdef.hostname.lastIndex = 0;\n\t\t\t\tif (!def.hostname.test(url.hostname)) payload.issues.push({\n\t\t\t\t\tcode: \"invalid_format\",\n\t\t\t\t\tformat: \"url\",\n\t\t\t\t\tnote: \"Invalid hostname\",\n\t\t\t\t\tpattern: def.hostname.source,\n\t\t\t\t\tinput: payload.value,\n\t\t\t\t\tinst,\n\t\t\t\t\tcontinue: !def.abort\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (def.protocol) {\n\t\t\t\tdef.protocol.lastIndex = 0;\n\t\t\t\tif (!def.protocol.test(url.protocol.endsWith(\":\") ? url.protocol.slice(0, -1) : url.protocol)) payload.issues.push({\n\t\t\t\t\tcode: \"invalid_format\",\n\t\t\t\t\tformat: \"url\",\n\t\t\t\t\tnote: \"Invalid protocol\",\n\t\t\t\t\tpattern: def.protocol.source,\n\t\t\t\t\tinput: payload.value,\n\t\t\t\t\tinst,\n\t\t\t\t\tcontinue: !def.abort\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (def.normalize) payload.value = url.href;\n\t\t\telse payload.value = trimmed;\n\t\t\treturn;\n\t\t} catch (_) {\n\t\t\tpayload.issues.push({\n\t\t\t\tcode: \"invalid_format\",\n\t\t\t\tformat: \"url\",\n\t\t\t\tinput: payload.value,\n\t\t\t\tinst,\n\t\t\t\tcontinue: !def.abort\n\t\t\t});\n\t\t}\n\t};\n});\nconst $ZodEmoji = /* @__PURE__ */ $constructor(\"$ZodEmoji\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = emoji());\n\t$ZodStringFormat.init(inst, def);\n});\nconst $ZodNanoID = /* @__PURE__ */ $constructor(\"$ZodNanoID\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = nanoid);\n\t$ZodStringFormat.init(inst, def);\n});\nconst $ZodCUID = /* @__PURE__ */ $constructor(\"$ZodCUID\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = cuid);\n\t$ZodStringFormat.init(inst, def);\n});\nconst $ZodCUID2 = /* @__PURE__ */ $constructor(\"$ZodCUID2\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = cuid2);\n\t$ZodStringFormat.init(inst, def);\n});\nconst $ZodULID = /* @__PURE__ */ $constructor(\"$ZodULID\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = ulid);\n\t$ZodStringFormat.init(inst, def);\n});\nconst $ZodXID = /* @__PURE__ */ $constructor(\"$ZodXID\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = xid);\n\t$ZodStringFormat.init(inst, def);\n});\nconst $ZodKSUID = /* @__PURE__ */ $constructor(\"$ZodKSUID\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = ksuid);\n\t$ZodStringFormat.init(inst, def);\n});\nconst $ZodISODateTime = /* @__PURE__ */ $constructor(\"$ZodISODateTime\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = datetime$1(def));\n\t$ZodStringFormat.init(inst, def);\n});\nconst $ZodISODate = /* @__PURE__ */ $constructor(\"$ZodISODate\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = date$1);\n\t$ZodStringFormat.init(inst, def);\n});\nconst $ZodISOTime = /* @__PURE__ */ $constructor(\"$ZodISOTime\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = time$1(def));\n\t$ZodStringFormat.init(inst, def);\n});\nconst $ZodISODuration = /* @__PURE__ */ $constructor(\"$ZodISODuration\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = duration$1);\n\t$ZodStringFormat.init(inst, def);\n});\nconst $ZodIPv4 = /* @__PURE__ */ $constructor(\"$ZodIPv4\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = ipv4);\n\t$ZodStringFormat.init(inst, def);\n\tinst._zod.bag.format = `ipv4`;\n});\nconst $ZodIPv6 = /* @__PURE__ */ $constructor(\"$ZodIPv6\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = ipv6);\n\t$ZodStringFormat.init(inst, def);\n\tinst._zod.bag.format = `ipv6`;\n\tinst._zod.check = (payload) => {\n\t\ttry {\n\t\t\tnew URL(`http://[${payload.value}]`);\n\t\t} catch {\n\t\t\tpayload.issues.push({\n\t\t\t\tcode: \"invalid_format\",\n\t\t\t\tformat: \"ipv6\",\n\t\t\t\tinput: payload.value,\n\t\t\t\tinst,\n\t\t\t\tcontinue: !def.abort\n\t\t\t});\n\t\t}\n\t};\n});\nconst $ZodCIDRv4 = /* @__PURE__ */ $constructor(\"$ZodCIDRv4\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = cidrv4);\n\t$ZodStringFormat.init(inst, def);\n});\nconst $ZodCIDRv6 = /* @__PURE__ */ $constructor(\"$ZodCIDRv6\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = cidrv6);\n\t$ZodStringFormat.init(inst, def);\n\tinst._zod.check = (payload) => {\n\t\tconst parts = payload.value.split(\"/\");\n\t\ttry {\n\t\t\tif (parts.length !== 2) throw new Error();\n\t\t\tconst [address, prefix] = parts;\n\t\t\tif (!prefix) throw new Error();\n\t\t\tconst prefixNum = Number(prefix);\n\t\t\tif (`${prefixNum}` !== prefix) throw new Error();\n\t\t\tif (prefixNum < 0 || prefixNum > 128) throw new Error();\n\t\t\tnew URL(`http://[${address}]`);\n\t\t} catch {\n\t\t\tpayload.issues.push({\n\t\t\t\tcode: \"invalid_format\",\n\t\t\t\tformat: \"cidrv6\",\n\t\t\t\tinput: payload.value,\n\t\t\t\tinst,\n\t\t\t\tcontinue: !def.abort\n\t\t\t});\n\t\t}\n\t};\n});\nfunction isValidBase64(data) {\n\tif (data === \"\") return true;\n\tif (data.length % 4 !== 0) return false;\n\ttry {\n\t\tatob(data);\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\nconst $ZodBase64 = /* @__PURE__ */ $constructor(\"$ZodBase64\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = base64);\n\t$ZodStringFormat.init(inst, def);\n\tinst._zod.bag.contentEncoding = \"base64\";\n\tinst._zod.check = (payload) => {\n\t\tif (isValidBase64(payload.value)) return;\n\t\tpayload.issues.push({\n\t\t\tcode: \"invalid_format\",\n\t\t\tformat: \"base64\",\n\t\t\tinput: payload.value,\n\t\t\tinst,\n\t\t\tcontinue: !def.abort\n\t\t});\n\t};\n});\nfunction isValidBase64URL(data) {\n\tif (!base64url.test(data)) return false;\n\tconst base64 = data.replace(/[-_]/g, (c) => c === \"-\" ? \"+\" : \"/\");\n\treturn isValidBase64(base64.padEnd(Math.ceil(base64.length / 4) * 4, \"=\"));\n}\nconst $ZodBase64URL = /* @__PURE__ */ $constructor(\"$ZodBase64URL\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = base64url);\n\t$ZodStringFormat.init(inst, def);\n\tinst._zod.bag.contentEncoding = \"base64url\";\n\tinst._zod.check = (payload) => {\n\t\tif (isValidBase64URL(payload.value)) return;\n\t\tpayload.issues.push({\n\t\t\tcode: \"invalid_format\",\n\t\t\tformat: \"base64url\",\n\t\t\tinput: payload.value,\n\t\t\tinst,\n\t\t\tcontinue: !def.abort\n\t\t});\n\t};\n});\nconst $ZodE164 = /* @__PURE__ */ $constructor(\"$ZodE164\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = e164);\n\t$ZodStringFormat.init(inst, def);\n});\nfunction isValidJWT(token, algorithm = null) {\n\ttry {\n\t\tconst tokensParts = token.split(\".\");\n\t\tif (tokensParts.length !== 3) return false;\n\t\tconst [header] = tokensParts;\n\t\tif (!header) return false;\n\t\tconst parsedHeader = JSON.parse(atob(header));\n\t\tif (\"typ\" in parsedHeader && parsedHeader?.typ !== \"JWT\") return false;\n\t\tif (!parsedHeader.alg) return false;\n\t\tif (algorithm && (!(\"alg\" in parsedHeader) || parsedHeader.alg !== algorithm)) return false;\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\nconst $ZodJWT = /* @__PURE__ */ $constructor(\"$ZodJWT\", (inst, def) => {\n\t$ZodStringFormat.init(inst, def);\n\tinst._zod.check = (payload) => {\n\t\tif (isValidJWT(payload.value, def.alg)) return;\n\t\tpayload.issues.push({\n\t\t\tcode: \"invalid_format\",\n\t\t\tformat: \"jwt\",\n\t\t\tinput: payload.value,\n\t\t\tinst,\n\t\t\tcontinue: !def.abort\n\t\t});\n\t};\n});\nconst $ZodNumber = /* @__PURE__ */ $constructor(\"$ZodNumber\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tinst._zod.pattern = inst._zod.bag.pattern ?? number$1;\n\tinst._zod.parse = (payload, _ctx) => {\n\t\tif (def.coerce) try {\n\t\t\tpayload.value = Number(payload.value);\n\t\t} catch (_) {}\n\t\tconst input = payload.value;\n\t\tif (typeof input === \"number\" && !Number.isNaN(input) && Number.isFinite(input)) return payload;\n\t\tconst received = typeof input === \"number\" ? Number.isNaN(input) ? \"NaN\" : !Number.isFinite(input) ? \"Infinity\" : void 0 : void 0;\n\t\tpayload.issues.push({\n\t\t\texpected: \"number\",\n\t\t\tcode: \"invalid_type\",\n\t\t\tinput,\n\t\t\tinst,\n\t\t\t...received ? { received } : {}\n\t\t});\n\t\treturn payload;\n\t};\n});\nconst $ZodNumberFormat = /* @__PURE__ */ $constructor(\"$ZodNumberFormat\", (inst, def) => {\n\t$ZodCheckNumberFormat.init(inst, def);\n\t$ZodNumber.init(inst, def);\n});\nconst $ZodBoolean = /* @__PURE__ */ $constructor(\"$ZodBoolean\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tinst._zod.pattern = boolean$1;\n\tinst._zod.parse = (payload, _ctx) => {\n\t\tif (def.coerce) try {\n\t\t\tpayload.value = Boolean(payload.value);\n\t\t} catch (_) {}\n\t\tconst input = payload.value;\n\t\tif (typeof input === \"boolean\") return payload;\n\t\tpayload.issues.push({\n\t\t\texpected: \"boolean\",\n\t\t\tcode: \"invalid_type\",\n\t\t\tinput,\n\t\t\tinst\n\t\t});\n\t\treturn payload;\n\t};\n});\nconst $ZodUnknown = /* @__PURE__ */ $constructor(\"$ZodUnknown\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tinst._zod.parse = (payload) => payload;\n});\nconst $ZodNever = /* @__PURE__ */ $constructor(\"$ZodNever\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tinst._zod.parse = (payload, _ctx) => {\n\t\tpayload.issues.push({\n\t\t\texpected: \"never\",\n\t\t\tcode: \"invalid_type\",\n\t\t\tinput: payload.value,\n\t\t\tinst\n\t\t});\n\t\treturn payload;\n\t};\n});\nfunction handleArrayResult(result, final, index) {\n\tif (result.issues.length) final.issues.push(...prefixIssues(index, result.issues));\n\tfinal.value[index] = result.value;\n}\nconst $ZodArray = /* @__PURE__ */ $constructor(\"$ZodArray\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tinst._zod.parse = (payload, ctx) => {\n\t\tconst input = payload.value;\n\t\tif (!Array.isArray(input)) {\n\t\t\tpayload.issues.push({\n\t\t\t\texpected: \"array\",\n\t\t\t\tcode: \"invalid_type\",\n\t\t\t\tinput,\n\t\t\t\tinst\n\t\t\t});\n\t\t\treturn payload;\n\t\t}\n\t\tpayload.value = Array(input.length);\n\t\tconst proms = [];\n\t\tfor (let i = 0; i < input.length; i++) {\n\t\t\tconst item = input[i];\n\t\t\tconst result = def.element._zod.run({\n\t\t\t\tvalue: item,\n\t\t\t\tissues: []\n\t\t\t}, ctx);\n\t\t\tif (result instanceof Promise) proms.push(result.then((result) => handleArrayResult(result, payload, i)));\n\t\t\telse handleArrayResult(result, payload, i);\n\t\t}\n\t\tif (proms.length) return Promise.all(proms).then(() => payload);\n\t\treturn payload;\n\t};\n});\nfunction handlePropertyResult(result, final, key, input, isOptionalOut) {\n\tif (result.issues.length) {\n\t\tif (isOptionalOut && !(key in input)) return;\n\t\tfinal.issues.push(...prefixIssues(key, result.issues));\n\t}\n\tif (result.value === void 0) {\n\t\tif (key in input) final.value[key] = void 0;\n\t} else final.value[key] = result.value;\n}\nfunction normalizeDef(def) {\n\tconst keys = Object.keys(def.shape);\n\tfor (const k of keys) if (!def.shape?.[k]?._zod?.traits?.has(\"$ZodType\")) throw new Error(`Invalid element at key \"${k}\": expected a Zod schema`);\n\tconst okeys = optionalKeys(def.shape);\n\treturn {\n\t\t...def,\n\t\tkeys,\n\t\tkeySet: new Set(keys),\n\t\tnumKeys: keys.length,\n\t\toptionalKeys: new Set(okeys)\n\t};\n}\nfunction handleCatchall(proms, input, payload, ctx, def, inst) {\n\tconst unrecognized = [];\n\tconst keySet = def.keySet;\n\tconst _catchall = def.catchall._zod;\n\tconst t = _catchall.def.type;\n\tconst isOptionalOut = _catchall.optout === \"optional\";\n\tfor (const key in input) {\n\t\tif (keySet.has(key)) continue;\n\t\tif (t === \"never\") {\n\t\t\tunrecognized.push(key);\n\t\t\tcontinue;\n\t\t}\n\t\tconst r = _catchall.run({\n\t\t\tvalue: input[key],\n\t\t\tissues: []\n\t\t}, ctx);\n\t\tif (r instanceof Promise) proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, isOptionalOut)));\n\t\telse handlePropertyResult(r, payload, key, input, isOptionalOut);\n\t}\n\tif (unrecognized.length) payload.issues.push({\n\t\tcode: \"unrecognized_keys\",\n\t\tkeys: unrecognized,\n\t\tinput,\n\t\tinst\n\t});\n\tif (!proms.length) return payload;\n\treturn Promise.all(proms).then(() => {\n\t\treturn payload;\n\t});\n}\nconst $ZodObject = /* @__PURE__ */ $constructor(\"$ZodObject\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tif (!Object.getOwnPropertyDescriptor(def, \"shape\")?.get) {\n\t\tconst sh = def.shape;\n\t\tObject.defineProperty(def, \"shape\", { get: () => {\n\t\t\tconst newSh = { ...sh };\n\t\t\tObject.defineProperty(def, \"shape\", { value: newSh });\n\t\t\treturn newSh;\n\t\t} });\n\t}\n\tconst _normalized = cached(() => normalizeDef(def));\n\tdefineLazy(inst._zod, \"propValues\", () => {\n\t\tconst shape = def.shape;\n\t\tconst propValues = {};\n\t\tfor (const key in shape) {\n\t\t\tconst field = shape[key]._zod;\n\t\t\tif (field.values) {\n\t\t\t\tpropValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set());\n\t\t\t\tfor (const v of field.values) propValues[key].add(v);\n\t\t\t}\n\t\t}\n\t\treturn propValues;\n\t});\n\tconst isObject$2 = isObject;\n\tconst catchall = def.catchall;\n\tlet value;\n\tinst._zod.parse = (payload, ctx) => {\n\t\tvalue ?? (value = _normalized.value);\n\t\tconst input = payload.value;\n\t\tif (!isObject$2(input)) {\n\t\t\tpayload.issues.push({\n\t\t\t\texpected: \"object\",\n\t\t\t\tcode: \"invalid_type\",\n\t\t\t\tinput,\n\t\t\t\tinst\n\t\t\t});\n\t\t\treturn payload;\n\t\t}\n\t\tpayload.value = {};\n\t\tconst proms = [];\n\t\tconst shape = value.shape;\n\t\tfor (const key of value.keys) {\n\t\t\tconst el = shape[key];\n\t\t\tconst isOptionalOut = el._zod.optout === \"optional\";\n\t\t\tconst r = el._zod.run({\n\t\t\t\tvalue: input[key],\n\t\t\t\tissues: []\n\t\t\t}, ctx);\n\t\t\tif (r instanceof Promise) proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, isOptionalOut)));\n\t\t\telse handlePropertyResult(r, payload, key, input, isOptionalOut);\n\t\t}\n\t\tif (!catchall) return proms.length ? Promise.all(proms).then(() => payload) : payload;\n\t\treturn handleCatchall(proms, input, payload, ctx, _normalized.value, inst);\n\t};\n});\nconst $ZodObjectJIT = /* @__PURE__ */ $constructor(\"$ZodObjectJIT\", (inst, def) => {\n\t$ZodObject.init(inst, def);\n\tconst superParse = inst._zod.parse;\n\tconst _normalized = cached(() => normalizeDef(def));\n\tconst generateFastpass = (shape) => {\n\t\tconst doc = new Doc([\n\t\t\t\"shape\",\n\t\t\t\"payload\",\n\t\t\t\"ctx\"\n\t\t]);\n\t\tconst normalized = _normalized.value;\n\t\tconst parseStr = (key) => {\n\t\t\tconst k = esc(key);\n\t\t\treturn `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;\n\t\t};\n\t\tdoc.write(`const input = payload.value;`);\n\t\tconst ids = Object.create(null);\n\t\tlet counter = 0;\n\t\tfor (const key of normalized.keys) ids[key] = `key_${counter++}`;\n\t\tdoc.write(`const newResult = {};`);\n\t\tfor (const key of normalized.keys) {\n\t\t\tconst id = ids[key];\n\t\t\tconst k = esc(key);\n\t\t\tconst isOptionalOut = shape[key]?._zod?.optout === \"optional\";\n\t\t\tdoc.write(`const ${id} = ${parseStr(key)};`);\n\t\t\tif (isOptionalOut) 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\t\t\telse 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\t\t}\n\t\tdoc.write(`payload.value = newResult;`);\n\t\tdoc.write(`return payload;`);\n\t\tconst fn = doc.compile();\n\t\treturn (payload, ctx) => fn(shape, payload, ctx);\n\t};\n\tlet fastpass;\n\tconst isObject$1 = isObject;\n\tconst jit = !globalConfig.jitless;\n\tconst fastEnabled = jit && allowsEval.value;\n\tconst catchall = def.catchall;\n\tlet value;\n\tinst._zod.parse = (payload, ctx) => {\n\t\tvalue ?? (value = _normalized.value);\n\t\tconst input = payload.value;\n\t\tif (!isObject$1(input)) {\n\t\t\tpayload.issues.push({\n\t\t\t\texpected: \"object\",\n\t\t\t\tcode: \"invalid_type\",\n\t\t\t\tinput,\n\t\t\t\tinst\n\t\t\t});\n\t\t\treturn payload;\n\t\t}\n\t\tif (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) {\n\t\t\tif (!fastpass) fastpass = generateFastpass(def.shape);\n\t\t\tpayload = fastpass(payload, ctx);\n\t\t\tif (!catchall) return payload;\n\t\t\treturn handleCatchall([], input, payload, ctx, value, inst);\n\t\t}\n\t\treturn superParse(payload, ctx);\n\t};\n});\nfunction handleUnionResults(results, final, inst, ctx) {\n\tfor (const result of results) if (result.issues.length === 0) {\n\t\tfinal.value = result.value;\n\t\treturn final;\n\t}\n\tconst nonaborted = results.filter((r) => !aborted(r));\n\tif (nonaborted.length === 1) {\n\t\tfinal.value = nonaborted[0].value;\n\t\treturn nonaborted[0];\n\t}\n\tfinal.issues.push({\n\t\tcode: \"invalid_union\",\n\t\tinput: final.value,\n\t\tinst,\n\t\terrors: results.map((result) => result.issues.map((iss) => finalizeIssue(iss, ctx, config())))\n\t});\n\treturn final;\n}\nconst $ZodUnion = /* @__PURE__ */ $constructor(\"$ZodUnion\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tdefineLazy(inst._zod, \"optin\", () => def.options.some((o) => o._zod.optin === \"optional\") ? \"optional\" : void 0);\n\tdefineLazy(inst._zod, \"optout\", () => def.options.some((o) => o._zod.optout === \"optional\") ? \"optional\" : void 0);\n\tdefineLazy(inst._zod, \"values\", () => {\n\t\tif (def.options.every((o) => o._zod.values)) return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));\n\t});\n\tdefineLazy(inst._zod, \"pattern\", () => {\n\t\tif (def.options.every((o) => o._zod.pattern)) {\n\t\t\tconst patterns = def.options.map((o) => o._zod.pattern);\n\t\t\treturn new RegExp(`^(${patterns.map((p) => cleanRegex(p.source)).join(\"|\")})$`);\n\t\t}\n\t});\n\tconst single = def.options.length === 1;\n\tconst first = def.options[0]._zod.run;\n\tinst._zod.parse = (payload, ctx) => {\n\t\tif (single) return first(payload, ctx);\n\t\tlet async = false;\n\t\tconst results = [];\n\t\tfor (const option of def.options) {\n\t\t\tconst result = option._zod.run({\n\t\t\t\tvalue: payload.value,\n\t\t\t\tissues: []\n\t\t\t}, ctx);\n\t\t\tif (result instanceof Promise) {\n\t\t\t\tresults.push(result);\n\t\t\t\tasync = true;\n\t\t\t} else {\n\t\t\t\tif (result.issues.length === 0) return result;\n\t\t\t\tresults.push(result);\n\t\t\t}\n\t\t}\n\t\tif (!async) return handleUnionResults(results, payload, inst, ctx);\n\t\treturn Promise.all(results).then((results) => {\n\t\t\treturn handleUnionResults(results, payload, inst, ctx);\n\t\t});\n\t};\n});\nconst $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor(\"$ZodDiscriminatedUnion\", (inst, def) => {\n\tdef.inclusive = false;\n\t$ZodUnion.init(inst, def);\n\tconst _super = inst._zod.parse;\n\tdefineLazy(inst._zod, \"propValues\", () => {\n\t\tconst propValues = {};\n\t\tfor (const option of def.options) {\n\t\t\tconst pv = option._zod.propValues;\n\t\t\tif (!pv || Object.keys(pv).length === 0) throw new Error(`Invalid discriminated union option at index \"${def.options.indexOf(option)}\"`);\n\t\t\tfor (const [k, v] of Object.entries(pv)) {\n\t\t\t\tif (!propValues[k]) propValues[k] = /* @__PURE__ */ new Set();\n\t\t\t\tfor (const val of v) propValues[k].add(val);\n\t\t\t}\n\t\t}\n\t\treturn propValues;\n\t});\n\tconst disc = cached(() => {\n\t\tconst opts = def.options;\n\t\tconst map = /* @__PURE__ */ new Map();\n\t\tfor (const o of opts) {\n\t\t\tconst values = o._zod.propValues?.[def.discriminator];\n\t\t\tif (!values || values.size === 0) throw new Error(`Invalid discriminated union option at index \"${def.options.indexOf(o)}\"`);\n\t\t\tfor (const v of values) {\n\t\t\t\tif (map.has(v)) throw new Error(`Duplicate discriminator value \"${String(v)}\"`);\n\t\t\t\tmap.set(v, o);\n\t\t\t}\n\t\t}\n\t\treturn map;\n\t});\n\tinst._zod.parse = (payload, ctx) => {\n\t\tconst input = payload.value;\n\t\tif (!isObject(input)) {\n\t\t\tpayload.issues.push({\n\t\t\t\tcode: \"invalid_type\",\n\t\t\t\texpected: \"object\",\n\t\t\t\tinput,\n\t\t\t\tinst\n\t\t\t});\n\t\t\treturn payload;\n\t\t}\n\t\tconst opt = disc.value.get(input?.[def.discriminator]);\n\t\tif (opt) return opt._zod.run(payload, ctx);\n\t\tif (def.unionFallback) return _super(payload, ctx);\n\t\tpayload.issues.push({\n\t\t\tcode: \"invalid_union\",\n\t\t\terrors: [],\n\t\t\tnote: \"No matching discriminator\",\n\t\t\tdiscriminator: def.discriminator,\n\t\t\tinput,\n\t\t\tpath: [def.discriminator],\n\t\t\tinst\n\t\t});\n\t\treturn payload;\n\t};\n});\nconst $ZodIntersection = /* @__PURE__ */ $constructor(\"$ZodIntersection\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tinst._zod.parse = (payload, ctx) => {\n\t\tconst input = payload.value;\n\t\tconst left = def.left._zod.run({\n\t\t\tvalue: input,\n\t\t\tissues: []\n\t\t}, ctx);\n\t\tconst right = def.right._zod.run({\n\t\t\tvalue: input,\n\t\t\tissues: []\n\t\t}, ctx);\n\t\tif (left instanceof Promise || right instanceof Promise) return Promise.all([left, right]).then(([left, right]) => {\n\t\t\treturn handleIntersectionResults(payload, left, right);\n\t\t});\n\t\treturn handleIntersectionResults(payload, left, right);\n\t};\n});\nfunction mergeValues(a, b) {\n\tif (a === b) return {\n\t\tvalid: true,\n\t\tdata: a\n\t};\n\tif (a instanceof Date && b instanceof Date && +a === +b) return {\n\t\tvalid: true,\n\t\tdata: a\n\t};\n\tif (isPlainObject(a) && isPlainObject(b)) {\n\t\tconst bKeys = Object.keys(b);\n\t\tconst sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);\n\t\tconst newObj = {\n\t\t\t...a,\n\t\t\t...b\n\t\t};\n\t\tfor (const key of sharedKeys) {\n\t\t\tconst sharedValue = mergeValues(a[key], b[key]);\n\t\t\tif (!sharedValue.valid) return {\n\t\t\t\tvalid: false,\n\t\t\t\tmergeErrorPath: [key, ...sharedValue.mergeErrorPath]\n\t\t\t};\n\t\t\tnewObj[key] = sharedValue.data;\n\t\t}\n\t\treturn {\n\t\t\tvalid: true,\n\t\t\tdata: newObj\n\t\t};\n\t}\n\tif (Array.isArray(a) && Array.isArray(b)) {\n\t\tif (a.length !== b.length) return {\n\t\t\tvalid: false,\n\t\t\tmergeErrorPath: []\n\t\t};\n\t\tconst newArray = [];\n\t\tfor (let index = 0; index < a.length; index++) {\n\t\t\tconst itemA = a[index];\n\t\t\tconst itemB = b[index];\n\t\t\tconst sharedValue = mergeValues(itemA, itemB);\n\t\t\tif (!sharedValue.valid) return {\n\t\t\t\tvalid: false,\n\t\t\t\tmergeErrorPath: [index, ...sharedValue.mergeErrorPath]\n\t\t\t};\n\t\t\tnewArray.push(sharedValue.data);\n\t\t}\n\t\treturn {\n\t\t\tvalid: true,\n\t\t\tdata: newArray\n\t\t};\n\t}\n\treturn {\n\t\tvalid: false,\n\t\tmergeErrorPath: []\n\t};\n}\nfunction handleIntersectionResults(result, left, right) {\n\tconst unrecKeys = /* @__PURE__ */ new Map();\n\tlet unrecIssue;\n\tfor (const iss of left.issues) if (iss.code === \"unrecognized_keys\") {\n\t\tunrecIssue ?? (unrecIssue = iss);\n\t\tfor (const k of iss.keys) {\n\t\t\tif (!unrecKeys.has(k)) unrecKeys.set(k, {});\n\t\t\tunrecKeys.get(k).l = true;\n\t\t}\n\t} else result.issues.push(iss);\n\tfor (const iss of right.issues) if (iss.code === \"unrecognized_keys\") for (const k of iss.keys) {\n\t\tif (!unrecKeys.has(k)) unrecKeys.set(k, {});\n\t\tunrecKeys.get(k).r = true;\n\t}\n\telse result.issues.push(iss);\n\tconst bothKeys = [...unrecKeys].filter(([, f]) => f.l && f.r).map(([k]) => k);\n\tif (bothKeys.length && unrecIssue) result.issues.push({\n\t\t...unrecIssue,\n\t\tkeys: bothKeys\n\t});\n\tif (aborted(result)) return result;\n\tconst merged = mergeValues(left.value, right.value);\n\tif (!merged.valid) throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(merged.mergeErrorPath)}`);\n\tresult.value = merged.data;\n\treturn result;\n}\nconst $ZodRecord = /* @__PURE__ */ $constructor(\"$ZodRecord\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tinst._zod.parse = (payload, ctx) => {\n\t\tconst input = payload.value;\n\t\tif (!isPlainObject(input)) {\n\t\t\tpayload.issues.push({\n\t\t\t\texpected: \"record\",\n\t\t\t\tcode: \"invalid_type\",\n\t\t\t\tinput,\n\t\t\t\tinst\n\t\t\t});\n\t\t\treturn payload;\n\t\t}\n\t\tconst proms = [];\n\t\tconst values = def.keyType._zod.values;\n\t\tif (values) {\n\t\t\tpayload.value = {};\n\t\t\tconst recordKeys = /* @__PURE__ */ new Set();\n\t\t\tfor (const key of values) if (typeof key === \"string\" || typeof key === \"number\" || typeof key === \"symbol\") {\n\t\t\t\trecordKeys.add(typeof key === \"number\" ? key.toString() : key);\n\t\t\t\tconst result = def.valueType._zod.run({\n\t\t\t\t\tvalue: input[key],\n\t\t\t\t\tissues: []\n\t\t\t\t}, ctx);\n\t\t\t\tif (result instanceof Promise) proms.push(result.then((result) => {\n\t\t\t\t\tif (result.issues.length) payload.issues.push(...prefixIssues(key, result.issues));\n\t\t\t\t\tpayload.value[key] = result.value;\n\t\t\t\t}));\n\t\t\t\telse {\n\t\t\t\t\tif (result.issues.length) payload.issues.push(...prefixIssues(key, result.issues));\n\t\t\t\t\tpayload.value[key] = result.value;\n\t\t\t\t}\n\t\t\t}\n\t\t\tlet unrecognized;\n\t\t\tfor (const key in input) if (!recordKeys.has(key)) {\n\t\t\t\tunrecognized = unrecognized ?? [];\n\t\t\t\tunrecognized.push(key);\n\t\t\t}\n\t\t\tif (unrecognized && unrecognized.length > 0) payload.issues.push({\n\t\t\t\tcode: \"unrecognized_keys\",\n\t\t\t\tinput,\n\t\t\t\tinst,\n\t\t\t\tkeys: unrecognized\n\t\t\t});\n\t\t} else {\n\t\t\tpayload.value = {};\n\t\t\tfor (const key of Reflect.ownKeys(input)) {\n\t\t\t\tif (key === \"__proto__\") continue;\n\t\t\t\tlet keyResult = def.keyType._zod.run({\n\t\t\t\t\tvalue: key,\n\t\t\t\t\tissues: []\n\t\t\t\t}, ctx);\n\t\t\t\tif (keyResult instanceof Promise) throw new Error(\"Async schemas not supported in object keys currently\");\n\t\t\t\tif (typeof key === \"string\" && number$1.test(key) && keyResult.issues.length) {\n\t\t\t\t\tconst retryResult = def.keyType._zod.run({\n\t\t\t\t\t\tvalue: Number(key),\n\t\t\t\t\t\tissues: []\n\t\t\t\t\t}, ctx);\n\t\t\t\t\tif (retryResult instanceof Promise) throw new Error(\"Async schemas not supported in object keys currently\");\n\t\t\t\t\tif (retryResult.issues.length === 0) keyResult = retryResult;\n\t\t\t\t}\n\t\t\t\tif (keyResult.issues.length) {\n\t\t\t\t\tif (def.mode === \"loose\") payload.value[key] = input[key];\n\t\t\t\t\telse payload.issues.push({\n\t\t\t\t\t\tcode: \"invalid_key\",\n\t\t\t\t\t\torigin: \"record\",\n\t\t\t\t\t\tissues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),\n\t\t\t\t\t\tinput: key,\n\t\t\t\t\t\tpath: [key],\n\t\t\t\t\t\tinst\n\t\t\t\t\t});\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconst result = def.valueType._zod.run({\n\t\t\t\t\tvalue: input[key],\n\t\t\t\t\tissues: []\n\t\t\t\t}, ctx);\n\t\t\t\tif (result instanceof Promise) proms.push(result.then((result) => {\n\t\t\t\t\tif (result.issues.length) payload.issues.push(...prefixIssues(key, result.issues));\n\t\t\t\t\tpayload.value[keyResult.value] = result.value;\n\t\t\t\t}));\n\t\t\t\telse {\n\t\t\t\t\tif (result.issues.length) payload.issues.push(...prefixIssues(key, result.issues));\n\t\t\t\t\tpayload.value[keyResult.value] = result.value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (proms.length) return Promise.all(proms).then(() => payload);\n\t\treturn payload;\n\t};\n});\nconst $ZodEnum = /* @__PURE__ */ $constructor(\"$ZodEnum\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tconst values = getEnumValues(def.entries);\n\tconst valuesSet = new Set(values);\n\tinst._zod.values = valuesSet;\n\tinst._zod.pattern = new RegExp(`^(${values.filter((k) => propertyKeyTypes.has(typeof k)).map((o) => typeof o === \"string\" ? escapeRegex(o) : o.toString()).join(\"|\")})$`);\n\tinst._zod.parse = (payload, _ctx) => {\n\t\tconst input = payload.value;\n\t\tif (valuesSet.has(input)) return payload;\n\t\tpayload.issues.push({\n\t\t\tcode: \"invalid_value\",\n\t\t\tvalues,\n\t\t\tinput,\n\t\t\tinst\n\t\t});\n\t\treturn payload;\n\t};\n});\nconst $ZodLiteral = /* @__PURE__ */ $constructor(\"$ZodLiteral\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tif (def.values.length === 0) throw new Error(\"Cannot create literal schema with no valid values\");\n\tconst values = new Set(def.values);\n\tinst._zod.values = values;\n\tinst._zod.pattern = new RegExp(`^(${def.values.map((o) => typeof o === \"string\" ? escapeRegex(o) : o ? escapeRegex(o.toString()) : String(o)).join(\"|\")})$`);\n\tinst._zod.parse = (payload, _ctx) => {\n\t\tconst input = payload.value;\n\t\tif (values.has(input)) return payload;\n\t\tpayload.issues.push({\n\t\t\tcode: \"invalid_value\",\n\t\t\tvalues: def.values,\n\t\t\tinput,\n\t\t\tinst\n\t\t});\n\t\treturn payload;\n\t};\n});\nconst $ZodTransform = /* @__PURE__ */ $constructor(\"$ZodTransform\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tinst._zod.parse = (payload, ctx) => {\n\t\tif (ctx.direction === \"backward\") throw new $ZodEncodeError(inst.constructor.name);\n\t\tconst _out = def.transform(payload.value, payload);\n\t\tif (ctx.async) return (_out instanceof Promise ? _out : Promise.resolve(_out)).then((output) => {\n\t\t\tpayload.value = output;\n\t\t\treturn payload;\n\t\t});\n\t\tif (_out instanceof Promise) throw new $ZodAsyncError();\n\t\tpayload.value = _out;\n\t\treturn payload;\n\t};\n});\nfunction handleOptionalResult(result, input) {\n\tif (result.issues.length && input === void 0) return {\n\t\tissues: [],\n\t\tvalue: void 0\n\t};\n\treturn result;\n}\nconst $ZodOptional = /* @__PURE__ */ $constructor(\"$ZodOptional\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tinst._zod.optin = \"optional\";\n\tinst._zod.optout = \"optional\";\n\tdefineLazy(inst._zod, \"values\", () => {\n\t\treturn def.innerType._zod.values ? new Set([...def.innerType._zod.values, void 0]) : void 0;\n\t});\n\tdefineLazy(inst._zod, \"pattern\", () => {\n\t\tconst pattern = def.innerType._zod.pattern;\n\t\treturn pattern ? new RegExp(`^(${cleanRegex(pattern.source)})?$`) : void 0;\n\t});\n\tinst._zod.parse = (payload, ctx) => {\n\t\tif (def.innerType._zod.optin === \"optional\") {\n\t\t\tconst result = def.innerType._zod.run(payload, ctx);\n\t\t\tif (result instanceof Promise) return result.then((r) => handleOptionalResult(r, payload.value));\n\t\t\treturn handleOptionalResult(result, payload.value);\n\t\t}\n\t\tif (payload.value === void 0) return payload;\n\t\treturn def.innerType._zod.run(payload, ctx);\n\t};\n});\nconst $ZodExactOptional = /* @__PURE__ */ $constructor(\"$ZodExactOptional\", (inst, def) => {\n\t$ZodOptional.init(inst, def);\n\tdefineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n\tdefineLazy(inst._zod, \"pattern\", () => def.innerType._zod.pattern);\n\tinst._zod.parse = (payload, ctx) => {\n\t\treturn def.innerType._zod.run(payload, ctx);\n\t};\n});\nconst $ZodNullable = /* @__PURE__ */ $constructor(\"$ZodNullable\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tdefineLazy(inst._zod, \"optin\", () => def.innerType._zod.optin);\n\tdefineLazy(inst._zod, \"optout\", () => def.innerType._zod.optout);\n\tdefineLazy(inst._zod, \"pattern\", () => {\n\t\tconst pattern = def.innerType._zod.pattern;\n\t\treturn pattern ? new RegExp(`^(${cleanRegex(pattern.source)}|null)$`) : void 0;\n\t});\n\tdefineLazy(inst._zod, \"values\", () => {\n\t\treturn def.innerType._zod.values ? new Set([...def.innerType._zod.values, null]) : void 0;\n\t});\n\tinst._zod.parse = (payload, ctx) => {\n\t\tif (payload.value === null) return payload;\n\t\treturn def.innerType._zod.run(payload, ctx);\n\t};\n});\nconst $ZodDefault = /* @__PURE__ */ $constructor(\"$ZodDefault\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tinst._zod.optin = \"optional\";\n\tdefineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n\tinst._zod.parse = (payload, ctx) => {\n\t\tif (ctx.direction === \"backward\") return def.innerType._zod.run(payload, ctx);\n\t\tif (payload.value === void 0) {\n\t\t\tpayload.value = def.defaultValue;\n\t\t\t/**\n\t\t\t* $ZodDefault returns the default value immediately in forward direction.\n\t\t\t* 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\t\t\treturn payload;\n\t\t}\n\t\tconst result = def.innerType._zod.run(payload, ctx);\n\t\tif (result instanceof Promise) return result.then((result) => handleDefaultResult(result, def));\n\t\treturn handleDefaultResult(result, def);\n\t};\n});\nfunction handleDefaultResult(payload, def) {\n\tif (payload.value === void 0) payload.value = def.defaultValue;\n\treturn payload;\n}\nconst $ZodPrefault = /* @__PURE__ */ $constructor(\"$ZodPrefault\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tinst._zod.optin = \"optional\";\n\tdefineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n\tinst._zod.parse = (payload, ctx) => {\n\t\tif (ctx.direction === \"backward\") return def.innerType._zod.run(payload, ctx);\n\t\tif (payload.value === void 0) payload.value = def.defaultValue;\n\t\treturn def.innerType._zod.run(payload, ctx);\n\t};\n});\nconst $ZodNonOptional = /* @__PURE__ */ $constructor(\"$ZodNonOptional\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tdefineLazy(inst._zod, \"values\", () => {\n\t\tconst v = def.innerType._zod.values;\n\t\treturn v ? new Set([...v].filter((x) => x !== void 0)) : void 0;\n\t});\n\tinst._zod.parse = (payload, ctx) => {\n\t\tconst result = def.innerType._zod.run(payload, ctx);\n\t\tif (result instanceof Promise) return result.then((result) => handleNonOptionalResult(result, inst));\n\t\treturn handleNonOptionalResult(result, inst);\n\t};\n});\nfunction handleNonOptionalResult(payload, inst) {\n\tif (!payload.issues.length && payload.value === void 0) payload.issues.push({\n\t\tcode: \"invalid_type\",\n\t\texpected: \"nonoptional\",\n\t\tinput: payload.value,\n\t\tinst\n\t});\n\treturn payload;\n}\nconst $ZodCatch = /* @__PURE__ */ $constructor(\"$ZodCatch\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tdefineLazy(inst._zod, \"optin\", () => def.innerType._zod.optin);\n\tdefineLazy(inst._zod, \"optout\", () => def.innerType._zod.optout);\n\tdefineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n\tinst._zod.parse = (payload, ctx) => {\n\t\tif (ctx.direction === \"backward\") return def.innerType._zod.run(payload, ctx);\n\t\tconst result = def.innerType._zod.run(payload, ctx);\n\t\tif (result instanceof Promise) return result.then((result) => {\n\t\t\tpayload.value = result.value;\n\t\t\tif (result.issues.length) {\n\t\t\t\tpayload.value = def.catchValue({\n\t\t\t\t\t...payload,\n\t\t\t\t\terror: { issues: result.issues.map((iss) => finalizeIssue(iss, ctx, config())) },\n\t\t\t\t\tinput: payload.value\n\t\t\t\t});\n\t\t\t\tpayload.issues = [];\n\t\t\t}\n\t\t\treturn payload;\n\t\t});\n\t\tpayload.value = result.value;\n\t\tif (result.issues.length) {\n\t\t\tpayload.value = def.catchValue({\n\t\t\t\t...payload,\n\t\t\t\terror: { issues: result.issues.map((iss) => finalizeIssue(iss, ctx, config())) },\n\t\t\t\tinput: payload.value\n\t\t\t});\n\t\t\tpayload.issues = [];\n\t\t}\n\t\treturn payload;\n\t};\n});\nconst $ZodPipe = /* @__PURE__ */ $constructor(\"$ZodPipe\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tdefineLazy(inst._zod, \"values\", () => def.in._zod.values);\n\tdefineLazy(inst._zod, \"optin\", () => def.in._zod.optin);\n\tdefineLazy(inst._zod, \"optout\", () => def.out._zod.optout);\n\tdefineLazy(inst._zod, \"propValues\", () => def.in._zod.propValues);\n\tinst._zod.parse = (payload, ctx) => {\n\t\tif (ctx.direction === \"backward\") {\n\t\t\tconst right = def.out._zod.run(payload, ctx);\n\t\t\tif (right instanceof Promise) return right.then((right) => handlePipeResult(right, def.in, ctx));\n\t\t\treturn handlePipeResult(right, def.in, ctx);\n\t\t}\n\t\tconst left = def.in._zod.run(payload, ctx);\n\t\tif (left instanceof Promise) return left.then((left) => handlePipeResult(left, def.out, ctx));\n\t\treturn handlePipeResult(left, def.out, ctx);\n\t};\n});\nfunction handlePipeResult(left, next, ctx) {\n\tif (left.issues.length) {\n\t\tleft.aborted = true;\n\t\treturn left;\n\t}\n\treturn next._zod.run({\n\t\tvalue: left.value,\n\t\tissues: left.issues\n\t}, ctx);\n}\nconst $ZodReadonly = /* @__PURE__ */ $constructor(\"$ZodReadonly\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tdefineLazy(inst._zod, \"propValues\", () => def.innerType._zod.propValues);\n\tdefineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n\tdefineLazy(inst._zod, \"optin\", () => def.innerType?._zod?.optin);\n\tdefineLazy(inst._zod, \"optout\", () => def.innerType?._zod?.optout);\n\tinst._zod.parse = (payload, ctx) => {\n\t\tif (ctx.direction === \"backward\") return def.innerType._zod.run(payload, ctx);\n\t\tconst result = def.innerType._zod.run(payload, ctx);\n\t\tif (result instanceof Promise) return result.then(handleReadonlyResult);\n\t\treturn handleReadonlyResult(result);\n\t};\n});\nfunction handleReadonlyResult(payload) {\n\tpayload.value = Object.freeze(payload.value);\n\treturn payload;\n}\nconst $ZodCustom = /* @__PURE__ */ $constructor(\"$ZodCustom\", (inst, def) => {\n\t$ZodCheck.init(inst, def);\n\t$ZodType.init(inst, def);\n\tinst._zod.parse = (payload, _) => {\n\t\treturn payload;\n\t};\n\tinst._zod.check = (payload) => {\n\t\tconst input = payload.value;\n\t\tconst r = def.fn(input);\n\t\tif (r instanceof Promise) return r.then((r) => handleRefineResult(r, payload, input, inst));\n\t\thandleRefineResult(r, payload, input, inst);\n\t};\n});\nfunction handleRefineResult(result, payload, input, inst) {\n\tif (!result) {\n\t\tconst _iss = {\n\t\t\tcode: \"custom\",\n\t\t\tinput,\n\t\t\tinst,\n\t\t\tpath: [...inst._zod.def.path ?? []],\n\t\t\tcontinue: !inst._zod.def.abort\n\t\t};\n\t\tif (inst._zod.def.params) _iss.params = inst._zod.def.params;\n\t\tpayload.issues.push(issue(_iss));\n\t}\n}\n//#endregion\n//#region ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/registries.js\nvar _a;\nvar $ZodRegistry = class {\n\tconstructor() {\n\t\tthis._map = /* @__PURE__ */ new WeakMap();\n\t\tthis._idmap = /* @__PURE__ */ new Map();\n\t}\n\tadd(schema, ..._meta) {\n\t\tconst meta = _meta[0];\n\t\tthis._map.set(schema, meta);\n\t\tif (meta && typeof meta === \"object\" && \"id\" in meta) this._idmap.set(meta.id, schema);\n\t\treturn this;\n\t}\n\tclear() {\n\t\tthis._map = /* @__PURE__ */ new WeakMap();\n\t\tthis._idmap = /* @__PURE__ */ new Map();\n\t\treturn this;\n\t}\n\tremove(schema) {\n\t\tconst meta = this._map.get(schema);\n\t\tif (meta && typeof meta === \"object\" && \"id\" in meta) this._idmap.delete(meta.id);\n\t\tthis._map.delete(schema);\n\t\treturn this;\n\t}\n\tget(schema) {\n\t\tconst p = schema._zod.parent;\n\t\tif (p) {\n\t\t\tconst pm = { ...this.get(p) ?? {} };\n\t\t\tdelete pm.id;\n\t\t\tconst f = {\n\t\t\t\t...pm,\n\t\t\t\t...this._map.get(schema)\n\t\t\t};\n\t\t\treturn Object.keys(f).length ? f : void 0;\n\t\t}\n\t\treturn this._map.get(schema);\n\t}\n\thas(schema) {\n\t\treturn this._map.has(schema);\n\t}\n};\nfunction registry() {\n\treturn new $ZodRegistry();\n}\n(_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());\nconst globalRegistry = globalThis.__zod_globalRegistry;\n//#endregion\n//#region ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/api.js\n/* @__NO_SIDE_EFFECTS__ */\nfunction _string(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _email(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"email\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _guid(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"guid\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _uuid(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"uuid\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _uuidv4(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"uuid\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\tversion: \"v4\",\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _uuidv6(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"uuid\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\tversion: \"v6\",\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _uuidv7(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"uuid\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\tversion: \"v7\",\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _url(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"url\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _emoji(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"emoji\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _nanoid(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"nanoid\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _cuid(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"cuid\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _cuid2(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"cuid2\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _ulid(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"ulid\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _xid(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"xid\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _ksuid(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"ksuid\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _ipv4(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"ipv4\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _ipv6(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"ipv6\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _cidrv4(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"cidrv4\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _cidrv6(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"cidrv6\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _base64(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"base64\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _base64url(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"base64url\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _e164(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"e164\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _jwt(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"jwt\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _isoDateTime(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"datetime\",\n\t\tcheck: \"string_format\",\n\t\toffset: false,\n\t\tlocal: false,\n\t\tprecision: null,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _isoDate(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"date\",\n\t\tcheck: \"string_format\",\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _isoTime(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"time\",\n\t\tcheck: \"string_format\",\n\t\tprecision: null,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _isoDuration(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"duration\",\n\t\tcheck: \"string_format\",\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _number(Class, params) {\n\treturn new Class({\n\t\ttype: \"number\",\n\t\tchecks: [],\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _int(Class, params) {\n\treturn new Class({\n\t\ttype: \"number\",\n\t\tcheck: \"number_format\",\n\t\tabort: false,\n\t\tformat: \"safeint\",\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _boolean(Class, params) {\n\treturn new Class({\n\t\ttype: \"boolean\",\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _unknown(Class) {\n\treturn new Class({ type: \"unknown\" });\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _never(Class, params) {\n\treturn new Class({\n\t\ttype: \"never\",\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _lt(value, params) {\n\treturn new $ZodCheckLessThan({\n\t\tcheck: \"less_than\",\n\t\t...normalizeParams(params),\n\t\tvalue,\n\t\tinclusive: false\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _lte(value, params) {\n\treturn new $ZodCheckLessThan({\n\t\tcheck: \"less_than\",\n\t\t...normalizeParams(params),\n\t\tvalue,\n\t\tinclusive: true\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _gt(value, params) {\n\treturn new $ZodCheckGreaterThan({\n\t\tcheck: \"greater_than\",\n\t\t...normalizeParams(params),\n\t\tvalue,\n\t\tinclusive: false\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _gte(value, params) {\n\treturn new $ZodCheckGreaterThan({\n\t\tcheck: \"greater_than\",\n\t\t...normalizeParams(params),\n\t\tvalue,\n\t\tinclusive: true\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _multipleOf(value, params) {\n\treturn new $ZodCheckMultipleOf({\n\t\tcheck: \"multiple_of\",\n\t\t...normalizeParams(params),\n\t\tvalue\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _maxLength(maximum, params) {\n\treturn new $ZodCheckMaxLength({\n\t\tcheck: \"max_length\",\n\t\t...normalizeParams(params),\n\t\tmaximum\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _minLength(minimum, params) {\n\treturn new $ZodCheckMinLength({\n\t\tcheck: \"min_length\",\n\t\t...normalizeParams(params),\n\t\tminimum\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _length(length, params) {\n\treturn new $ZodCheckLengthEquals({\n\t\tcheck: \"length_equals\",\n\t\t...normalizeParams(params),\n\t\tlength\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _regex(pattern, params) {\n\treturn new $ZodCheckRegex({\n\t\tcheck: \"string_format\",\n\t\tformat: \"regex\",\n\t\t...normalizeParams(params),\n\t\tpattern\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _lowercase(params) {\n\treturn new $ZodCheckLowerCase({\n\t\tcheck: \"string_format\",\n\t\tformat: \"lowercase\",\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _uppercase(params) {\n\treturn new $ZodCheckUpperCase({\n\t\tcheck: \"string_format\",\n\t\tformat: \"uppercase\",\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _includes(includes, params) {\n\treturn new $ZodCheckIncludes({\n\t\tcheck: \"string_format\",\n\t\tformat: \"includes\",\n\t\t...normalizeParams(params),\n\t\tincludes\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _startsWith(prefix, params) {\n\treturn new $ZodCheckStartsWith({\n\t\tcheck: \"string_format\",\n\t\tformat: \"starts_with\",\n\t\t...normalizeParams(params),\n\t\tprefix\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _endsWith(suffix, params) {\n\treturn new $ZodCheckEndsWith({\n\t\tcheck: \"string_format\",\n\t\tformat: \"ends_with\",\n\t\t...normalizeParams(params),\n\t\tsuffix\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _overwrite(tx) {\n\treturn new $ZodCheckOverwrite({\n\t\tcheck: \"overwrite\",\n\t\ttx\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _normalize(form) {\n\treturn /* @__PURE__ */ _overwrite((input) => input.normalize(form));\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _trim() {\n\treturn /* @__PURE__ */ _overwrite((input) => input.trim());\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _toLowerCase() {\n\treturn /* @__PURE__ */ _overwrite((input) => input.toLowerCase());\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _toUpperCase() {\n\treturn /* @__PURE__ */ _overwrite((input) => input.toUpperCase());\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _slugify() {\n\treturn /* @__PURE__ */ _overwrite((input) => slugify(input));\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _array(Class, element, params) {\n\treturn new Class({\n\t\ttype: \"array\",\n\t\telement,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _refine(Class, fn, _params) {\n\treturn new Class({\n\t\ttype: \"custom\",\n\t\tcheck: \"custom\",\n\t\tfn,\n\t\t...normalizeParams(_params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _superRefine(fn) {\n\tconst ch = /* @__PURE__ */ _check((payload) => {\n\t\tpayload.addIssue = (issue$2) => {\n\t\t\tif (typeof issue$2 === \"string\") payload.issues.push(issue(issue$2, payload.value, ch._zod.def));\n\t\t\telse {\n\t\t\t\tconst _issue = issue$2;\n\t\t\t\tif (_issue.fatal) _issue.continue = false;\n\t\t\t\t_issue.code ?? (_issue.code = \"custom\");\n\t\t\t\t_issue.input ?? (_issue.input = payload.value);\n\t\t\t\t_issue.inst ?? (_issue.inst = ch);\n\t\t\t\t_issue.continue ?? (_issue.continue = !ch._zod.def.abort);\n\t\t\t\tpayload.issues.push(issue(_issue));\n\t\t\t}\n\t\t};\n\t\treturn fn(payload.value, payload);\n\t});\n\treturn ch;\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _check(fn, params) {\n\tconst ch = new $ZodCheck({\n\t\tcheck: \"custom\",\n\t\t...normalizeParams(params)\n\t});\n\tch._zod.check = fn;\n\treturn ch;\n}\n//#endregion\n//#region ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/to-json-schema.js\nfunction initializeContext(params) {\n\tlet target = params?.target ?? \"draft-2020-12\";\n\tif (target === \"draft-4\") target = \"draft-04\";\n\tif (target === \"draft-7\") target = \"draft-07\";\n\treturn {\n\t\tprocessors: params.processors ?? {},\n\t\tmetadataRegistry: params?.metadata ?? globalRegistry,\n\t\ttarget,\n\t\tunrepresentable: params?.unrepresentable ?? \"throw\",\n\t\toverride: params?.override ?? (() => {}),\n\t\tio: params?.io ?? \"output\",\n\t\tcounter: 0,\n\t\tseen: /* @__PURE__ */ new Map(),\n\t\tcycles: params?.cycles ?? \"ref\",\n\t\treused: params?.reused ?? \"inline\",\n\t\texternal: params?.external ?? void 0\n\t};\n}\nfunction process$1(schema, ctx, _params = {\n\tpath: [],\n\tschemaPath: []\n}) {\n\tvar _a;\n\tconst def = schema._zod.def;\n\tconst seen = ctx.seen.get(schema);\n\tif (seen) {\n\t\tseen.count++;\n\t\tif (_params.schemaPath.includes(schema)) seen.cycle = _params.path;\n\t\treturn seen.schema;\n\t}\n\tconst result = {\n\t\tschema: {},\n\t\tcount: 1,\n\t\tcycle: void 0,\n\t\tpath: _params.path\n\t};\n\tctx.seen.set(schema, result);\n\tconst overrideSchema = schema._zod.toJSONSchema?.();\n\tif (overrideSchema) result.schema = overrideSchema;\n\telse {\n\t\tconst params = {\n\t\t\t..._params,\n\t\t\tschemaPath: [..._params.schemaPath, schema],\n\t\t\tpath: _params.path\n\t\t};\n\t\tif (schema._zod.processJSONSchema) schema._zod.processJSONSchema(ctx, result.schema, params);\n\t\telse {\n\t\t\tconst _json = result.schema;\n\t\t\tconst processor = ctx.processors[def.type];\n\t\t\tif (!processor) throw new Error(`[toJSONSchema]: Non-representable type encountered: ${def.type}`);\n\t\t\tprocessor(schema, ctx, _json, params);\n\t\t}\n\t\tconst parent = schema._zod.parent;\n\t\tif (parent) {\n\t\t\tif (!result.ref) result.ref = parent;\n\t\t\tprocess$1(parent, ctx, params);\n\t\t\tctx.seen.get(parent).isParent = true;\n\t\t}\n\t}\n\tconst meta = ctx.metadataRegistry.get(schema);\n\tif (meta) Object.assign(result.schema, meta);\n\tif (ctx.io === \"input\" && isTransforming(schema)) {\n\t\tdelete result.schema.examples;\n\t\tdelete result.schema.default;\n\t}\n\tif (ctx.io === \"input\" && result.schema._prefault) (_a = result.schema).default ?? (_a.default = result.schema._prefault);\n\tdelete result.schema._prefault;\n\treturn ctx.seen.get(schema).schema;\n}\nfunction extractDefs(ctx, schema) {\n\tconst root = ctx.seen.get(schema);\n\tif (!root) throw new Error(\"Unprocessed schema. This is a bug in Zod.\");\n\tconst idToSchema = /* @__PURE__ */ new Map();\n\tfor (const entry of ctx.seen.entries()) {\n\t\tconst id = ctx.metadataRegistry.get(entry[0])?.id;\n\t\tif (id) {\n\t\t\tconst existing = idToSchema.get(id);\n\t\t\tif (existing && existing !== entry[0]) throw new Error(`Duplicate schema id \"${id}\" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);\n\t\t\tidToSchema.set(id, entry[0]);\n\t\t}\n\t}\n\tconst makeURI = (entry) => {\n\t\tconst defsSegment = ctx.target === \"draft-2020-12\" ? \"$defs\" : \"definitions\";\n\t\tif (ctx.external) {\n\t\t\tconst externalId = ctx.external.registry.get(entry[0])?.id;\n\t\t\tconst uriGenerator = ctx.external.uri ?? ((id) => id);\n\t\t\tif (externalId) return { ref: uriGenerator(externalId) };\n\t\t\tconst id = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx.counter++}`;\n\t\t\tentry[1].defId = id;\n\t\t\treturn {\n\t\t\t\tdefId: id,\n\t\t\t\tref: `${uriGenerator(\"__shared\")}#/${defsSegment}/${id}`\n\t\t\t};\n\t\t}\n\t\tif (entry[1] === root) return { ref: \"#\" };\n\t\tconst defUriPrefix = `#/${defsSegment}/`;\n\t\tconst defId = entry[1].schema.id ?? `__schema${ctx.counter++}`;\n\t\treturn {\n\t\t\tdefId,\n\t\t\tref: defUriPrefix + defId\n\t\t};\n\t};\n\tconst extractToDef = (entry) => {\n\t\tif (entry[1].schema.$ref) return;\n\t\tconst seen = entry[1];\n\t\tconst { ref, defId } = makeURI(entry);\n\t\tseen.def = { ...seen.schema };\n\t\tif (defId) seen.defId = defId;\n\t\tconst schema = seen.schema;\n\t\tfor (const key in schema) delete schema[key];\n\t\tschema.$ref = ref;\n\t};\n\tif (ctx.cycles === \"throw\") for (const entry of ctx.seen.entries()) {\n\t\tconst seen = entry[1];\n\t\tif (seen.cycle) throw new Error(`Cycle detected: #/${seen.cycle?.join(\"/\")}/<root>\n\nSet the \\`cycles\\` parameter to \\`\"ref\"\\` to resolve cyclical schemas with defs.`);\n\t}\n\tfor (const entry of ctx.seen.entries()) {\n\t\tconst seen = entry[1];\n\t\tif (schema === entry[0]) {\n\t\t\textractToDef(entry);\n\t\t\tcontinue;\n\t\t}\n\t\tif (ctx.external) {\n\t\t\tconst ext = ctx.external.registry.get(entry[0])?.id;\n\t\t\tif (schema !== entry[0] && ext) {\n\t\t\t\textractToDef(entry);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\tif (ctx.metadataRegistry.get(entry[0])?.id) {\n\t\t\textractToDef(entry);\n\t\t\tcontinue;\n\t\t}\n\t\tif (seen.cycle) {\n\t\t\textractToDef(entry);\n\t\t\tcontinue;\n\t\t}\n\t\tif (seen.count > 1) {\n\t\t\tif (ctx.reused === \"ref\") {\n\t\t\t\textractToDef(entry);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t}\n}\nfunction finalize(ctx, schema) {\n\tconst root = ctx.seen.get(schema);\n\tif (!root) throw new Error(\"Unprocessed schema. This is a bug in Zod.\");\n\tconst flattenRef = (zodSchema) => {\n\t\tconst seen = ctx.seen.get(zodSchema);\n\t\tif (seen.ref === null) return;\n\t\tconst schema = seen.def ?? seen.schema;\n\t\tconst _cached = { ...schema };\n\t\tconst ref = seen.ref;\n\t\tseen.ref = null;\n\t\tif (ref) {\n\t\t\tflattenRef(ref);\n\t\t\tconst refSeen = ctx.seen.get(ref);\n\t\t\tconst refSchema = refSeen.schema;\n\t\t\tif (refSchema.$ref && (ctx.target === \"draft-07\" || ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\")) {\n\t\t\t\tschema.allOf = schema.allOf ?? [];\n\t\t\t\tschema.allOf.push(refSchema);\n\t\t\t} else Object.assign(schema, refSchema);\n\t\t\tObject.assign(schema, _cached);\n\t\t\tif (zodSchema._zod.parent === ref) for (const key in schema) {\n\t\t\t\tif (key === \"$ref\" || key === \"allOf\") continue;\n\t\t\t\tif (!(key in _cached)) delete schema[key];\n\t\t\t}\n\t\t\tif (refSchema.$ref && refSeen.def) for (const key in schema) {\n\t\t\t\tif (key === \"$ref\" || key === \"allOf\") continue;\n\t\t\t\tif (key in refSeen.def && JSON.stringify(schema[key]) === JSON.stringify(refSeen.def[key])) delete schema[key];\n\t\t\t}\n\t\t}\n\t\tconst parent = zodSchema._zod.parent;\n\t\tif (parent && parent !== ref) {\n\t\t\tflattenRef(parent);\n\t\t\tconst parentSeen = ctx.seen.get(parent);\n\t\t\tif (parentSeen?.schema.$ref) {\n\t\t\t\tschema.$ref = parentSeen.schema.$ref;\n\t\t\t\tif (parentSeen.def) for (const key in schema) {\n\t\t\t\t\tif (key === \"$ref\" || key === \"allOf\") continue;\n\t\t\t\t\tif (key in parentSeen.def && JSON.stringify(schema[key]) === JSON.stringify(parentSeen.def[key])) delete schema[key];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tctx.override({\n\t\t\tzodSchema,\n\t\t\tjsonSchema: schema,\n\t\t\tpath: seen.path ?? []\n\t\t});\n\t};\n\tfor (const entry of [...ctx.seen.entries()].reverse()) flattenRef(entry[0]);\n\tconst result = {};\n\tif (ctx.target === \"draft-2020-12\") result.$schema = \"https://json-schema.org/draft/2020-12/schema\";\n\telse if (ctx.target === \"draft-07\") result.$schema = \"http://json-schema.org/draft-07/schema#\";\n\telse if (ctx.target === \"draft-04\") result.$schema = \"http://json-schema.org/draft-04/schema#\";\n\telse if (ctx.target === \"openapi-3.0\") {}\n\tif (ctx.external?.uri) {\n\t\tconst id = ctx.external.registry.get(schema)?.id;\n\t\tif (!id) throw new Error(\"Schema is missing an `id` property\");\n\t\tresult.$id = ctx.external.uri(id);\n\t}\n\tObject.assign(result, root.def ?? root.schema);\n\tconst defs = ctx.external?.defs ?? {};\n\tfor (const entry of ctx.seen.entries()) {\n\t\tconst seen = entry[1];\n\t\tif (seen.def && seen.defId) defs[seen.defId] = seen.def;\n\t}\n\tif (ctx.external) {} else if (Object.keys(defs).length > 0) if (ctx.target === \"draft-2020-12\") result.$defs = defs;\n\telse result.definitions = defs;\n\ttry {\n\t\tconst finalized = JSON.parse(JSON.stringify(result));\n\t\tObject.defineProperty(finalized, \"~standard\", {\n\t\t\tvalue: {\n\t\t\t\t...schema[\"~standard\"],\n\t\t\t\tjsonSchema: {\n\t\t\t\t\tinput: createStandardJSONSchemaMethod(schema, \"input\", ctx.processors),\n\t\t\t\t\toutput: createStandardJSONSchemaMethod(schema, \"output\", ctx.processors)\n\t\t\t\t}\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t\twritable: false\n\t\t});\n\t\treturn finalized;\n\t} catch (_err) {\n\t\tthrow new Error(\"Error converting schema to JSON.\");\n\t}\n}\nfunction isTransforming(_schema, _ctx) {\n\tconst ctx = _ctx ?? { seen: /* @__PURE__ */ new Set() };\n\tif (ctx.seen.has(_schema)) return false;\n\tctx.seen.add(_schema);\n\tconst def = _schema._zod.def;\n\tif (def.type === \"transform\") return true;\n\tif (def.type === \"array\") return isTransforming(def.element, ctx);\n\tif (def.type === \"set\") return isTransforming(def.valueType, ctx);\n\tif (def.type === \"lazy\") return isTransforming(def.getter(), ctx);\n\tif (def.type === \"promise\" || def.type === \"optional\" || def.type === \"nonoptional\" || def.type === \"nullable\" || def.type === \"readonly\" || def.type === \"default\" || def.type === \"prefault\") return isTransforming(def.innerType, ctx);\n\tif (def.type === \"intersection\") return isTransforming(def.left, ctx) || isTransforming(def.right, ctx);\n\tif (def.type === \"record\" || def.type === \"map\") return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);\n\tif (def.type === \"pipe\") return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);\n\tif (def.type === \"object\") {\n\t\tfor (const key in def.shape) if (isTransforming(def.shape[key], ctx)) return true;\n\t\treturn false;\n\t}\n\tif (def.type === \"union\") {\n\t\tfor (const option of def.options) if (isTransforming(option, ctx)) return true;\n\t\treturn false;\n\t}\n\tif (def.type === \"tuple\") {\n\t\tfor (const item of def.items) if (isTransforming(item, ctx)) return true;\n\t\tif (def.rest && isTransforming(def.rest, ctx)) return true;\n\t\treturn false;\n\t}\n\treturn 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*/\nconst createToJSONSchemaMethod = (schema, processors = {}) => (params) => {\n\tconst ctx = initializeContext({\n\t\t...params,\n\t\tprocessors\n\t});\n\tprocess$1(schema, ctx);\n\textractDefs(ctx, schema);\n\treturn finalize(ctx, schema);\n};\nconst createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {\n\tconst { libraryOptions, target } = params ?? {};\n\tconst ctx = initializeContext({\n\t\t...libraryOptions ?? {},\n\t\ttarget,\n\t\tio,\n\t\tprocessors\n\t});\n\tprocess$1(schema, ctx);\n\textractDefs(ctx, schema);\n\treturn finalize(ctx, schema);\n};\n//#endregion\n//#region ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/json-schema-processors.js\nconst formatMap = {\n\tguid: \"uuid\",\n\turl: \"uri\",\n\tdatetime: \"date-time\",\n\tjson_string: \"json-string\",\n\tregex: \"\"\n};\nconst stringProcessor = (schema, ctx, _json, _params) => {\n\tconst json = _json;\n\tjson.type = \"string\";\n\tconst { minimum, maximum, format, patterns, contentEncoding } = schema._zod.bag;\n\tif (typeof minimum === \"number\") json.minLength = minimum;\n\tif (typeof maximum === \"number\") json.maxLength = maximum;\n\tif (format) {\n\t\tjson.format = formatMap[format] ?? format;\n\t\tif (json.format === \"\") delete json.format;\n\t\tif (format === \"time\") delete json.format;\n\t}\n\tif (contentEncoding) json.contentEncoding = contentEncoding;\n\tif (patterns && patterns.size > 0) {\n\t\tconst regexes = [...patterns];\n\t\tif (regexes.length === 1) json.pattern = regexes[0].source;\n\t\telse if (regexes.length > 1) json.allOf = [...regexes.map((regex) => ({\n\t\t\t...ctx.target === \"draft-07\" || ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\" ? { type: \"string\" } : {},\n\t\t\tpattern: regex.source\n\t\t}))];\n\t}\n};\nconst numberProcessor = (schema, ctx, _json, _params) => {\n\tconst json = _json;\n\tconst { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;\n\tif (typeof format === \"string\" && format.includes(\"int\")) json.type = \"integer\";\n\telse json.type = \"number\";\n\tif (typeof exclusiveMinimum === \"number\") if (ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\") {\n\t\tjson.minimum = exclusiveMinimum;\n\t\tjson.exclusiveMinimum = true;\n\t} else json.exclusiveMinimum = exclusiveMinimum;\n\tif (typeof minimum === \"number\") {\n\t\tjson.minimum = minimum;\n\t\tif (typeof exclusiveMinimum === \"number\" && ctx.target !== \"draft-04\") if (exclusiveMinimum >= minimum) delete json.minimum;\n\t\telse delete json.exclusiveMinimum;\n\t}\n\tif (typeof exclusiveMaximum === \"number\") if (ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\") {\n\t\tjson.maximum = exclusiveMaximum;\n\t\tjson.exclusiveMaximum = true;\n\t} else json.exclusiveMaximum = exclusiveMaximum;\n\tif (typeof maximum === \"number\") {\n\t\tjson.maximum = maximum;\n\t\tif (typeof exclusiveMaximum === \"number\" && ctx.target !== \"draft-04\") if (exclusiveMaximum <= maximum) delete json.maximum;\n\t\telse delete json.exclusiveMaximum;\n\t}\n\tif (typeof multipleOf === \"number\") json.multipleOf = multipleOf;\n};\nconst booleanProcessor = (_schema, _ctx, json, _params) => {\n\tjson.type = \"boolean\";\n};\nconst neverProcessor = (_schema, _ctx, json, _params) => {\n\tjson.not = {};\n};\nconst unknownProcessor = (_schema, _ctx, _json, _params) => {};\nconst enumProcessor = (schema, _ctx, json, _params) => {\n\tconst def = schema._zod.def;\n\tconst values = getEnumValues(def.entries);\n\tif (values.every((v) => typeof v === \"number\")) json.type = \"number\";\n\tif (values.every((v) => typeof v === \"string\")) json.type = \"string\";\n\tjson.enum = values;\n};\nconst literalProcessor = (schema, ctx, json, _params) => {\n\tconst def = schema._zod.def;\n\tconst vals = [];\n\tfor (const val of def.values) if (val === void 0) {\n\t\tif (ctx.unrepresentable === \"throw\") throw new Error(\"Literal `undefined` cannot be represented in JSON Schema\");\n\t} else if (typeof val === \"bigint\") if (ctx.unrepresentable === \"throw\") throw new Error(\"BigInt literals cannot be represented in JSON Schema\");\n\telse vals.push(Number(val));\n\telse vals.push(val);\n\tif (vals.length === 0) {} else if (vals.length === 1) {\n\t\tconst val = vals[0];\n\t\tjson.type = val === null ? \"null\" : typeof val;\n\t\tif (ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\") json.enum = [val];\n\t\telse json.const = val;\n\t} else {\n\t\tif (vals.every((v) => typeof v === \"number\")) json.type = \"number\";\n\t\tif (vals.every((v) => typeof v === \"string\")) json.type = \"string\";\n\t\tif (vals.every((v) => typeof v === \"boolean\")) json.type = \"boolean\";\n\t\tif (vals.every((v) => v === null)) json.type = \"null\";\n\t\tjson.enum = vals;\n\t}\n};\nconst customProcessor = (_schema, ctx, _json, _params) => {\n\tif (ctx.unrepresentable === \"throw\") throw new Error(\"Custom types cannot be represented in JSON Schema\");\n};\nconst transformProcessor = (_schema, ctx, _json, _params) => {\n\tif (ctx.unrepresentable === \"throw\") throw new Error(\"Transforms cannot be represented in JSON Schema\");\n};\nconst arrayProcessor = (schema, ctx, _json, params) => {\n\tconst json = _json;\n\tconst def = schema._zod.def;\n\tconst { minimum, maximum } = schema._zod.bag;\n\tif (typeof minimum === \"number\") json.minItems = minimum;\n\tif (typeof maximum === \"number\") json.maxItems = maximum;\n\tjson.type = \"array\";\n\tjson.items = process$1(def.element, ctx, {\n\t\t...params,\n\t\tpath: [...params.path, \"items\"]\n\t});\n};\nconst objectProcessor = (schema, ctx, _json, params) => {\n\tconst json = _json;\n\tconst def = schema._zod.def;\n\tjson.type = \"object\";\n\tjson.properties = {};\n\tconst shape = def.shape;\n\tfor (const key in shape) json.properties[key] = process$1(shape[key], ctx, {\n\t\t...params,\n\t\tpath: [\n\t\t\t...params.path,\n\t\t\t\"properties\",\n\t\t\tkey\n\t\t]\n\t});\n\tconst allKeys = new Set(Object.keys(shape));\n\tconst requiredKeys = new Set([...allKeys].filter((key) => {\n\t\tconst v = def.shape[key]._zod;\n\t\tif (ctx.io === \"input\") return v.optin === void 0;\n\t\telse return v.optout === void 0;\n\t}));\n\tif (requiredKeys.size > 0) json.required = Array.from(requiredKeys);\n\tif (def.catchall?._zod.def.type === \"never\") json.additionalProperties = false;\n\telse if (!def.catchall) {\n\t\tif (ctx.io === \"output\") json.additionalProperties = false;\n\t} else if (def.catchall) json.additionalProperties = process$1(def.catchall, ctx, {\n\t\t...params,\n\t\tpath: [...params.path, \"additionalProperties\"]\n\t});\n};\nconst unionProcessor = (schema, ctx, json, params) => {\n\tconst def = schema._zod.def;\n\tconst isExclusive = def.inclusive === false;\n\tconst options = def.options.map((x, i) => process$1(x, ctx, {\n\t\t...params,\n\t\tpath: [\n\t\t\t...params.path,\n\t\t\tisExclusive ? \"oneOf\" : \"anyOf\",\n\t\t\ti\n\t\t]\n\t}));\n\tif (isExclusive) json.oneOf = options;\n\telse json.anyOf = options;\n};\nconst intersectionProcessor = (schema, ctx, json, params) => {\n\tconst def = schema._zod.def;\n\tconst a = process$1(def.left, ctx, {\n\t\t...params,\n\t\tpath: [\n\t\t\t...params.path,\n\t\t\t\"allOf\",\n\t\t\t0\n\t\t]\n\t});\n\tconst b = process$1(def.right, ctx, {\n\t\t...params,\n\t\tpath: [\n\t\t\t...params.path,\n\t\t\t\"allOf\",\n\t\t\t1\n\t\t]\n\t});\n\tconst isSimpleIntersection = (val) => \"allOf\" in val && Object.keys(val).length === 1;\n\tjson.allOf = [...isSimpleIntersection(a) ? a.allOf : [a], ...isSimpleIntersection(b) ? b.allOf : [b]];\n};\nconst recordProcessor = (schema, ctx, _json, params) => {\n\tconst json = _json;\n\tconst def = schema._zod.def;\n\tjson.type = \"object\";\n\tconst keyType = def.keyType;\n\tconst patterns = keyType._zod.bag?.patterns;\n\tif (def.mode === \"loose\" && patterns && patterns.size > 0) {\n\t\tconst valueSchema = process$1(def.valueType, ctx, {\n\t\t\t...params,\n\t\t\tpath: [\n\t\t\t\t...params.path,\n\t\t\t\t\"patternProperties\",\n\t\t\t\t\"*\"\n\t\t\t]\n\t\t});\n\t\tjson.patternProperties = {};\n\t\tfor (const pattern of patterns) json.patternProperties[pattern.source] = valueSchema;\n\t} else {\n\t\tif (ctx.target === \"draft-07\" || ctx.target === \"draft-2020-12\") json.propertyNames = process$1(def.keyType, ctx, {\n\t\t\t...params,\n\t\t\tpath: [...params.path, \"propertyNames\"]\n\t\t});\n\t\tjson.additionalProperties = process$1(def.valueType, ctx, {\n\t\t\t...params,\n\t\t\tpath: [...params.path, \"additionalProperties\"]\n\t\t});\n\t}\n\tconst keyValues = keyType._zod.values;\n\tif (keyValues) {\n\t\tconst validKeyValues = [...keyValues].filter((v) => typeof v === \"string\" || typeof v === \"number\");\n\t\tif (validKeyValues.length > 0) json.required = validKeyValues;\n\t}\n};\nconst nullableProcessor = (schema, ctx, json, params) => {\n\tconst def = schema._zod.def;\n\tconst inner = process$1(def.innerType, ctx, params);\n\tconst seen = ctx.seen.get(schema);\n\tif (ctx.target === \"openapi-3.0\") {\n\t\tseen.ref = def.innerType;\n\t\tjson.nullable = true;\n\t} else json.anyOf = [inner, { type: \"null\" }];\n};\nconst nonoptionalProcessor = (schema, ctx, _json, params) => {\n\tconst def = schema._zod.def;\n\tprocess$1(def.innerType, ctx, params);\n\tconst seen = ctx.seen.get(schema);\n\tseen.ref = def.innerType;\n};\nconst defaultProcessor = (schema, ctx, json, params) => {\n\tconst def = schema._zod.def;\n\tprocess$1(def.innerType, ctx, params);\n\tconst seen = ctx.seen.get(schema);\n\tseen.ref = def.innerType;\n\tjson.default = JSON.parse(JSON.stringify(def.defaultValue));\n};\nconst prefaultProcessor = (schema, ctx, json, params) => {\n\tconst def = schema._zod.def;\n\tprocess$1(def.innerType, ctx, params);\n\tconst seen = ctx.seen.get(schema);\n\tseen.ref = def.innerType;\n\tif (ctx.io === \"input\") json._prefault = JSON.parse(JSON.stringify(def.defaultValue));\n};\nconst catchProcessor = (schema, ctx, json, params) => {\n\tconst def = schema._zod.def;\n\tprocess$1(def.innerType, ctx, params);\n\tconst seen = ctx.seen.get(schema);\n\tseen.ref = def.innerType;\n\tlet catchValue;\n\ttry {\n\t\tcatchValue = def.catchValue(void 0);\n\t} catch {\n\t\tthrow new Error(\"Dynamic catch values are not supported in JSON Schema\");\n\t}\n\tjson.default = catchValue;\n};\nconst pipeProcessor = (schema, ctx, _json, params) => {\n\tconst def = schema._zod.def;\n\tconst innerType = ctx.io === \"input\" ? def.in._zod.def.type === \"transform\" ? def.out : def.in : def.out;\n\tprocess$1(innerType, ctx, params);\n\tconst seen = ctx.seen.get(schema);\n\tseen.ref = innerType;\n};\nconst readonlyProcessor = (schema, ctx, json, params) => {\n\tconst def = schema._zod.def;\n\tprocess$1(def.innerType, ctx, params);\n\tconst seen = ctx.seen.get(schema);\n\tseen.ref = def.innerType;\n\tjson.readOnly = true;\n};\nconst optionalProcessor = (schema, ctx, _json, params) => {\n\tconst def = schema._zod.def;\n\tprocess$1(def.innerType, ctx, params);\n\tconst seen = ctx.seen.get(schema);\n\tseen.ref = def.innerType;\n};\n//#endregion\n//#region ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/iso.js\nconst ZodISODateTime = /* @__PURE__ */ $constructor(\"ZodISODateTime\", (inst, def) => {\n\t$ZodISODateTime.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nfunction datetime(params) {\n\treturn /* @__PURE__ */ _isoDateTime(ZodISODateTime, params);\n}\nconst ZodISODate = /* @__PURE__ */ $constructor(\"ZodISODate\", (inst, def) => {\n\t$ZodISODate.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nfunction date(params) {\n\treturn /* @__PURE__ */ _isoDate(ZodISODate, params);\n}\nconst ZodISOTime = /* @__PURE__ */ $constructor(\"ZodISOTime\", (inst, def) => {\n\t$ZodISOTime.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nfunction time(params) {\n\treturn /* @__PURE__ */ _isoTime(ZodISOTime, params);\n}\nconst ZodISODuration = /* @__PURE__ */ $constructor(\"ZodISODuration\", (inst, def) => {\n\t$ZodISODuration.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nfunction duration(params) {\n\treturn /* @__PURE__ */ _isoDuration(ZodISODuration, params);\n}\n//#endregion\n//#region ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/errors.js\nconst initializer = (inst, issues) => {\n\t$ZodError.init(inst, issues);\n\tinst.name = \"ZodError\";\n\tObject.defineProperties(inst, {\n\t\tformat: { value: (mapper) => formatError(inst, mapper) },\n\t\tflatten: { value: (mapper) => flattenError(inst, mapper) },\n\t\taddIssue: { value: (issue) => {\n\t\t\tinst.issues.push(issue);\n\t\t\tinst.message = JSON.stringify(inst.issues, jsonStringifyReplacer, 2);\n\t\t} },\n\t\taddIssues: { value: (issues) => {\n\t\t\tinst.issues.push(...issues);\n\t\t\tinst.message = JSON.stringify(inst.issues, jsonStringifyReplacer, 2);\n\t\t} },\n\t\tisEmpty: { get() {\n\t\t\treturn inst.issues.length === 0;\n\t\t} }\n\t});\n};\n$constructor(\"ZodError\", initializer);\nconst ZodRealError = $constructor(\"ZodError\", initializer, { Parent: Error });\n//#endregion\n//#region ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/parse.js\nconst parse = /* @__PURE__ */ _parse(ZodRealError);\nconst parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError);\nconst safeParse = /* @__PURE__ */ _safeParse(ZodRealError);\nconst safeParseAsync = /* @__PURE__ */ _safeParseAsync(ZodRealError);\nconst encode = /* @__PURE__ */ _encode(ZodRealError);\nconst decode = /* @__PURE__ */ _decode(ZodRealError);\nconst encodeAsync = /* @__PURE__ */ _encodeAsync(ZodRealError);\nconst decodeAsync = /* @__PURE__ */ _decodeAsync(ZodRealError);\nconst safeEncode = /* @__PURE__ */ _safeEncode(ZodRealError);\nconst safeDecode = /* @__PURE__ */ _safeDecode(ZodRealError);\nconst safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);\nconst safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);\n//#endregion\n//#region ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/schemas.js\nconst ZodType = /* @__PURE__ */ $constructor(\"ZodType\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tObject.assign(inst[\"~standard\"], { jsonSchema: {\n\t\tinput: createStandardJSONSchemaMethod(inst, \"input\"),\n\t\toutput: createStandardJSONSchemaMethod(inst, \"output\")\n\t} });\n\tinst.toJSONSchema = createToJSONSchemaMethod(inst, {});\n\tinst.def = def;\n\tinst.type = def.type;\n\tObject.defineProperty(inst, \"_def\", { value: def });\n\tinst.check = (...checks) => {\n\t\treturn inst.clone(mergeDefs(def, { checks: [...def.checks ?? [], ...checks.map((ch) => typeof ch === \"function\" ? { _zod: {\n\t\t\tcheck: ch,\n\t\t\tdef: { check: \"custom\" },\n\t\t\tonattach: []\n\t\t} } : ch)] }), { parent: true });\n\t};\n\tinst.with = inst.check;\n\tinst.clone = (def, params) => clone(inst, def, params);\n\tinst.brand = () => inst;\n\tinst.register = ((reg, meta) => {\n\t\treg.add(inst, meta);\n\t\treturn inst;\n\t});\n\tinst.parse = (data, params) => parse(inst, data, params, { callee: inst.parse });\n\tinst.safeParse = (data, params) => safeParse(inst, data, params);\n\tinst.parseAsync = async (data, params) => parseAsync(inst, data, params, { callee: inst.parseAsync });\n\tinst.safeParseAsync = async (data, params) => safeParseAsync(inst, data, params);\n\tinst.spa = inst.safeParseAsync;\n\tinst.encode = (data, params) => encode(inst, data, params);\n\tinst.decode = (data, params) => decode(inst, data, params);\n\tinst.encodeAsync = async (data, params) => encodeAsync(inst, data, params);\n\tinst.decodeAsync = async (data, params) => decodeAsync(inst, data, params);\n\tinst.safeEncode = (data, params) => safeEncode(inst, data, params);\n\tinst.safeDecode = (data, params) => safeDecode(inst, data, params);\n\tinst.safeEncodeAsync = async (data, params) => safeEncodeAsync(inst, data, params);\n\tinst.safeDecodeAsync = async (data, params) => safeDecodeAsync(inst, data, params);\n\tinst.refine = (check, params) => inst.check(refine(check, params));\n\tinst.superRefine = (refinement) => inst.check(superRefine(refinement));\n\tinst.overwrite = (fn) => inst.check(/* @__PURE__ */ _overwrite(fn));\n\tinst.optional = () => optional(inst);\n\tinst.exactOptional = () => exactOptional(inst);\n\tinst.nullable = () => nullable(inst);\n\tinst.nullish = () => optional(nullable(inst));\n\tinst.nonoptional = (params) => nonoptional(inst, params);\n\tinst.array = () => array(inst);\n\tinst.or = (arg) => union([inst, arg]);\n\tinst.and = (arg) => intersection(inst, arg);\n\tinst.transform = (tx) => pipe(inst, transform(tx));\n\tinst.default = (def) => _default(inst, def);\n\tinst.prefault = (def) => prefault(inst, def);\n\tinst.catch = (params) => _catch(inst, params);\n\tinst.pipe = (target) => pipe(inst, target);\n\tinst.readonly = () => readonly(inst);\n\tinst.describe = (description) => {\n\t\tconst cl = inst.clone();\n\t\tglobalRegistry.add(cl, { description });\n\t\treturn cl;\n\t};\n\tObject.defineProperty(inst, \"description\", {\n\t\tget() {\n\t\t\treturn globalRegistry.get(inst)?.description;\n\t\t},\n\t\tconfigurable: true\n\t});\n\tinst.meta = (...args) => {\n\t\tif (args.length === 0) return globalRegistry.get(inst);\n\t\tconst cl = inst.clone();\n\t\tglobalRegistry.add(cl, args[0]);\n\t\treturn cl;\n\t};\n\tinst.isOptional = () => inst.safeParse(void 0).success;\n\tinst.isNullable = () => inst.safeParse(null).success;\n\tinst.apply = (fn) => fn(inst);\n\treturn inst;\n});\n/** @internal */\nconst _ZodString = /* @__PURE__ */ $constructor(\"_ZodString\", (inst, def) => {\n\t$ZodString.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => stringProcessor(inst, ctx, json, params);\n\tconst bag = inst._zod.bag;\n\tinst.format = bag.format ?? null;\n\tinst.minLength = bag.minimum ?? null;\n\tinst.maxLength = bag.maximum ?? null;\n\tinst.regex = (...args) => inst.check(/* @__PURE__ */ _regex(...args));\n\tinst.includes = (...args) => inst.check(/* @__PURE__ */ _includes(...args));\n\tinst.startsWith = (...args) => inst.check(/* @__PURE__ */ _startsWith(...args));\n\tinst.endsWith = (...args) => inst.check(/* @__PURE__ */ _endsWith(...args));\n\tinst.min = (...args) => inst.check(/* @__PURE__ */ _minLength(...args));\n\tinst.max = (...args) => inst.check(/* @__PURE__ */ _maxLength(...args));\n\tinst.length = (...args) => inst.check(/* @__PURE__ */ _length(...args));\n\tinst.nonempty = (...args) => inst.check(/* @__PURE__ */ _minLength(1, ...args));\n\tinst.lowercase = (params) => inst.check(/* @__PURE__ */ _lowercase(params));\n\tinst.uppercase = (params) => inst.check(/* @__PURE__ */ _uppercase(params));\n\tinst.trim = () => inst.check(/* @__PURE__ */ _trim());\n\tinst.normalize = (...args) => inst.check(/* @__PURE__ */ _normalize(...args));\n\tinst.toLowerCase = () => inst.check(/* @__PURE__ */ _toLowerCase());\n\tinst.toUpperCase = () => inst.check(/* @__PURE__ */ _toUpperCase());\n\tinst.slugify = () => inst.check(/* @__PURE__ */ _slugify());\n});\nconst ZodString = /* @__PURE__ */ $constructor(\"ZodString\", (inst, def) => {\n\t$ZodString.init(inst, def);\n\t_ZodString.init(inst, def);\n\tinst.email = (params) => inst.check(/* @__PURE__ */ _email(ZodEmail, params));\n\tinst.url = (params) => inst.check(/* @__PURE__ */ _url(ZodURL, params));\n\tinst.jwt = (params) => inst.check(/* @__PURE__ */ _jwt(ZodJWT, params));\n\tinst.emoji = (params) => inst.check(/* @__PURE__ */ _emoji(ZodEmoji, params));\n\tinst.guid = (params) => inst.check(/* @__PURE__ */ _guid(ZodGUID, params));\n\tinst.uuid = (params) => inst.check(/* @__PURE__ */ _uuid(ZodUUID, params));\n\tinst.uuidv4 = (params) => inst.check(/* @__PURE__ */ _uuidv4(ZodUUID, params));\n\tinst.uuidv6 = (params) => inst.check(/* @__PURE__ */ _uuidv6(ZodUUID, params));\n\tinst.uuidv7 = (params) => inst.check(/* @__PURE__ */ _uuidv7(ZodUUID, params));\n\tinst.nanoid = (params) => inst.check(/* @__PURE__ */ _nanoid(ZodNanoID, params));\n\tinst.guid = (params) => inst.check(/* @__PURE__ */ _guid(ZodGUID, params));\n\tinst.cuid = (params) => inst.check(/* @__PURE__ */ _cuid(ZodCUID, params));\n\tinst.cuid2 = (params) => inst.check(/* @__PURE__ */ _cuid2(ZodCUID2, params));\n\tinst.ulid = (params) => inst.check(/* @__PURE__ */ _ulid(ZodULID, params));\n\tinst.base64 = (params) => inst.check(/* @__PURE__ */ _base64(ZodBase64, params));\n\tinst.base64url = (params) => inst.check(/* @__PURE__ */ _base64url(ZodBase64URL, params));\n\tinst.xid = (params) => inst.check(/* @__PURE__ */ _xid(ZodXID, params));\n\tinst.ksuid = (params) => inst.check(/* @__PURE__ */ _ksuid(ZodKSUID, params));\n\tinst.ipv4 = (params) => inst.check(/* @__PURE__ */ _ipv4(ZodIPv4, params));\n\tinst.ipv6 = (params) => inst.check(/* @__PURE__ */ _ipv6(ZodIPv6, params));\n\tinst.cidrv4 = (params) => inst.check(/* @__PURE__ */ _cidrv4(ZodCIDRv4, params));\n\tinst.cidrv6 = (params) => inst.check(/* @__PURE__ */ _cidrv6(ZodCIDRv6, params));\n\tinst.e164 = (params) => inst.check(/* @__PURE__ */ _e164(ZodE164, params));\n\tinst.datetime = (params) => inst.check(datetime(params));\n\tinst.date = (params) => inst.check(date(params));\n\tinst.time = (params) => inst.check(time(params));\n\tinst.duration = (params) => inst.check(duration(params));\n});\nfunction string(params) {\n\treturn /* @__PURE__ */ _string(ZodString, params);\n}\nconst ZodStringFormat = /* @__PURE__ */ $constructor(\"ZodStringFormat\", (inst, def) => {\n\t$ZodStringFormat.init(inst, def);\n\t_ZodString.init(inst, def);\n});\nconst ZodEmail = /* @__PURE__ */ $constructor(\"ZodEmail\", (inst, def) => {\n\t$ZodEmail.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nconst ZodGUID = /* @__PURE__ */ $constructor(\"ZodGUID\", (inst, def) => {\n\t$ZodGUID.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nconst ZodUUID = /* @__PURE__ */ $constructor(\"ZodUUID\", (inst, def) => {\n\t$ZodUUID.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nconst ZodURL = /* @__PURE__ */ $constructor(\"ZodURL\", (inst, def) => {\n\t$ZodURL.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nconst ZodEmoji = /* @__PURE__ */ $constructor(\"ZodEmoji\", (inst, def) => {\n\t$ZodEmoji.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nconst ZodNanoID = /* @__PURE__ */ $constructor(\"ZodNanoID\", (inst, def) => {\n\t$ZodNanoID.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nconst ZodCUID = /* @__PURE__ */ $constructor(\"ZodCUID\", (inst, def) => {\n\t$ZodCUID.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nconst ZodCUID2 = /* @__PURE__ */ $constructor(\"ZodCUID2\", (inst, def) => {\n\t$ZodCUID2.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nconst ZodULID = /* @__PURE__ */ $constructor(\"ZodULID\", (inst, def) => {\n\t$ZodULID.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nconst ZodXID = /* @__PURE__ */ $constructor(\"ZodXID\", (inst, def) => {\n\t$ZodXID.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nconst ZodKSUID = /* @__PURE__ */ $constructor(\"ZodKSUID\", (inst, def) => {\n\t$ZodKSUID.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nconst ZodIPv4 = /* @__PURE__ */ $constructor(\"ZodIPv4\", (inst, def) => {\n\t$ZodIPv4.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nconst ZodIPv6 = /* @__PURE__ */ $constructor(\"ZodIPv6\", (inst, def) => {\n\t$ZodIPv6.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nconst ZodCIDRv4 = /* @__PURE__ */ $constructor(\"ZodCIDRv4\", (inst, def) => {\n\t$ZodCIDRv4.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nconst ZodCIDRv6 = /* @__PURE__ */ $constructor(\"ZodCIDRv6\", (inst, def) => {\n\t$ZodCIDRv6.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nconst ZodBase64 = /* @__PURE__ */ $constructor(\"ZodBase64\", (inst, def) => {\n\t$ZodBase64.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nconst ZodBase64URL = /* @__PURE__ */ $constructor(\"ZodBase64URL\", (inst, def) => {\n\t$ZodBase64URL.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nconst ZodE164 = /* @__PURE__ */ $constructor(\"ZodE164\", (inst, def) => {\n\t$ZodE164.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nconst ZodJWT = /* @__PURE__ */ $constructor(\"ZodJWT\", (inst, def) => {\n\t$ZodJWT.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nconst ZodNumber = /* @__PURE__ */ $constructor(\"ZodNumber\", (inst, def) => {\n\t$ZodNumber.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => numberProcessor(inst, ctx, json, params);\n\tinst.gt = (value, params) => inst.check(/* @__PURE__ */ _gt(value, params));\n\tinst.gte = (value, params) => inst.check(/* @__PURE__ */ _gte(value, params));\n\tinst.min = (value, params) => inst.check(/* @__PURE__ */ _gte(value, params));\n\tinst.lt = (value, params) => inst.check(/* @__PURE__ */ _lt(value, params));\n\tinst.lte = (value, params) => inst.check(/* @__PURE__ */ _lte(value, params));\n\tinst.max = (value, params) => inst.check(/* @__PURE__ */ _lte(value, params));\n\tinst.int = (params) => inst.check(int(params));\n\tinst.safe = (params) => inst.check(int(params));\n\tinst.positive = (params) => inst.check(/* @__PURE__ */ _gt(0, params));\n\tinst.nonnegative = (params) => inst.check(/* @__PURE__ */ _gte(0, params));\n\tinst.negative = (params) => inst.check(/* @__PURE__ */ _lt(0, params));\n\tinst.nonpositive = (params) => inst.check(/* @__PURE__ */ _lte(0, params));\n\tinst.multipleOf = (value, params) => inst.check(/* @__PURE__ */ _multipleOf(value, params));\n\tinst.step = (value, params) => inst.check(/* @__PURE__ */ _multipleOf(value, params));\n\tinst.finite = () => inst;\n\tconst bag = inst._zod.bag;\n\tinst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;\n\tinst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;\n\tinst.isInt = (bag.format ?? \"\").includes(\"int\") || Number.isSafeInteger(bag.multipleOf ?? .5);\n\tinst.isFinite = true;\n\tinst.format = bag.format ?? null;\n});\nfunction number(params) {\n\treturn /* @__PURE__ */ _number(ZodNumber, params);\n}\nconst ZodNumberFormat = /* @__PURE__ */ $constructor(\"ZodNumberFormat\", (inst, def) => {\n\t$ZodNumberFormat.init(inst, def);\n\tZodNumber.init(inst, def);\n});\nfunction int(params) {\n\treturn /* @__PURE__ */ _int(ZodNumberFormat, params);\n}\nconst ZodBoolean = /* @__PURE__ */ $constructor(\"ZodBoolean\", (inst, def) => {\n\t$ZodBoolean.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => booleanProcessor(inst, ctx, json, params);\n});\nfunction boolean(params) {\n\treturn /* @__PURE__ */ _boolean(ZodBoolean, params);\n}\nconst ZodUnknown = /* @__PURE__ */ $constructor(\"ZodUnknown\", (inst, def) => {\n\t$ZodUnknown.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => unknownProcessor(inst, ctx, json, params);\n});\nfunction unknown() {\n\treturn /* @__PURE__ */ _unknown(ZodUnknown);\n}\nconst ZodNever = /* @__PURE__ */ $constructor(\"ZodNever\", (inst, def) => {\n\t$ZodNever.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => neverProcessor(inst, ctx, json, params);\n});\nfunction never(params) {\n\treturn /* @__PURE__ */ _never(ZodNever, params);\n}\nconst ZodArray = /* @__PURE__ */ $constructor(\"ZodArray\", (inst, def) => {\n\t$ZodArray.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => arrayProcessor(inst, ctx, json, params);\n\tinst.element = def.element;\n\tinst.min = (minLength, params) => inst.check(/* @__PURE__ */ _minLength(minLength, params));\n\tinst.nonempty = (params) => inst.check(/* @__PURE__ */ _minLength(1, params));\n\tinst.max = (maxLength, params) => inst.check(/* @__PURE__ */ _maxLength(maxLength, params));\n\tinst.length = (len, params) => inst.check(/* @__PURE__ */ _length(len, params));\n\tinst.unwrap = () => inst.element;\n});\nfunction array(element, params) {\n\treturn /* @__PURE__ */ _array(ZodArray, element, params);\n}\nconst ZodObject = /* @__PURE__ */ $constructor(\"ZodObject\", (inst, def) => {\n\t$ZodObjectJIT.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => objectProcessor(inst, ctx, json, params);\n\tdefineLazy(inst, \"shape\", () => {\n\t\treturn def.shape;\n\t});\n\tinst.keyof = () => _enum(Object.keys(inst._zod.def.shape));\n\tinst.catchall = (catchall) => inst.clone({\n\t\t...inst._zod.def,\n\t\tcatchall\n\t});\n\tinst.passthrough = () => inst.clone({\n\t\t...inst._zod.def,\n\t\tcatchall: unknown()\n\t});\n\tinst.loose = () => inst.clone({\n\t\t...inst._zod.def,\n\t\tcatchall: unknown()\n\t});\n\tinst.strict = () => inst.clone({\n\t\t...inst._zod.def,\n\t\tcatchall: never()\n\t});\n\tinst.strip = () => inst.clone({\n\t\t...inst._zod.def,\n\t\tcatchall: void 0\n\t});\n\tinst.extend = (incoming) => {\n\t\treturn extend(inst, incoming);\n\t};\n\tinst.safeExtend = (incoming) => {\n\t\treturn safeExtend(inst, incoming);\n\t};\n\tinst.merge = (other) => merge(inst, other);\n\tinst.pick = (mask) => pick(inst, mask);\n\tinst.omit = (mask) => omit(inst, mask);\n\tinst.partial = (...args) => partial(ZodOptional, inst, args[0]);\n\tinst.required = (...args) => required(ZodNonOptional, inst, args[0]);\n});\nfunction object(shape, params) {\n\treturn new ZodObject({\n\t\ttype: \"object\",\n\t\tshape: shape ?? {},\n\t\t...normalizeParams(params)\n\t});\n}\nconst ZodUnion = /* @__PURE__ */ $constructor(\"ZodUnion\", (inst, def) => {\n\t$ZodUnion.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => unionProcessor(inst, ctx, json, params);\n\tinst.options = def.options;\n});\nfunction union(options, params) {\n\treturn new ZodUnion({\n\t\ttype: \"union\",\n\t\toptions,\n\t\t...normalizeParams(params)\n\t});\n}\nconst ZodDiscriminatedUnion = /* @__PURE__ */ $constructor(\"ZodDiscriminatedUnion\", (inst, def) => {\n\tZodUnion.init(inst, def);\n\t$ZodDiscriminatedUnion.init(inst, def);\n});\nfunction discriminatedUnion(discriminator, options, params) {\n\treturn new ZodDiscriminatedUnion({\n\t\ttype: \"union\",\n\t\toptions,\n\t\tdiscriminator,\n\t\t...normalizeParams(params)\n\t});\n}\nconst ZodIntersection = /* @__PURE__ */ $constructor(\"ZodIntersection\", (inst, def) => {\n\t$ZodIntersection.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => intersectionProcessor(inst, ctx, json, params);\n});\nfunction intersection(left, right) {\n\treturn new ZodIntersection({\n\t\ttype: \"intersection\",\n\t\tleft,\n\t\tright\n\t});\n}\nconst ZodRecord = /* @__PURE__ */ $constructor(\"ZodRecord\", (inst, def) => {\n\t$ZodRecord.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => recordProcessor(inst, ctx, json, params);\n\tinst.keyType = def.keyType;\n\tinst.valueType = def.valueType;\n});\nfunction record(keyType, valueType, params) {\n\treturn new ZodRecord({\n\t\ttype: \"record\",\n\t\tkeyType,\n\t\tvalueType,\n\t\t...normalizeParams(params)\n\t});\n}\nconst ZodEnum = /* @__PURE__ */ $constructor(\"ZodEnum\", (inst, def) => {\n\t$ZodEnum.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => enumProcessor(inst, ctx, json, params);\n\tinst.enum = def.entries;\n\tinst.options = Object.values(def.entries);\n\tconst keys = new Set(Object.keys(def.entries));\n\tinst.extract = (values, params) => {\n\t\tconst newEntries = {};\n\t\tfor (const value of values) if (keys.has(value)) newEntries[value] = def.entries[value];\n\t\telse throw new Error(`Key ${value} not found in enum`);\n\t\treturn new ZodEnum({\n\t\t\t...def,\n\t\t\tchecks: [],\n\t\t\t...normalizeParams(params),\n\t\t\tentries: newEntries\n\t\t});\n\t};\n\tinst.exclude = (values, params) => {\n\t\tconst newEntries = { ...def.entries };\n\t\tfor (const value of values) if (keys.has(value)) delete newEntries[value];\n\t\telse throw new Error(`Key ${value} not found in enum`);\n\t\treturn new ZodEnum({\n\t\t\t...def,\n\t\t\tchecks: [],\n\t\t\t...normalizeParams(params),\n\t\t\tentries: newEntries\n\t\t});\n\t};\n});\nfunction _enum(values, params) {\n\treturn new ZodEnum({\n\t\ttype: \"enum\",\n\t\tentries: Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values,\n\t\t...normalizeParams(params)\n\t});\n}\nconst ZodLiteral = /* @__PURE__ */ $constructor(\"ZodLiteral\", (inst, def) => {\n\t$ZodLiteral.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => literalProcessor(inst, ctx, json, params);\n\tinst.values = new Set(def.values);\n\tObject.defineProperty(inst, \"value\", { get() {\n\t\tif (def.values.length > 1) throw new Error(\"This schema contains multiple valid literal values. Use `.values` instead.\");\n\t\treturn def.values[0];\n\t} });\n});\nfunction literal(value, params) {\n\treturn new ZodLiteral({\n\t\ttype: \"literal\",\n\t\tvalues: Array.isArray(value) ? value : [value],\n\t\t...normalizeParams(params)\n\t});\n}\nconst ZodTransform = /* @__PURE__ */ $constructor(\"ZodTransform\", (inst, def) => {\n\t$ZodTransform.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => transformProcessor(inst, ctx, json, params);\n\tinst._zod.parse = (payload, _ctx) => {\n\t\tif (_ctx.direction === \"backward\") throw new $ZodEncodeError(inst.constructor.name);\n\t\tpayload.addIssue = (issue$1) => {\n\t\t\tif (typeof issue$1 === \"string\") payload.issues.push(issue(issue$1, payload.value, def));\n\t\t\telse {\n\t\t\t\tconst _issue = issue$1;\n\t\t\t\tif (_issue.fatal) _issue.continue = false;\n\t\t\t\t_issue.code ?? (_issue.code = \"custom\");\n\t\t\t\t_issue.input ?? (_issue.input = payload.value);\n\t\t\t\t_issue.inst ?? (_issue.inst = inst);\n\t\t\t\tpayload.issues.push(issue(_issue));\n\t\t\t}\n\t\t};\n\t\tconst output = def.transform(payload.value, payload);\n\t\tif (output instanceof Promise) return output.then((output) => {\n\t\t\tpayload.value = output;\n\t\t\treturn payload;\n\t\t});\n\t\tpayload.value = output;\n\t\treturn payload;\n\t};\n});\nfunction transform(fn) {\n\treturn new ZodTransform({\n\t\ttype: \"transform\",\n\t\ttransform: fn\n\t});\n}\nconst ZodOptional = /* @__PURE__ */ $constructor(\"ZodOptional\", (inst, def) => {\n\t$ZodOptional.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => optionalProcessor(inst, ctx, json, params);\n\tinst.unwrap = () => inst._zod.def.innerType;\n});\nfunction optional(innerType) {\n\treturn new ZodOptional({\n\t\ttype: \"optional\",\n\t\tinnerType\n\t});\n}\nconst ZodExactOptional = /* @__PURE__ */ $constructor(\"ZodExactOptional\", (inst, def) => {\n\t$ZodExactOptional.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => optionalProcessor(inst, ctx, json, params);\n\tinst.unwrap = () => inst._zod.def.innerType;\n});\nfunction exactOptional(innerType) {\n\treturn new ZodExactOptional({\n\t\ttype: \"optional\",\n\t\tinnerType\n\t});\n}\nconst ZodNullable = /* @__PURE__ */ $constructor(\"ZodNullable\", (inst, def) => {\n\t$ZodNullable.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => nullableProcessor(inst, ctx, json, params);\n\tinst.unwrap = () => inst._zod.def.innerType;\n});\nfunction nullable(innerType) {\n\treturn new ZodNullable({\n\t\ttype: \"nullable\",\n\t\tinnerType\n\t});\n}\nconst ZodDefault = /* @__PURE__ */ $constructor(\"ZodDefault\", (inst, def) => {\n\t$ZodDefault.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => defaultProcessor(inst, ctx, json, params);\n\tinst.unwrap = () => inst._zod.def.innerType;\n\tinst.removeDefault = inst.unwrap;\n});\nfunction _default(innerType, defaultValue) {\n\treturn new ZodDefault({\n\t\ttype: \"default\",\n\t\tinnerType,\n\t\tget defaultValue() {\n\t\t\treturn typeof defaultValue === \"function\" ? defaultValue() : shallowClone(defaultValue);\n\t\t}\n\t});\n}\nconst ZodPrefault = /* @__PURE__ */ $constructor(\"ZodPrefault\", (inst, def) => {\n\t$ZodPrefault.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => prefaultProcessor(inst, ctx, json, params);\n\tinst.unwrap = () => inst._zod.def.innerType;\n});\nfunction prefault(innerType, defaultValue) {\n\treturn new ZodPrefault({\n\t\ttype: \"prefault\",\n\t\tinnerType,\n\t\tget defaultValue() {\n\t\t\treturn typeof defaultValue === \"function\" ? defaultValue() : shallowClone(defaultValue);\n\t\t}\n\t});\n}\nconst ZodNonOptional = /* @__PURE__ */ $constructor(\"ZodNonOptional\", (inst, def) => {\n\t$ZodNonOptional.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => nonoptionalProcessor(inst, ctx, json, params);\n\tinst.unwrap = () => inst._zod.def.innerType;\n});\nfunction nonoptional(innerType, params) {\n\treturn new ZodNonOptional({\n\t\ttype: \"nonoptional\",\n\t\tinnerType,\n\t\t...normalizeParams(params)\n\t});\n}\nconst ZodCatch = /* @__PURE__ */ $constructor(\"ZodCatch\", (inst, def) => {\n\t$ZodCatch.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => catchProcessor(inst, ctx, json, params);\n\tinst.unwrap = () => inst._zod.def.innerType;\n\tinst.removeCatch = inst.unwrap;\n});\nfunction _catch(innerType, catchValue) {\n\treturn new ZodCatch({\n\t\ttype: \"catch\",\n\t\tinnerType,\n\t\tcatchValue: typeof catchValue === \"function\" ? catchValue : () => catchValue\n\t});\n}\nconst ZodPipe = /* @__PURE__ */ $constructor(\"ZodPipe\", (inst, def) => {\n\t$ZodPipe.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => pipeProcessor(inst, ctx, json, params);\n\tinst.in = def.in;\n\tinst.out = def.out;\n});\nfunction pipe(in_, out) {\n\treturn new ZodPipe({\n\t\ttype: \"pipe\",\n\t\tin: in_,\n\t\tout\n\t});\n}\nconst ZodReadonly = /* @__PURE__ */ $constructor(\"ZodReadonly\", (inst, def) => {\n\t$ZodReadonly.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => readonlyProcessor(inst, ctx, json, params);\n\tinst.unwrap = () => inst._zod.def.innerType;\n});\nfunction readonly(innerType) {\n\treturn new ZodReadonly({\n\t\ttype: \"readonly\",\n\t\tinnerType\n\t});\n}\nconst ZodCustom = /* @__PURE__ */ $constructor(\"ZodCustom\", (inst, def) => {\n\t$ZodCustom.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => customProcessor(inst, ctx, json, params);\n});\nfunction refine(fn, _params = {}) {\n\treturn /* @__PURE__ */ _refine(ZodCustom, fn, _params);\n}\nfunction superRefine(fn) {\n\treturn /* @__PURE__ */ _superRefine(fn);\n}\n//#endregion\n//#region ../internals-schemas/dist/index.js\nconst REGISTRY_URL = process.env.TANK_REGISTRY_URL || \"https://www.tankpkg.dev\";\nconst MANIFEST_FILENAME = \"tank.json\";\nconst LEGACY_MANIFEST_FILENAME = \"skills.json\";\nconst LOCKFILE_FILENAME = \"tank.lock\";\nconst supportLevelSchema = _enum([\n\t\"full\",\n\t\"degraded\",\n\t\"none\"\n]);\nconst adapterCapabilitiesSchema = object({\n\tinstruction: supportLevelSchema,\n\thook: supportLevelSchema,\n\ttool: supportLevelSchema,\n\tagent: supportLevelSchema,\n\trule: supportLevelSchema,\n\tresource: supportLevelSchema,\n\tprompt: supportLevelSchema\n}).strict();\nconst compilationWarningSchema = object({\n\tlevel: _enum([\"degraded\", \"skipped\"]),\n\tatomKind: string(),\n\tmessage: string()\n}).strict();\nobject({\n\tfiles: array(object({\n\t\tpath: string().min(1),\n\t\tcontent: string()\n\t}).strict()),\n\twarnings: array(compilationWarningSchema)\n}).strict();\nobject({\n\tname: string().min(1, \"Adapter name must not be empty\"),\n\tsupportedRange: string().min(1, \"Supported range must not be empty\"),\n\tcapabilities: adapterCapabilitiesSchema\n}).strict();\n_enum([\n\t\"instruction\",\n\t\"hook\",\n\t\"tool\",\n\t\"agent\",\n\t\"rule\",\n\t\"resource\",\n\t\"prompt\"\n]);\nconst extensionBagSchema = record(string(), unknown()).optional();\nconst modelTierSchema = _enum([\n\t\"fast\",\n\t\"balanced\",\n\t\"powerful\",\n\t\"custom\"\n]);\nmodelTierSchema.options;\nconst canonicalToolNameSchema = _enum([\n\t\"bash\",\n\t\"read\",\n\t\"write\",\n\t\"edit\",\n\t\"grep\",\n\t\"glob\",\n\t\"lsp\",\n\t\"mcp\",\n\t\"browser\",\n\t\"fetch\",\n\t\"git\",\n\t\"task\",\n\t\"notebook\"\n]);\ncanonicalToolNameSchema.options;\nconst agentIRSchema = object({\n\tkind: literal(\"agent\"),\n\tname: string().min(1, \"Agent name must not be empty\"),\n\trole: string().min(1, \"Agent role must not be empty\"),\n\ttools: array(canonicalToolNameSchema.or(string().min(1))).optional(),\n\tmodel: modelTierSchema.or(string().min(1)).optional(),\n\treadonly: boolean().optional(),\n\textensions: extensionBagSchema\n}).strict();\nconst hookEventSchema = _enum([\n\t\"pre-tool-use\",\n\t\"post-tool-use\",\n\t\"pre-file-read\",\n\t\"post-file-read\",\n\t\"pre-file-write\",\n\t\"post-file-write\",\n\t\"file-edited\",\n\t\"file-watcher-updated\",\n\t\"pre-command\",\n\t\"post-command\",\n\t\"pre-mcp-tool-use\",\n\t\"post-mcp-tool-use\",\n\t\"session-created\",\n\t\"session-updated\",\n\t\"session-idle\",\n\t\"session-error\",\n\t\"session-deleted\",\n\t\"pre-stop\",\n\t\"task-start\",\n\t\"task-resume\",\n\t\"task-complete\",\n\t\"task-cancel\",\n\t\"pre-user-prompt\",\n\t\"post-response\",\n\t\"message-updated\",\n\t\"message-removed\",\n\t\"system-prompt-transform\",\n\t\"pre-context-compact\",\n\t\"post-context-compact\",\n\t\"permission-asked\",\n\t\"permission-replied\",\n\t\"lsp-diagnostics\",\n\t\"lsp-updated\",\n\t\"subagent-start\",\n\t\"subagent-complete\",\n\t\"subagent-tool-use\",\n\t\"shell-env\",\n\t\"todo-updated\",\n\t\"installation-updated\"\n]);\nhookEventSchema.options;\nconst hookActionIRSchema = object({\n\taction: _enum([\n\t\t\"block\",\n\t\t\"allow\",\n\t\t\"rewrite\",\n\t\t\"injectContext\"\n\t]),\n\tmatch: string().optional(),\n\treason: string().optional(),\n\tvalue: string().optional()\n}).strict();\nconst hookHandlerIRSchema = discriminatedUnion(\"type\", [object({\n\ttype: literal(\"dsl\"),\n\tactions: array(hookActionIRSchema).min(1, \"DSL handler must have at least one action\")\n}).strict(), object({\n\ttype: literal(\"js\"),\n\tentry: string().min(1, \"JS handler entry path must not be empty\")\n}).strict()]);\nconst hookIRSchema = object({\n\tkind: literal(\"hook\"),\n\tname: string().optional(),\n\tevent: hookEventSchema,\n\tmatch: canonicalToolNameSchema.or(string().min(1)).optional(),\n\thandler: hookHandlerIRSchema,\n\tscope: _enum([\"project\", \"global\"]).optional(),\n\textensions: extensionBagSchema\n}).strict();\nconst instructionIRSchema = object({\n\tkind: literal(\"instruction\"),\n\tcontent: string().min(1, \"Content path must not be empty\"),\n\tscope: _enum([\n\t\t\"project\",\n\t\t\"global\",\n\t\t\"directory\"\n\t]).optional(),\n\tglobs: array(string()).optional(),\n\textensions: extensionBagSchema\n}).strict();\nconst networkPermissionsSchema = object({ outbound: array(string()).optional() }).strict();\nconst filesystemPermissionsSchema = object({\n\tread: array(string()).optional(),\n\twrite: array(string()).optional()\n}).strict();\nconst permissionsSchema = object({\n\tnetwork: networkPermissionsSchema.optional(),\n\tfilesystem: filesystemPermissionsSchema.optional(),\n\tsubprocess: boolean().optional()\n}).strict();\n_enum([\"user\", \"admin\"]);\n_enum([\n\t\"active\",\n\t\"suspended\",\n\t\"banned\"\n]);\n_enum([\n\t\"active\",\n\t\"deprecated\",\n\t\"quarantined\",\n\t\"removed\"\n]);\n_enum([\n\t\"user.ban\",\n\t\"user.suspend\",\n\t\"user.unban\",\n\t\"user.promote\",\n\t\"user.demote\",\n\t\"skill.quarantine\",\n\t\"skill.remove\",\n\t\"skill.deprecate\",\n\t\"skill.restore\",\n\t\"skill.feature\",\n\t\"skill.unfeature\",\n\t\"org.suspend\",\n\t\"org.member.remove\",\n\t\"org.delete\"\n]);\nconst promptIRSchema = object({\n\tkind: literal(\"prompt\"),\n\tname: string().min(1, \"Prompt name must not be empty\"),\n\tdescription: string().optional(),\n\ttemplate: string().min(1, \"Prompt template path must not be empty\"),\n\targuments: array(object({\n\t\tname: string(),\n\t\tdescription: string().optional(),\n\t\trequired: boolean().optional()\n\t}).strict()).optional(),\n\textensions: extensionBagSchema\n}).strict();\nconst resourceIRSchema = object({\n\tkind: literal(\"resource\"),\n\tname: string().optional(),\n\turi: string().min(1, \"Resource URI must not be empty\"),\n\tdescription: string().optional(),\n\tmimeType: string().optional(),\n\textensions: extensionBagSchema\n}).strict();\nconst ruleIRSchema = object({\n\tkind: literal(\"rule\"),\n\tname: string().optional(),\n\tevent: hookEventSchema,\n\tmatch: canonicalToolNameSchema.or(string().min(1)).optional(),\n\tpolicy: _enum([\n\t\t\"block\",\n\t\t\"allow\",\n\t\t\"warn\"\n\t]),\n\treason: string().optional(),\n\textensions: extensionBagSchema\n}).strict();\nconst mcpServerConfigSchema = object({\n\tcommand: string().min(1).optional(),\n\targs: array(string()).optional(),\n\tenv: record(string(), string()).optional(),\n\truntime: string().min(1).optional(),\n\tentry: string().min(1).optional()\n}).strict().refine((data) => data.command || data.runtime && data.entry, \"MCP config must have either \\\"command\\\" or both \\\"runtime\\\" and \\\"entry\\\"\");\nconst toolIRSchema = object({\n\tkind: literal(\"tool\"),\n\tname: string().min(1, \"Tool name must not be empty\"),\n\tdescription: string().optional(),\n\tmcp: mcpServerConfigSchema.optional(),\n\textensions: extensionBagSchema\n}).strict();\nconst NAME_PATTERN = /^@[a-z0-9-]+\\/[a-z0-9][a-z0-9-]*$/;\nconst SEMVER_PATTERN = /^\\d+\\.\\d+\\.\\d+(-[a-zA-Z0-9.-]+)?(\\+[a-zA-Z0-9.-]+)?$/;\nconst atomIRSchema = discriminatedUnion(\"kind\", [\n\tinstructionIRSchema,\n\thookIRSchema,\n\ttoolIRSchema,\n\tagentIRSchema,\n\truleIRSchema,\n\tresourceIRSchema,\n\tpromptIRSchema\n]);\nobject({\n\tname: string().min(1, \"Name must not be empty\").max(214, `Name must be 214 characters or fewer`).regex(NAME_PATTERN, \"Name must be scoped (@org/name), lowercase alphanumeric and hyphens\"),\n\tversion: string().regex(SEMVER_PATTERN, \"Version must be valid semver\"),\n\tdescription: string().max(500).optional(),\n\tatoms: array(atomIRSchema),\n\tincludes: array(string()).optional(),\n\tskills: record(string(), string()).optional(),\n\tpermissions: permissionsSchema.optional(),\n\trepository: string().url(\"Repository must be a valid URL\").optional(),\n\tvisibility: _enum([\"public\", \"private\"]).optional(),\n\taudit: object({ min_score: number().min(0).max(10) }).strict().optional()\n}).strict();\nconst commandSchema = string().min(1, \"command must not be empty\");\nconst argSchema = array(string()).default([]);\nconst envSchema = record(string(), string()).optional();\nconst remoteUrlSchema = string().url(\"remote must be a valid URL\");\nconst mcpServerSchema = union([object({\n\tcommand: commandSchema,\n\targs: argSchema,\n\tenv: envSchema,\n\trequires_auth: literal(false).optional()\n}).strict(), object({\n\tremote: remoteUrlSchema,\n\trequires_auth: boolean().default(false),\n\tenv: envSchema\n}).strict()]);\nconst perToolOverrideSchema = object({\n\tscan: boolean().optional(),\n\tblockOnMatch: boolean().optional()\n}).strict();\nobject({\n\tperfBudgetMs: number().positive().optional(),\n\tblockOnMatch: boolean().optional(),\n\tresetPinsOnMismatch: boolean().optional(),\n\tperTool: record(string(), perToolOverrideSchema).optional()\n}).strict();\nconst baseManifestFields = {\n\tname: string().min(1, \"Name must not be empty\").max(214, `Name must be 214 characters or fewer`).regex(/^@[a-z0-9-]+\\/[a-z0-9][a-z0-9-]*$/, \"Name must be scoped (@org/name), lowercase alphanumeric and hyphens\"),\n\tversion: string().regex(/^\\d+\\.\\d+\\.\\d+(-[a-zA-Z0-9.-]+)?(\\+[a-zA-Z0-9.-]+)?$/, \"Version must be valid semver\"),\n\tdescription: string().max(500, `Description must be 500 characters or fewer`).optional(),\n\tskills: record(string(), string()).optional(),\n\tpermissions: permissionsSchema.optional(),\n\trepository: string().url(\"Repository must be a valid URL\").optional(),\n\tvisibility: _enum([\"public\", \"private\"]).optional(),\n\taudit: object({ min_score: number().min(0).max(10) }).strict().optional(),\n\tmcp_server: mcpServerSchema.optional()\n};\nobject(baseManifestFields).strict();\nobject({\n\t...baseManifestFields,\n\tatoms: array(record(string(), unknown())).optional(),\n\tincludes: array(string()).optional()\n}).strict();\nconst SKILL_SOURCES = [\n\t\"registry\",\n\t\"github\",\n\t\"clawhub\",\n\t\"skills_sh\",\n\t\"agentskills_il\",\n\t\"npm\",\n\t\"local\"\n];\nconst SCAN_VERDICTS = [\n\t\"pass\",\n\t\"pass_with_notes\",\n\t\"flagged\",\n\t\"fail\",\n\t\"error\"\n];\nconst lockedSkillV1Schema = object({\n\tresolved: string().url(),\n\tintegrity: string().regex(/^sha512-/, \"Integrity must start with sha512-\"),\n\tpermissions: permissionsSchema,\n\taudit_score: number().min(0).max(10).nullable()\n});\nobject({\n\tlockfileVersion: literal(1),\n\tskills: record(string(), lockedSkillV1Schema)\n});\nconst lockedSkillSchema = object({\n\tresolved: string().url(),\n\tintegrity: string().regex(/^sha512-/, \"Integrity must start with sha512-\"),\n\tpermissions: permissionsSchema,\n\taudit_score: number().min(0).max(10).nullable(),\n\tdependencies: record(string(), string()).optional(),\n\tsource: _enum(SKILL_SOURCES).optional(),\n\tscan_verdict: _enum(SCAN_VERDICTS).optional(),\n\tscanned_at: string().optional()\n});\nobject({\n\tlockfileVersion: union([literal(1), literal(2)]),\n\tskills: record(string(), lockedSkillSchema)\n});\n//#endregion\n//#region src/constants.ts\nconst SDK_VERSION = \"0.10.6\";\nconst DEFAULT_CONFIG_DIR = \"~/.tank\";\nconst DEFAULT_MAX_RETRIES = 3;\nconst DEFAULT_TIMEOUT_MS = 3e4;\nconst SUPPORTED_AGENTS = [\n\t\"opencode\",\n\t\"cursor\",\n\t\"windsurf\",\n\t\"claude-code\",\n\t\"codex\"\n];\nconst AGENT_PATHS = {\n\topencode: \".opencode\",\n\tcursor: \".cursor\",\n\twindsurf: \".windsurf\",\n\t\"claude-code\": \".claude\",\n\tcodex: \".codex\"\n};\n//#endregion\n//#region src/errors.ts\n/**\n* Base error for all Tank SDK errors.\n* All typed errors extend this — catch TankError to handle any SDK failure.\n*/\nvar TankError = class extends Error {\n\t/** HTTP status code (if applicable) */\n\tstatus;\n\t/** Original cause of the error */\n\tcause;\n\tconstructor(message, options) {\n\t\tsuper(message, options?.cause ? { cause: options.cause } : void 0);\n\t\tthis.name = \"TankError\";\n\t\tthis.status = options?.status;\n\t\tif (options?.cause) this.cause = options.cause;\n\t}\n};\n/** Thrown when authentication fails (401). */\nvar TankAuthError = class extends TankError {\n\tconstructor(message = \"Authentication failed. Valid API key required.\") {\n\t\tsuper(message, { status: 401 });\n\t\tthis.name = \"TankAuthError\";\n\t}\n};\n/** Thrown when a requested resource is not found (404). */\nvar TankNotFoundError = class extends TankError {\n\t/** The skill name that was not found (if applicable) */\n\tskillName;\n\tconstructor(message, skillName) {\n\t\tsuper(message, { status: 404 });\n\t\tthis.name = \"TankNotFoundError\";\n\t\tthis.skillName = skillName;\n\t}\n};\n/** Thrown when the user lacks permission for an action (403). */\nvar TankPermissionError = class extends TankError {\n\t/** Required permissions that exceeded the budget */\n\trequired;\n\t/** Allowed permissions in the project budget */\n\tallowed;\n\tconstructor(message, details) {\n\t\tsuper(message, { status: 403 });\n\t\tthis.name = \"TankPermissionError\";\n\t\tthis.required = details?.required;\n\t\tthis.allowed = details?.allowed;\n\t}\n};\n/** Thrown when a network request fails (connection, timeout, DNS). */\nvar TankNetworkError = class extends TankError {\n\tconstructor(message, cause) {\n\t\tsuper(message, { cause });\n\t\tthis.name = \"TankNetworkError\";\n\t}\n};\n/** Thrown when SHA-512 integrity verification fails. */\nvar TankIntegrityError = class extends TankError {\n\t/** Expected integrity hash */\n\texpected;\n\t/** Actual computed hash */\n\tactual;\n\tconstructor(message, details) {\n\t\tsuper(message);\n\t\tthis.name = \"TankIntegrityError\";\n\t\tthis.expected = details?.expected;\n\t\tthis.actual = details?.actual;\n\t}\n};\n/** Thrown when dependency resolution encounters a conflict. */\nvar TankConflictError = class extends TankError {\n\t/** Details about the resolution failure */\n\tdetails;\n\tconstructor(message, details) {\n\t\tsuper(message, { status: 409 });\n\t\tthis.name = \"TankConflictError\";\n\t\tthis.details = details;\n\t}\n};\n//#endregion\n//#region src/client.ts\nfunction resolveConfigDir(configDir) {\n\tif (configDir) return configDir.replace(/^~/, os.homedir());\n\treturn path.join(os.homedir(), \".tank\");\n}\nfunction readConfigFile(configDir) {\n\ttry {\n\t\tconst configPath = path.join(resolveConfigDir(configDir), \"config.json\");\n\t\tconst raw = fs.readFileSync(configPath, \"utf-8\");\n\t\treturn JSON.parse(raw);\n\t} catch {\n\t\treturn {};\n\t}\n}\nfunction resolveToken(options, config) {\n\tif (options.token) return options.token;\n\tconst envToken = process.env.TANK_TOKEN?.trim();\n\tif (envToken) return envToken;\n\treturn config.token;\n}\nfunction parseRegistryOrigin(raw) {\n\tlet url;\n\ttry {\n\t\turl = new URL(raw);\n\t} catch {\n\t\tthrow new Error(`Invalid registry URL: ${raw}`);\n\t}\n\tif (url.username || url.password) throw new Error(`Registry URL must not contain credentials: ${raw}`);\n\tif (url.protocol !== \"https:\" && url.protocol !== \"http:\") throw new Error(`Registry URL must use https or http: ${raw}`);\n\treturn url.origin;\n}\nfunction resolveRegistryUrl(options, config) {\n\treturn parseRegistryOrigin(options.registryUrl || process.env.TANK_REGISTRY_URL?.trim() || config.registry || REGISTRY_URL);\n}\nconst MAX_DOWNLOAD_BYTES$1 = 100 * 1024 * 1024;\nfunction sleep(ms) {\n\treturn new Promise((r) => setTimeout(r, ms));\n}\nvar TankClient = class {\n\ttoken;\n\tregistryUrl;\n\tmaxRetries;\n\ttimeoutMs;\n\tconstructor(options = {}) {\n\t\tconst config = readConfigFile(options.configDir);\n\t\tthis.token = resolveToken(options, config);\n\t\tthis.registryUrl = resolveRegistryUrl(options, config);\n\t\tthis.maxRetries = options.maxRetries ?? 3;\n\t\tthis.timeoutMs = options.timeoutMs ?? 3e4;\n\t}\n\tasync readStreamWithLimit(body, limit) {\n\t\tconst reader = body.getReader();\n\t\tconst chunks = [];\n\t\tlet received = 0;\n\t\twhile (true) {\n\t\t\tconst { done, value } = await reader.read();\n\t\t\tif (done) break;\n\t\t\treceived += value.byteLength;\n\t\t\tif (received > limit) {\n\t\t\t\treader.cancel();\n\t\t\t\tthrow new TankNetworkError(`Response body exceeds ${limit} byte limit`);\n\t\t\t}\n\t\t\tchunks.push(value);\n\t\t}\n\t\treturn Buffer.concat(chunks);\n\t}\n\theaders(hasBody) {\n\t\tconst h = { \"User-Agent\": `tankpkg-sdk/${SDK_VERSION}` };\n\t\tif (this.token) h.Authorization = `Bearer ${this.token}`;\n\t\tif (hasBody) h[\"Content-Type\"] = \"application/json\";\n\t\treturn h;\n\t}\n\tasync request(method, apiPath, body) {\n\t\tconst url = `${this.registryUrl}/api/v1${apiPath}`;\n\t\tlet lastError;\n\t\tfor (let attempt = 0; attempt <= this.maxRetries; attempt++) try {\n\t\t\tconst res = await fetch(url, {\n\t\t\t\tmethod,\n\t\t\t\theaders: this.headers(!!body),\n\t\t\t\tbody: body ? JSON.stringify(body) : void 0,\n\t\t\t\tsignal: AbortSignal.timeout(this.timeoutMs),\n\t\t\t\tredirect: this.token ? \"manual\" : \"follow\"\n\t\t\t});\n\t\t\tif (res.status >= 300 && res.status < 400) throw new TankNetworkError(`Unexpected redirect (${res.status}) from ${url}. Refusing to follow to prevent credential leakage.`);\n\t\t\tif ((res.status === 429 || res.status >= 500) && attempt < this.maxRetries) {\n\t\t\t\tawait sleep(Math.min(1e3 * 2 ** attempt, 3e4));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\treturn res;\n\t\t} catch (err) {\n\t\t\tlastError = err instanceof Error ? err : new Error(String(err));\n\t\t\tif (attempt < this.maxRetries) await sleep(Math.min(1e3 * 2 ** attempt, 3e4));\n\t\t}\n\t\tthrow new TankNetworkError(`Request to ${url} failed after ${this.maxRetries + 1} attempts`, lastError);\n\t}\n\tasync json(method, apiPath, body) {\n\t\tconst res = await this.request(method, apiPath, body);\n\t\tif (res.status === 401) throw new TankAuthError();\n\t\tif (res.status === 403) throw new TankPermissionError((await res.json().catch(() => ({ error: \"Forbidden\" }))).error || \"Permission denied\");\n\t\tif (res.status === 404) throw new TankNotFoundError((await res.json().catch(() => ({ error: \"Not found\" }))).error || \"Not found\");\n\t\tif (!res.ok) {\n\t\t\tconst text = await res.text().catch(() => \"\");\n\t\t\tthrow new TankNetworkError(`HTTP ${res.status}: ${text}`);\n\t\t}\n\t\treturn await res.json();\n\t}\n\tasync search(query, options) {\n\t\tconst params = new URLSearchParams({ q: query });\n\t\tif (options?.page) params.set(\"page\", String(options.page));\n\t\tif (options?.limit) params.set(\"limit\", String(options.limit));\n\t\treturn this.json(\"GET\", `/search?${params}`);\n\t}\n\tasync info(name) {\n\t\treturn this.json(\"GET\", `/skills/${encodeURIComponent(name)}`);\n\t}\n\tasync versions(name) {\n\t\treturn this.json(\"GET\", `/skills/${encodeURIComponent(name)}/versions`);\n\t}\n\tasync download(name, version, options) {\n\t\tconst detail = await this.json(\"GET\", `/skills/${encodeURIComponent(name)}/${version}`);\n\t\tconst dlUrl = new URL(detail.downloadUrl);\n\t\tif (dlUrl.username || dlUrl.password) throw new TankNetworkError(`Download URL must not contain credentials: ${detail.downloadUrl}`);\n\t\tif (dlUrl.protocol !== \"https:\" && dlUrl.protocol !== \"http:\") throw new TankNetworkError(`Download URL must use https or http: ${detail.downloadUrl}`);\n\t\tconst res = await fetch(detail.downloadUrl, {\n\t\t\tsignal: AbortSignal.timeout(this.timeoutMs),\n\t\t\tredirect: \"manual\"\n\t\t});\n\t\tif (res.status >= 300 && res.status < 400) throw new TankNetworkError(`Unexpected redirect (${res.status}) from download URL`);\n\t\tif (!res.ok || !res.body) throw new TankNetworkError(`Failed to download tarball: HTTP ${res.status}`);\n\t\tif (options?.buffer || options?.dest) {\n\t\t\tconst buffer = await this.readStreamWithLimit(res.body, MAX_DOWNLOAD_BYTES$1);\n\t\t\tconst computed = `sha512-${(await import(\"node:crypto\")).createHash(\"sha512\").update(buffer).digest(\"base64\")}`;\n\t\t\tif (detail.integrity && detail.integrity !== \"pending\" && computed !== detail.integrity) throw new TankIntegrityError(\"Integrity verification failed\", {\n\t\t\t\texpected: detail.integrity,\n\t\t\t\tactual: computed\n\t\t\t});\n\t\t\tif (options?.dest) {\n\t\t\t\tconst destDir = options.dest.replace(/^~/, os.homedir());\n\t\t\t\tif (!fs.existsSync(destDir)) fs.mkdirSync(destDir, { recursive: true });\n\t\t\t\tconst filename = `${name.replace(/[/\\\\]/g, \"-\").replace(/\\.\\./g, \"\")}-${version}.tgz`;\n\t\t\t\tconst destPath = path.join(destDir, filename);\n\t\t\t\tfs.writeFileSync(destPath, buffer);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturn buffer;\n\t\t}\n\t\treturn res.body;\n\t}\n\tasync audit(name, version) {\n\t\tif (version) return this.json(\"GET\", `/skills/${encodeURIComponent(name)}/${version}`);\n\t\tconst latest = (await this.info(name)).latestVersion;\n\t\tif (!latest) throw new TankNotFoundError(`No versions found for ${name}`, name);\n\t\treturn this.json(\"GET\", `/skills/${encodeURIComponent(name)}/${latest}`);\n\t}\n\tasync permissions(name, version) {\n\t\treturn (await this.audit(name, version)).permissions;\n\t}\n\tasync whoami() {\n\t\tif (!this.token) return null;\n\t\ttry {\n\t\t\treturn await this.json(\"GET\", \"/auth/whoami\");\n\t\t} catch (err) {\n\t\t\tif (err instanceof TankAuthError) return null;\n\t\t\tthrow err;\n\t\t}\n\t}\n\tasync startLoginFlow() {\n\t\tconst state = crypto.randomUUID().replace(/-/g, \"\");\n\t\treturn this.json(\"POST\", \"/cli-auth/start\", { state });\n\t}\n\tasync exchangeLoginCode(sessionCode, state) {\n\t\ttry {\n\t\t\treturn await this.json(\"POST\", \"/cli-auth/exchange\", {\n\t\t\t\tsessionCode,\n\t\t\t\tstate\n\t\t\t});\n\t\t} catch (err) {\n\t\t\tif (err instanceof TankAuthError || err instanceof TankNotFoundError) return null;\n\t\t\tthrow err;\n\t\t}\n\t}\n\tasync listFiles(name, version) {\n\t\tconst ver = version ?? (await this.info(name)).latestVersion;\n\t\tif (!ver) throw new TankNotFoundError(`No versions found for ${name}`, name);\n\t\treturn (await this.json(\"GET\", `/skills/${encodeURIComponent(name)}/${ver}/files`)).files;\n\t}\n\tasync readFile(name, version, filePath) {\n\t\tconst normalized = filePath.replace(/\\\\/g, \"/\").replace(/\\0/g, \"\");\n\t\tif (!normalized || normalized.startsWith(\"/\") || normalized.split(\"/\").some((s) => s === \"..\")) throw new TankNetworkError(`Invalid file path: ${filePath}`);\n\t\tconst encodedName = encodeURIComponent(name);\n\t\tconst encodedPath = normalized.split(\"/\").map(encodeURIComponent).join(\"/\");\n\t\tconst res = await this.request(\"GET\", `/skills/${encodedName}/${version}/files/${encodedPath}`);\n\t\tif (res.status === 404) throw new TankNotFoundError(`File not found: ${filePath}`, name);\n\t\tif (!res.ok) throw new TankNetworkError(`Failed to read file: HTTP ${res.status}`);\n\t\treturn res.text();\n\t}\n\tasync batchRead(name, ver, items, concurrency = 6) {\n\t\tconst results = [];\n\t\tfor (let i = 0; i < items.length; i += concurrency) {\n\t\t\tconst batch = items.slice(i, i + concurrency);\n\t\t\tconst batchResults = await Promise.all(batch.map(async ({ f, prefix }) => ({\n\t\t\t\tkey: f.slice(prefix.length),\n\t\t\t\tprefix,\n\t\t\t\tcontent: await this.readFile(name, ver, f)\n\t\t\t})));\n\t\t\tresults.push(...batchResults);\n\t\t}\n\t\treturn results;\n\t}\n\tasync readSkill(name, version) {\n\t\tconst ver = version ?? (await this.info(name)).latestVersion;\n\t\tif (!ver) throw new TankNotFoundError(`No versions found for ${name}`, name);\n\t\tconst files = await this.listFiles(name, ver);\n\t\tconst content = files.find((f) => f === \"SKILL.md\") ? await this.readFile(name, ver, \"SKILL.md\") : \"\";\n\t\tconst filesToRead = [...files.filter((f) => f.startsWith(\"references/\")).map((f) => ({\n\t\t\tf,\n\t\t\tprefix: \"references/\"\n\t\t})), ...files.filter((f) => f.startsWith(\"scripts/\")).map((f) => ({\n\t\t\tf,\n\t\t\tprefix: \"scripts/\"\n\t\t}))];\n\t\tconst results = await this.batchRead(name, ver, filesToRead);\n\t\tconst refEntries = results.filter((r) => r.prefix === \"references/\").map((r) => [r.key, r.content]);\n\t\tconst scriptEntries = results.filter((r) => r.prefix === \"scripts/\").map((r) => [r.key, r.content]);\n\t\treturn {\n\t\t\tname,\n\t\t\tversion: ver,\n\t\t\tcontent,\n\t\t\treferences: Object.fromEntries(refEntries),\n\t\t\tscripts: Object.fromEntries(scriptEntries),\n\t\t\tfiles\n\t\t};\n\t}\n\tasync getStarCount(name) {\n\t\treturn this.json(\"GET\", `/skills/${encodeURIComponent(name)}/star`);\n\t}\n\tasync star(name) {\n\t\tawait this.json(\"POST\", `/skills/${encodeURIComponent(name)}/star`);\n\t}\n\tasync unstar(name) {\n\t\tawait this.json(\"DELETE\", `/skills/${encodeURIComponent(name)}/star`);\n\t}\n};\n//#endregion\n//#region src/install/native.ts\nconst esmRequire = createRequire(import.meta.url);\nlet _native = null;\nlet _nativeChecked = false;\nfunction tryLoadNative() {\n\tif (_nativeChecked) return _native;\n\t_nativeChecked = true;\n\ttry {\n\t\t_native = esmRequire(\"@tankpkg/sdk-core\");\n\t} catch {\n\t\t_native = null;\n\t}\n\treturn _native;\n}\nfunction hasNativeAcceleration() {\n\treturn tryLoadNative() !== null;\n}\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/internal/constants.js\nvar require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst SEMVER_SPEC_VERSION = \"2.0.0\";\n\tconst MAX_LENGTH = 256;\n\tconst MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;\n\tmodule.exports = {\n\t\tMAX_LENGTH,\n\t\tMAX_SAFE_COMPONENT_LENGTH: 16,\n\t\tMAX_SAFE_BUILD_LENGTH: MAX_LENGTH - 6,\n\t\tMAX_SAFE_INTEGER,\n\t\tRELEASE_TYPES: [\n\t\t\t\"major\",\n\t\t\t\"premajor\",\n\t\t\t\"minor\",\n\t\t\t\"preminor\",\n\t\t\t\"patch\",\n\t\t\t\"prepatch\",\n\t\t\t\"prerelease\"\n\t\t],\n\t\tSEMVER_SPEC_VERSION,\n\t\tFLAG_INCLUDE_PRERELEASE: 1,\n\t\tFLAG_LOOSE: 2\n\t};\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/internal/debug.js\nvar require_debug = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = typeof process === \"object\" && process.env && process.env.NODE_DEBUG && /\\bsemver\\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error(\"SEMVER\", ...args) : () => {};\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/internal/re.js\nvar require_re = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH } = require_constants();\n\tconst debug = require_debug();\n\texports = module.exports = {};\n\tconst re = exports.re = [];\n\tconst safeRe = exports.safeRe = [];\n\tconst src = exports.src = [];\n\tconst safeSrc = exports.safeSrc = [];\n\tconst t = exports.t = {};\n\tlet R = 0;\n\tconst LETTERDASHNUMBER = \"[a-zA-Z0-9-]\";\n\tconst safeRegexReplacements = [\n\t\t[\"\\\\s\", 1],\n\t\t[\"\\\\d\", MAX_LENGTH],\n\t\t[LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]\n\t];\n\tconst makeSafeRegex = (value) => {\n\t\tfor (const [token, max] of safeRegexReplacements) value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);\n\t\treturn value;\n\t};\n\tconst createToken = (name, value, isGlobal) => {\n\t\tconst safe = makeSafeRegex(value);\n\t\tconst index = R++;\n\t\tdebug(name, index, value);\n\t\tt[name] = index;\n\t\tsrc[index] = value;\n\t\tsafeSrc[index] = safe;\n\t\tre[index] = new RegExp(value, isGlobal ? \"g\" : void 0);\n\t\tsafeRe[index] = new RegExp(safe, isGlobal ? \"g\" : void 0);\n\t};\n\tcreateToken(\"NUMERICIDENTIFIER\", \"0|[1-9]\\\\d*\");\n\tcreateToken(\"NUMERICIDENTIFIERLOOSE\", \"\\\\d+\");\n\tcreateToken(\"NONNUMERICIDENTIFIER\", `\\\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);\n\tcreateToken(\"MAINVERSION\", `(${src[t.NUMERICIDENTIFIER]})\\\\.(${src[t.NUMERICIDENTIFIER]})\\\\.(${src[t.NUMERICIDENTIFIER]})`);\n\tcreateToken(\"MAINVERSIONLOOSE\", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);\n\tcreateToken(\"PRERELEASEIDENTIFIER\", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`);\n\tcreateToken(\"PRERELEASEIDENTIFIERLOOSE\", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`);\n\tcreateToken(\"PRERELEASE\", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\\\.${src[t.PRERELEASEIDENTIFIER]})*))`);\n\tcreateToken(\"PRERELEASELOOSE\", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);\n\tcreateToken(\"BUILDIDENTIFIER\", `${LETTERDASHNUMBER}+`);\n\tcreateToken(\"BUILD\", `(?:\\\\+(${src[t.BUILDIDENTIFIER]}(?:\\\\.${src[t.BUILDIDENTIFIER]})*))`);\n\tcreateToken(\"FULLPLAIN\", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);\n\tcreateToken(\"FULL\", `^${src[t.FULLPLAIN]}$`);\n\tcreateToken(\"LOOSEPLAIN\", `[v=\\\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);\n\tcreateToken(\"LOOSE\", `^${src[t.LOOSEPLAIN]}$`);\n\tcreateToken(\"GTLT\", \"((?:<|>)?=?)\");\n\tcreateToken(\"XRANGEIDENTIFIERLOOSE\", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`);\n\tcreateToken(\"XRANGEIDENTIFIER\", `${src[t.NUMERICIDENTIFIER]}|x|X|\\\\*`);\n\tcreateToken(\"XRANGEPLAIN\", `[v=\\\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\\\.(${src[t.XRANGEIDENTIFIER]})(?:\\\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`);\n\tcreateToken(\"XRANGEPLAINLOOSE\", `[v=\\\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);\n\tcreateToken(\"XRANGE\", `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAIN]}$`);\n\tcreateToken(\"XRANGELOOSE\", `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAINLOOSE]}$`);\n\tcreateToken(\"COERCEPLAIN\", `(^|[^\\\\d])(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}})(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);\n\tcreateToken(\"COERCE\", `${src[t.COERCEPLAIN]}(?:$|[^\\\\d])`);\n\tcreateToken(\"COERCEFULL\", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\\\d])`);\n\tcreateToken(\"COERCERTL\", src[t.COERCE], true);\n\tcreateToken(\"COERCERTLFULL\", src[t.COERCEFULL], true);\n\tcreateToken(\"LONETILDE\", \"(?:~>?)\");\n\tcreateToken(\"TILDETRIM\", `(\\\\s*)${src[t.LONETILDE]}\\\\s+`, true);\n\texports.tildeTrimReplace = \"$1~\";\n\tcreateToken(\"TILDE\", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);\n\tcreateToken(\"TILDELOOSE\", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);\n\tcreateToken(\"LONECARET\", \"(?:\\\\^)\");\n\tcreateToken(\"CARETTRIM\", `(\\\\s*)${src[t.LONECARET]}\\\\s+`, true);\n\texports.caretTrimReplace = \"$1^\";\n\tcreateToken(\"CARET\", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);\n\tcreateToken(\"CARETLOOSE\", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);\n\tcreateToken(\"COMPARATORLOOSE\", `^${src[t.GTLT]}\\\\s*(${src[t.LOOSEPLAIN]})$|^$`);\n\tcreateToken(\"COMPARATOR\", `^${src[t.GTLT]}\\\\s*(${src[t.FULLPLAIN]})$|^$`);\n\tcreateToken(\"COMPARATORTRIM\", `(\\\\s*)${src[t.GTLT]}\\\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);\n\texports.comparatorTrimReplace = \"$1$2$3\";\n\tcreateToken(\"HYPHENRANGE\", `^\\\\s*(${src[t.XRANGEPLAIN]})\\\\s+-\\\\s+(${src[t.XRANGEPLAIN]})\\\\s*$`);\n\tcreateToken(\"HYPHENRANGELOOSE\", `^\\\\s*(${src[t.XRANGEPLAINLOOSE]})\\\\s+-\\\\s+(${src[t.XRANGEPLAINLOOSE]})\\\\s*$`);\n\tcreateToken(\"STAR\", \"(<|>)?=?\\\\s*\\\\*\");\n\tcreateToken(\"GTE0\", \"^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$\");\n\tcreateToken(\"GTE0PRE\", \"^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$\");\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/internal/parse-options.js\nvar require_parse_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst looseOption = Object.freeze({ loose: true });\n\tconst emptyOpts = Object.freeze({});\n\tconst parseOptions = (options) => {\n\t\tif (!options) return emptyOpts;\n\t\tif (typeof options !== \"object\") return looseOption;\n\t\treturn options;\n\t};\n\tmodule.exports = parseOptions;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/internal/identifiers.js\nvar require_identifiers = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst numeric = /^[0-9]+$/;\n\tconst compareIdentifiers = (a, b) => {\n\t\tif (typeof a === \"number\" && typeof b === \"number\") return a === b ? 0 : a < b ? -1 : 1;\n\t\tconst anum = numeric.test(a);\n\t\tconst bnum = numeric.test(b);\n\t\tif (anum && bnum) {\n\t\t\ta = +a;\n\t\t\tb = +b;\n\t\t}\n\t\treturn a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;\n\t};\n\tconst rcompareIdentifiers = (a, b) => compareIdentifiers(b, a);\n\tmodule.exports = {\n\t\tcompareIdentifiers,\n\t\trcompareIdentifiers\n\t};\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/classes/semver.js\nvar require_semver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst debug = require_debug();\n\tconst { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();\n\tconst { safeRe: re, t } = require_re();\n\tconst parseOptions = require_parse_options();\n\tconst { compareIdentifiers } = require_identifiers();\n\tmodule.exports = class SemVer {\n\t\tconstructor(version, options) {\n\t\t\toptions = parseOptions(options);\n\t\t\tif (version instanceof SemVer) if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) return version;\n\t\t\telse version = version.version;\n\t\t\telse if (typeof version !== \"string\") throw new TypeError(`Invalid version. Must be a string. Got type \"${typeof version}\".`);\n\t\t\tif (version.length > MAX_LENGTH) throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);\n\t\t\tdebug(\"SemVer\", version, options);\n\t\t\tthis.options = options;\n\t\t\tthis.loose = !!options.loose;\n\t\t\tthis.includePrerelease = !!options.includePrerelease;\n\t\t\tconst m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);\n\t\t\tif (!m) throw new TypeError(`Invalid Version: ${version}`);\n\t\t\tthis.raw = version;\n\t\t\tthis.major = +m[1];\n\t\t\tthis.minor = +m[2];\n\t\t\tthis.patch = +m[3];\n\t\t\tif (this.major > MAX_SAFE_INTEGER || this.major < 0) throw new TypeError(\"Invalid major version\");\n\t\t\tif (this.minor > MAX_SAFE_INTEGER || this.minor < 0) throw new TypeError(\"Invalid minor version\");\n\t\t\tif (this.patch > MAX_SAFE_INTEGER || this.patch < 0) throw new TypeError(\"Invalid patch version\");\n\t\t\tif (!m[4]) this.prerelease = [];\n\t\t\telse this.prerelease = m[4].split(\".\").map((id) => {\n\t\t\t\tif (/^[0-9]+$/.test(id)) {\n\t\t\t\t\tconst num = +id;\n\t\t\t\t\tif (num >= 0 && num < MAX_SAFE_INTEGER) return num;\n\t\t\t\t}\n\t\t\t\treturn id;\n\t\t\t});\n\t\t\tthis.build = m[5] ? m[5].split(\".\") : [];\n\t\t\tthis.format();\n\t\t}\n\t\tformat() {\n\t\t\tthis.version = `${this.major}.${this.minor}.${this.patch}`;\n\t\t\tif (this.prerelease.length) this.version += `-${this.prerelease.join(\".\")}`;\n\t\t\treturn this.version;\n\t\t}\n\t\ttoString() {\n\t\t\treturn this.version;\n\t\t}\n\t\tcompare(other) {\n\t\t\tdebug(\"SemVer.compare\", this.version, this.options, other);\n\t\t\tif (!(other instanceof SemVer)) {\n\t\t\t\tif (typeof other === \"string\" && other === this.version) return 0;\n\t\t\t\tother = new SemVer(other, this.options);\n\t\t\t}\n\t\t\tif (other.version === this.version) return 0;\n\t\t\treturn this.compareMain(other) || this.comparePre(other);\n\t\t}\n\t\tcompareMain(other) {\n\t\t\tif (!(other instanceof SemVer)) other = new SemVer(other, this.options);\n\t\t\tif (this.major < other.major) return -1;\n\t\t\tif (this.major > other.major) return 1;\n\t\t\tif (this.minor < other.minor) return -1;\n\t\t\tif (this.minor > other.minor) return 1;\n\t\t\tif (this.patch < other.patch) return -1;\n\t\t\tif (this.patch > other.patch) return 1;\n\t\t\treturn 0;\n\t\t}\n\t\tcomparePre(other) {\n\t\t\tif (!(other instanceof SemVer)) other = new SemVer(other, this.options);\n\t\t\tif (this.prerelease.length && !other.prerelease.length) return -1;\n\t\t\telse if (!this.prerelease.length && other.prerelease.length) return 1;\n\t\t\telse if (!this.prerelease.length && !other.prerelease.length) return 0;\n\t\t\tlet i = 0;\n\t\t\tdo {\n\t\t\t\tconst a = this.prerelease[i];\n\t\t\t\tconst b = other.prerelease[i];\n\t\t\t\tdebug(\"prerelease compare\", i, a, b);\n\t\t\t\tif (a === void 0 && b === void 0) return 0;\n\t\t\t\telse if (b === void 0) return 1;\n\t\t\t\telse if (a === void 0) return -1;\n\t\t\t\telse if (a === b) continue;\n\t\t\t\telse return compareIdentifiers(a, b);\n\t\t\t} while (++i);\n\t\t}\n\t\tcompareBuild(other) {\n\t\t\tif (!(other instanceof SemVer)) other = new SemVer(other, this.options);\n\t\t\tlet i = 0;\n\t\t\tdo {\n\t\t\t\tconst a = this.build[i];\n\t\t\t\tconst b = other.build[i];\n\t\t\t\tdebug(\"build compare\", i, a, b);\n\t\t\t\tif (a === void 0 && b === void 0) return 0;\n\t\t\t\telse if (b === void 0) return 1;\n\t\t\t\telse if (a === void 0) return -1;\n\t\t\t\telse if (a === b) continue;\n\t\t\t\telse return compareIdentifiers(a, b);\n\t\t\t} while (++i);\n\t\t}\n\t\tinc(release, identifier, identifierBase) {\n\t\t\tif (release.startsWith(\"pre\")) {\n\t\t\t\tif (!identifier && identifierBase === false) throw new Error(\"invalid increment argument: identifier is empty\");\n\t\t\t\tif (identifier) {\n\t\t\t\t\tconst match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]);\n\t\t\t\t\tif (!match || match[1] !== identifier) throw new Error(`invalid identifier: ${identifier}`);\n\t\t\t\t}\n\t\t\t}\n\t\t\tswitch (release) {\n\t\t\t\tcase \"premajor\":\n\t\t\t\t\tthis.prerelease.length = 0;\n\t\t\t\t\tthis.patch = 0;\n\t\t\t\t\tthis.minor = 0;\n\t\t\t\t\tthis.major++;\n\t\t\t\t\tthis.inc(\"pre\", identifier, identifierBase);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"preminor\":\n\t\t\t\t\tthis.prerelease.length = 0;\n\t\t\t\t\tthis.patch = 0;\n\t\t\t\t\tthis.minor++;\n\t\t\t\t\tthis.inc(\"pre\", identifier, identifierBase);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"prepatch\":\n\t\t\t\t\tthis.prerelease.length = 0;\n\t\t\t\t\tthis.inc(\"patch\", identifier, identifierBase);\n\t\t\t\t\tthis.inc(\"pre\", identifier, identifierBase);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"prerelease\":\n\t\t\t\t\tif (this.prerelease.length === 0) this.inc(\"patch\", identifier, identifierBase);\n\t\t\t\t\tthis.inc(\"pre\", identifier, identifierBase);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"release\":\n\t\t\t\t\tif (this.prerelease.length === 0) throw new Error(`version ${this.raw} is not a prerelease`);\n\t\t\t\t\tthis.prerelease.length = 0;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"major\":\n\t\t\t\t\tif (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) this.major++;\n\t\t\t\t\tthis.minor = 0;\n\t\t\t\t\tthis.patch = 0;\n\t\t\t\t\tthis.prerelease = [];\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"minor\":\n\t\t\t\t\tif (this.patch !== 0 || this.prerelease.length === 0) this.minor++;\n\t\t\t\t\tthis.patch = 0;\n\t\t\t\t\tthis.prerelease = [];\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"patch\":\n\t\t\t\t\tif (this.prerelease.length === 0) this.patch++;\n\t\t\t\t\tthis.prerelease = [];\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"pre\": {\n\t\t\t\t\tconst base = Number(identifierBase) ? 1 : 0;\n\t\t\t\t\tif (this.prerelease.length === 0) this.prerelease = [base];\n\t\t\t\t\telse {\n\t\t\t\t\t\tlet i = this.prerelease.length;\n\t\t\t\t\t\twhile (--i >= 0) if (typeof this.prerelease[i] === \"number\") {\n\t\t\t\t\t\t\tthis.prerelease[i]++;\n\t\t\t\t\t\t\ti = -2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (i === -1) {\n\t\t\t\t\t\t\tif (identifier === this.prerelease.join(\".\") && identifierBase === false) throw new Error(\"invalid increment argument: identifier already exists\");\n\t\t\t\t\t\t\tthis.prerelease.push(base);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (identifier) {\n\t\t\t\t\t\tlet prerelease = [identifier, base];\n\t\t\t\t\t\tif (identifierBase === false) prerelease = [identifier];\n\t\t\t\t\t\tif (compareIdentifiers(this.prerelease[0], identifier) === 0) {\n\t\t\t\t\t\t\tif (isNaN(this.prerelease[1])) this.prerelease = prerelease;\n\t\t\t\t\t\t} else this.prerelease = prerelease;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault: throw new Error(`invalid increment argument: ${release}`);\n\t\t\t}\n\t\t\tthis.raw = this.format();\n\t\t\tif (this.build.length) this.raw += `+${this.build.join(\".\")}`;\n\t\t\treturn this;\n\t\t}\n\t};\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/parse.js\nvar require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst SemVer = require_semver$1();\n\tconst parse = (version, options, throwErrors = false) => {\n\t\tif (version instanceof SemVer) return version;\n\t\ttry {\n\t\t\treturn new SemVer(version, options);\n\t\t} catch (er) {\n\t\t\tif (!throwErrors) return null;\n\t\t\tthrow er;\n\t\t}\n\t};\n\tmodule.exports = parse;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/valid.js\nvar require_valid$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst parse = require_parse();\n\tconst valid = (version, options) => {\n\t\tconst v = parse(version, options);\n\t\treturn v ? v.version : null;\n\t};\n\tmodule.exports = valid;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/clean.js\nvar require_clean = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst parse = require_parse();\n\tconst clean = (version, options) => {\n\t\tconst s = parse(version.trim().replace(/^[=v]+/, \"\"), options);\n\t\treturn s ? s.version : null;\n\t};\n\tmodule.exports = clean;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/inc.js\nvar require_inc = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst SemVer = require_semver$1();\n\tconst inc = (version, release, options, identifier, identifierBase) => {\n\t\tif (typeof options === \"string\") {\n\t\t\tidentifierBase = identifier;\n\t\t\tidentifier = options;\n\t\t\toptions = void 0;\n\t\t}\n\t\ttry {\n\t\t\treturn new SemVer(version instanceof SemVer ? version.version : version, options).inc(release, identifier, identifierBase).version;\n\t\t} catch (er) {\n\t\t\treturn null;\n\t\t}\n\t};\n\tmodule.exports = inc;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/diff.js\nvar require_diff = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst parse = require_parse();\n\tconst diff = (version1, version2) => {\n\t\tconst v1 = parse(version1, null, true);\n\t\tconst v2 = parse(version2, null, true);\n\t\tconst comparison = v1.compare(v2);\n\t\tif (comparison === 0) return null;\n\t\tconst v1Higher = comparison > 0;\n\t\tconst highVersion = v1Higher ? v1 : v2;\n\t\tconst lowVersion = v1Higher ? v2 : v1;\n\t\tconst highHasPre = !!highVersion.prerelease.length;\n\t\tif (!!lowVersion.prerelease.length && !highHasPre) {\n\t\t\tif (!lowVersion.patch && !lowVersion.minor) return \"major\";\n\t\t\tif (lowVersion.compareMain(highVersion) === 0) {\n\t\t\t\tif (lowVersion.minor && !lowVersion.patch) return \"minor\";\n\t\t\t\treturn \"patch\";\n\t\t\t}\n\t\t}\n\t\tconst prefix = highHasPre ? \"pre\" : \"\";\n\t\tif (v1.major !== v2.major) return prefix + \"major\";\n\t\tif (v1.minor !== v2.minor) return prefix + \"minor\";\n\t\tif (v1.patch !== v2.patch) return prefix + \"patch\";\n\t\treturn \"prerelease\";\n\t};\n\tmodule.exports = diff;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/major.js\nvar require_major = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst SemVer = require_semver$1();\n\tconst major = (a, loose) => new SemVer(a, loose).major;\n\tmodule.exports = major;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/minor.js\nvar require_minor = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst SemVer = require_semver$1();\n\tconst minor = (a, loose) => new SemVer(a, loose).minor;\n\tmodule.exports = minor;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/patch.js\nvar require_patch = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst SemVer = require_semver$1();\n\tconst patch = (a, loose) => new SemVer(a, loose).patch;\n\tmodule.exports = patch;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/prerelease.js\nvar require_prerelease = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst parse = require_parse();\n\tconst prerelease = (version, options) => {\n\t\tconst parsed = parse(version, options);\n\t\treturn parsed && parsed.prerelease.length ? parsed.prerelease : null;\n\t};\n\tmodule.exports = prerelease;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/compare.js\nvar require_compare = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst SemVer = require_semver$1();\n\tconst compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));\n\tmodule.exports = compare;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/rcompare.js\nvar require_rcompare = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst compare = require_compare();\n\tconst rcompare = (a, b, loose) => compare(b, a, loose);\n\tmodule.exports = rcompare;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/compare-loose.js\nvar require_compare_loose = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst compare = require_compare();\n\tconst compareLoose = (a, b) => compare(a, b, true);\n\tmodule.exports = compareLoose;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/compare-build.js\nvar require_compare_build = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst SemVer = require_semver$1();\n\tconst compareBuild = (a, b, loose) => {\n\t\tconst versionA = new SemVer(a, loose);\n\t\tconst versionB = new SemVer(b, loose);\n\t\treturn versionA.compare(versionB) || versionA.compareBuild(versionB);\n\t};\n\tmodule.exports = compareBuild;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/sort.js\nvar require_sort = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst compareBuild = require_compare_build();\n\tconst sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose));\n\tmodule.exports = sort;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/rsort.js\nvar require_rsort = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst compareBuild = require_compare_build();\n\tconst rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));\n\tmodule.exports = rsort;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/gt.js\nvar require_gt = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst compare = require_compare();\n\tconst gt = (a, b, loose) => compare(a, b, loose) > 0;\n\tmodule.exports = gt;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/lt.js\nvar require_lt = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst compare = require_compare();\n\tconst lt = (a, b, loose) => compare(a, b, loose) < 0;\n\tmodule.exports = lt;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/eq.js\nvar require_eq = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst compare = require_compare();\n\tconst eq = (a, b, loose) => compare(a, b, loose) === 0;\n\tmodule.exports = eq;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/neq.js\nvar require_neq = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst compare = require_compare();\n\tconst neq = (a, b, loose) => compare(a, b, loose) !== 0;\n\tmodule.exports = neq;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/gte.js\nvar require_gte = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst compare = require_compare();\n\tconst gte = (a, b, loose) => compare(a, b, loose) >= 0;\n\tmodule.exports = gte;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/lte.js\nvar require_lte = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst compare = require_compare();\n\tconst lte = (a, b, loose) => compare(a, b, loose) <= 0;\n\tmodule.exports = lte;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/cmp.js\nvar require_cmp = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst eq = require_eq();\n\tconst neq = require_neq();\n\tconst gt = require_gt();\n\tconst gte = require_gte();\n\tconst lt = require_lt();\n\tconst lte = require_lte();\n\tconst cmp = (a, op, b, loose) => {\n\t\tswitch (op) {\n\t\t\tcase \"===\":\n\t\t\t\tif (typeof a === \"object\") a = a.version;\n\t\t\t\tif (typeof b === \"object\") b = b.version;\n\t\t\t\treturn a === b;\n\t\t\tcase \"!==\":\n\t\t\t\tif (typeof a === \"object\") a = a.version;\n\t\t\t\tif (typeof b === \"object\") b = b.version;\n\t\t\t\treturn a !== b;\n\t\t\tcase \"\":\n\t\t\tcase \"=\":\n\t\t\tcase \"==\": return eq(a, b, loose);\n\t\t\tcase \"!=\": return neq(a, b, loose);\n\t\t\tcase \">\": return gt(a, b, loose);\n\t\t\tcase \">=\": return gte(a, b, loose);\n\t\t\tcase \"<\": return lt(a, b, loose);\n\t\t\tcase \"<=\": return lte(a, b, loose);\n\t\t\tdefault: throw new TypeError(`Invalid operator: ${op}`);\n\t\t}\n\t};\n\tmodule.exports = cmp;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/coerce.js\nvar require_coerce = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst SemVer = require_semver$1();\n\tconst parse = require_parse();\n\tconst { safeRe: re, t } = require_re();\n\tconst coerce = (version, options) => {\n\t\tif (version instanceof SemVer) return version;\n\t\tif (typeof version === \"number\") version = String(version);\n\t\tif (typeof version !== \"string\") return null;\n\t\toptions = options || {};\n\t\tlet match = null;\n\t\tif (!options.rtl) match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);\n\t\telse {\n\t\t\tconst coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL];\n\t\t\tlet next;\n\t\t\twhile ((next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length)) {\n\t\t\t\tif (!match || next.index + next[0].length !== match.index + match[0].length) match = next;\n\t\t\t\tcoerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;\n\t\t\t}\n\t\t\tcoerceRtlRegex.lastIndex = -1;\n\t\t}\n\t\tif (match === null) return null;\n\t\tconst major = match[2];\n\t\treturn parse(`${major}.${match[3] || \"0\"}.${match[4] || \"0\"}${options.includePrerelease && match[5] ? `-${match[5]}` : \"\"}${options.includePrerelease && match[6] ? `+${match[6]}` : \"\"}`, options);\n\t};\n\tmodule.exports = coerce;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/internal/lrucache.js\nvar require_lrucache = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar LRUCache = class {\n\t\tconstructor() {\n\t\t\tthis.max = 1e3;\n\t\t\tthis.map = /* @__PURE__ */ new Map();\n\t\t}\n\t\tget(key) {\n\t\t\tconst value = this.map.get(key);\n\t\t\tif (value === void 0) return;\n\t\t\telse {\n\t\t\t\tthis.map.delete(key);\n\t\t\t\tthis.map.set(key, value);\n\t\t\t\treturn value;\n\t\t\t}\n\t\t}\n\t\tdelete(key) {\n\t\t\treturn this.map.delete(key);\n\t\t}\n\t\tset(key, value) {\n\t\t\tif (!this.delete(key) && value !== void 0) {\n\t\t\t\tif (this.map.size >= this.max) {\n\t\t\t\t\tconst firstKey = this.map.keys().next().value;\n\t\t\t\t\tthis.delete(firstKey);\n\t\t\t\t}\n\t\t\t\tthis.map.set(key, value);\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t};\n\tmodule.exports = LRUCache;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/classes/range.js\nvar require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst SPACE_CHARACTERS = /\\s+/g;\n\tmodule.exports = class Range {\n\t\tconstructor(range, options) {\n\t\t\toptions = parseOptions(options);\n\t\t\tif (range instanceof Range) if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) return range;\n\t\t\telse return new Range(range.raw, options);\n\t\t\tif (range instanceof Comparator) {\n\t\t\t\tthis.raw = range.value;\n\t\t\t\tthis.set = [[range]];\n\t\t\t\tthis.formatted = void 0;\n\t\t\t\treturn this;\n\t\t\t}\n\t\t\tthis.options = options;\n\t\t\tthis.loose = !!options.loose;\n\t\t\tthis.includePrerelease = !!options.includePrerelease;\n\t\t\tthis.raw = range.trim().replace(SPACE_CHARACTERS, \" \");\n\t\t\tthis.set = this.raw.split(\"||\").map((r) => this.parseRange(r.trim())).filter((c) => c.length);\n\t\t\tif (!this.set.length) throw new TypeError(`Invalid SemVer Range: ${this.raw}`);\n\t\t\tif (this.set.length > 1) {\n\t\t\t\tconst first = this.set[0];\n\t\t\t\tthis.set = this.set.filter((c) => !isNullSet(c[0]));\n\t\t\t\tif (this.set.length === 0) this.set = [first];\n\t\t\t\telse if (this.set.length > 1) {\n\t\t\t\t\tfor (const c of this.set) if (c.length === 1 && isAny(c[0])) {\n\t\t\t\t\t\tthis.set = [c];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.formatted = void 0;\n\t\t}\n\t\tget range() {\n\t\t\tif (this.formatted === void 0) {\n\t\t\t\tthis.formatted = \"\";\n\t\t\t\tfor (let i = 0; i < this.set.length; i++) {\n\t\t\t\t\tif (i > 0) this.formatted += \"||\";\n\t\t\t\t\tconst comps = this.set[i];\n\t\t\t\t\tfor (let k = 0; k < comps.length; k++) {\n\t\t\t\t\t\tif (k > 0) this.formatted += \" \";\n\t\t\t\t\t\tthis.formatted += comps[k].toString().trim();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn this.formatted;\n\t\t}\n\t\tformat() {\n\t\t\treturn this.range;\n\t\t}\n\t\ttoString() {\n\t\t\treturn this.range;\n\t\t}\n\t\tparseRange(range) {\n\t\t\tconst memoKey = ((this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE)) + \":\" + range;\n\t\t\tconst cached = cache.get(memoKey);\n\t\t\tif (cached) return cached;\n\t\t\tconst loose = this.options.loose;\n\t\t\tconst hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];\n\t\t\trange = range.replace(hr, hyphenReplace(this.options.includePrerelease));\n\t\t\tdebug(\"hyphen replace\", range);\n\t\t\trange = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);\n\t\t\tdebug(\"comparator trim\", range);\n\t\t\trange = range.replace(re[t.TILDETRIM], tildeTrimReplace);\n\t\t\tdebug(\"tilde trim\", range);\n\t\t\trange = range.replace(re[t.CARETTRIM], caretTrimReplace);\n\t\t\tdebug(\"caret trim\", range);\n\t\t\tlet rangeList = range.split(\" \").map((comp) => parseComparator(comp, this.options)).join(\" \").split(/\\s+/).map((comp) => replaceGTE0(comp, this.options));\n\t\t\tif (loose) rangeList = rangeList.filter((comp) => {\n\t\t\t\tdebug(\"loose invalid filter\", comp, this.options);\n\t\t\t\treturn !!comp.match(re[t.COMPARATORLOOSE]);\n\t\t\t});\n\t\t\tdebug(\"range list\", rangeList);\n\t\t\tconst rangeMap = /* @__PURE__ */ new Map();\n\t\t\tconst comparators = rangeList.map((comp) => new Comparator(comp, this.options));\n\t\t\tfor (const comp of comparators) {\n\t\t\t\tif (isNullSet(comp)) return [comp];\n\t\t\t\trangeMap.set(comp.value, comp);\n\t\t\t}\n\t\t\tif (rangeMap.size > 1 && rangeMap.has(\"\")) rangeMap.delete(\"\");\n\t\t\tconst result = [...rangeMap.values()];\n\t\t\tcache.set(memoKey, result);\n\t\t\treturn result;\n\t\t}\n\t\tintersects(range, options) {\n\t\t\tif (!(range instanceof Range)) throw new TypeError(\"a Range is required\");\n\t\t\treturn this.set.some((thisComparators) => {\n\t\t\t\treturn isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => {\n\t\t\t\t\treturn isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {\n\t\t\t\t\t\treturn rangeComparators.every((rangeComparator) => {\n\t\t\t\t\t\t\treturn thisComparator.intersects(rangeComparator, options);\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t\ttest(version) {\n\t\t\tif (!version) return false;\n\t\t\tif (typeof version === \"string\") try {\n\t\t\t\tversion = new SemVer(version, this.options);\n\t\t\t} catch (er) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tfor (let i = 0; i < this.set.length; i++) if (testSet(this.set[i], version, this.options)) return true;\n\t\t\treturn false;\n\t\t}\n\t};\n\tconst cache = new (require_lrucache())();\n\tconst parseOptions = require_parse_options();\n\tconst Comparator = require_comparator();\n\tconst debug = require_debug();\n\tconst SemVer = require_semver$1();\n\tconst { safeRe: re, t, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace } = require_re();\n\tconst { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();\n\tconst isNullSet = (c) => c.value === \"<0.0.0-0\";\n\tconst isAny = (c) => c.value === \"\";\n\tconst isSatisfiable = (comparators, options) => {\n\t\tlet result = true;\n\t\tconst remainingComparators = comparators.slice();\n\t\tlet testComparator = remainingComparators.pop();\n\t\twhile (result && remainingComparators.length) {\n\t\t\tresult = remainingComparators.every((otherComparator) => {\n\t\t\t\treturn testComparator.intersects(otherComparator, options);\n\t\t\t});\n\t\t\ttestComparator = remainingComparators.pop();\n\t\t}\n\t\treturn result;\n\t};\n\tconst parseComparator = (comp, options) => {\n\t\tcomp = comp.replace(re[t.BUILD], \"\");\n\t\tdebug(\"comp\", comp, options);\n\t\tcomp = replaceCarets(comp, options);\n\t\tdebug(\"caret\", comp);\n\t\tcomp = replaceTildes(comp, options);\n\t\tdebug(\"tildes\", comp);\n\t\tcomp = replaceXRanges(comp, options);\n\t\tdebug(\"xrange\", comp);\n\t\tcomp = replaceStars(comp, options);\n\t\tdebug(\"stars\", comp);\n\t\treturn comp;\n\t};\n\tconst isX = (id) => !id || id.toLowerCase() === \"x\" || id === \"*\";\n\tconst replaceTildes = (comp, options) => {\n\t\treturn comp.trim().split(/\\s+/).map((c) => replaceTilde(c, options)).join(\" \");\n\t};\n\tconst replaceTilde = (comp, options) => {\n\t\tconst r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];\n\t\treturn comp.replace(r, (_, M, m, p, pr) => {\n\t\t\tdebug(\"tilde\", comp, _, M, m, p, pr);\n\t\t\tlet ret;\n\t\t\tif (isX(M)) ret = \"\";\n\t\t\telse if (isX(m)) ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;\n\t\t\telse if (isX(p)) ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;\n\t\t\telse if (pr) {\n\t\t\t\tdebug(\"replaceTilde pr\", pr);\n\t\t\t\tret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;\n\t\t\t} else ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;\n\t\t\tdebug(\"tilde return\", ret);\n\t\t\treturn ret;\n\t\t});\n\t};\n\tconst replaceCarets = (comp, options) => {\n\t\treturn comp.trim().split(/\\s+/).map((c) => replaceCaret(c, options)).join(\" \");\n\t};\n\tconst replaceCaret = (comp, options) => {\n\t\tdebug(\"caret\", comp, options);\n\t\tconst r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];\n\t\tconst z = options.includePrerelease ? \"-0\" : \"\";\n\t\treturn comp.replace(r, (_, M, m, p, pr) => {\n\t\t\tdebug(\"caret\", comp, _, M, m, p, pr);\n\t\t\tlet ret;\n\t\t\tif (isX(M)) ret = \"\";\n\t\t\telse if (isX(m)) ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;\n\t\t\telse if (isX(p)) if (M === \"0\") ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;\n\t\t\telse ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;\n\t\t\telse if (pr) {\n\t\t\t\tdebug(\"replaceCaret pr\", pr);\n\t\t\t\tif (M === \"0\") if (m === \"0\") ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;\n\t\t\t\telse ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;\n\t\t\t\telse ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;\n\t\t\t} else {\n\t\t\t\tdebug(\"no pr\");\n\t\t\t\tif (M === \"0\") if (m === \"0\") ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`;\n\t\t\t\telse ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`;\n\t\t\t\telse ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;\n\t\t\t}\n\t\t\tdebug(\"caret return\", ret);\n\t\t\treturn ret;\n\t\t});\n\t};\n\tconst replaceXRanges = (comp, options) => {\n\t\tdebug(\"replaceXRanges\", comp, options);\n\t\treturn comp.split(/\\s+/).map((c) => replaceXRange(c, options)).join(\" \");\n\t};\n\tconst replaceXRange = (comp, options) => {\n\t\tcomp = comp.trim();\n\t\tconst r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];\n\t\treturn comp.replace(r, (ret, gtlt, M, m, p, pr) => {\n\t\t\tdebug(\"xRange\", comp, ret, gtlt, M, m, p, pr);\n\t\t\tconst xM = isX(M);\n\t\t\tconst xm = xM || isX(m);\n\t\t\tconst xp = xm || isX(p);\n\t\t\tconst anyX = xp;\n\t\t\tif (gtlt === \"=\" && anyX) gtlt = \"\";\n\t\t\tpr = options.includePrerelease ? \"-0\" : \"\";\n\t\t\tif (xM) if (gtlt === \">\" || gtlt === \"<\") ret = \"<0.0.0-0\";\n\t\t\telse ret = \"*\";\n\t\t\telse if (gtlt && anyX) {\n\t\t\t\tif (xm) m = 0;\n\t\t\t\tp = 0;\n\t\t\t\tif (gtlt === \">\") {\n\t\t\t\t\tgtlt = \">=\";\n\t\t\t\t\tif (xm) {\n\t\t\t\t\t\tM = +M + 1;\n\t\t\t\t\t\tm = 0;\n\t\t\t\t\t\tp = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tm = +m + 1;\n\t\t\t\t\t\tp = 0;\n\t\t\t\t\t}\n\t\t\t\t} else if (gtlt === \"<=\") {\n\t\t\t\t\tgtlt = \"<\";\n\t\t\t\t\tif (xm) M = +M + 1;\n\t\t\t\t\telse m = +m + 1;\n\t\t\t\t}\n\t\t\t\tif (gtlt === \"<\") pr = \"-0\";\n\t\t\t\tret = `${gtlt + M}.${m}.${p}${pr}`;\n\t\t\t} else if (xm) ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;\n\t\t\telse if (xp) ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;\n\t\t\tdebug(\"xRange return\", ret);\n\t\t\treturn ret;\n\t\t});\n\t};\n\tconst replaceStars = (comp, options) => {\n\t\tdebug(\"replaceStars\", comp, options);\n\t\treturn comp.trim().replace(re[t.STAR], \"\");\n\t};\n\tconst replaceGTE0 = (comp, options) => {\n\t\tdebug(\"replaceGTE0\", comp, options);\n\t\treturn comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], \"\");\n\t};\n\tconst hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {\n\t\tif (isX(fM)) from = \"\";\n\t\telse if (isX(fm)) from = `>=${fM}.0.0${incPr ? \"-0\" : \"\"}`;\n\t\telse if (isX(fp)) from = `>=${fM}.${fm}.0${incPr ? \"-0\" : \"\"}`;\n\t\telse if (fpr) from = `>=${from}`;\n\t\telse from = `>=${from}${incPr ? \"-0\" : \"\"}`;\n\t\tif (isX(tM)) to = \"\";\n\t\telse if (isX(tm)) to = `<${+tM + 1}.0.0-0`;\n\t\telse if (isX(tp)) to = `<${tM}.${+tm + 1}.0-0`;\n\t\telse if (tpr) to = `<=${tM}.${tm}.${tp}-${tpr}`;\n\t\telse if (incPr) to = `<${tM}.${tm}.${+tp + 1}-0`;\n\t\telse to = `<=${to}`;\n\t\treturn `${from} ${to}`.trim();\n\t};\n\tconst testSet = (set, version, options) => {\n\t\tfor (let i = 0; i < set.length; i++) if (!set[i].test(version)) return false;\n\t\tif (version.prerelease.length && !options.includePrerelease) {\n\t\t\tfor (let i = 0; i < set.length; i++) {\n\t\t\t\tdebug(set[i].semver);\n\t\t\t\tif (set[i].semver === Comparator.ANY) continue;\n\t\t\t\tif (set[i].semver.prerelease.length > 0) {\n\t\t\t\t\tconst allowed = set[i].semver;\n\t\t\t\t\tif (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) return true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t};\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/classes/comparator.js\nvar require_comparator = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst ANY = Symbol(\"SemVer ANY\");\n\tmodule.exports = class Comparator {\n\t\tstatic get ANY() {\n\t\t\treturn ANY;\n\t\t}\n\t\tconstructor(comp, options) {\n\t\t\toptions = parseOptions(options);\n\t\t\tif (comp instanceof Comparator) if (comp.loose === !!options.loose) return comp;\n\t\t\telse comp = comp.value;\n\t\t\tcomp = comp.trim().split(/\\s+/).join(\" \");\n\t\t\tdebug(\"comparator\", comp, options);\n\t\t\tthis.options = options;\n\t\t\tthis.loose = !!options.loose;\n\t\t\tthis.parse(comp);\n\t\t\tif (this.semver === ANY) this.value = \"\";\n\t\t\telse this.value = this.operator + this.semver.version;\n\t\t\tdebug(\"comp\", this);\n\t\t}\n\t\tparse(comp) {\n\t\t\tconst r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];\n\t\t\tconst m = comp.match(r);\n\t\t\tif (!m) throw new TypeError(`Invalid comparator: ${comp}`);\n\t\t\tthis.operator = m[1] !== void 0 ? m[1] : \"\";\n\t\t\tif (this.operator === \"=\") this.operator = \"\";\n\t\t\tif (!m[2]) this.semver = ANY;\n\t\t\telse this.semver = new SemVer(m[2], this.options.loose);\n\t\t}\n\t\ttoString() {\n\t\t\treturn this.value;\n\t\t}\n\t\ttest(version) {\n\t\t\tdebug(\"Comparator.test\", version, this.options.loose);\n\t\t\tif (this.semver === ANY || version === ANY) return true;\n\t\t\tif (typeof version === \"string\") try {\n\t\t\t\tversion = new SemVer(version, this.options);\n\t\t\t} catch (er) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn cmp(version, this.operator, this.semver, this.options);\n\t\t}\n\t\tintersects(comp, options) {\n\t\t\tif (!(comp instanceof Comparator)) throw new TypeError(\"a Comparator is required\");\n\t\t\tif (this.operator === \"\") {\n\t\t\t\tif (this.value === \"\") return true;\n\t\t\t\treturn new Range(comp.value, options).test(this.value);\n\t\t\t} else if (comp.operator === \"\") {\n\t\t\t\tif (comp.value === \"\") return true;\n\t\t\t\treturn new Range(this.value, options).test(comp.semver);\n\t\t\t}\n\t\t\toptions = parseOptions(options);\n\t\t\tif (options.includePrerelease && (this.value === \"<0.0.0-0\" || comp.value === \"<0.0.0-0\")) return false;\n\t\t\tif (!options.includePrerelease && (this.value.startsWith(\"<0.0.0\") || comp.value.startsWith(\"<0.0.0\"))) return false;\n\t\t\tif (this.operator.startsWith(\">\") && comp.operator.startsWith(\">\")) return true;\n\t\t\tif (this.operator.startsWith(\"<\") && comp.operator.startsWith(\"<\")) return true;\n\t\t\tif (this.semver.version === comp.semver.version && this.operator.includes(\"=\") && comp.operator.includes(\"=\")) return true;\n\t\t\tif (cmp(this.semver, \"<\", comp.semver, options) && this.operator.startsWith(\">\") && comp.operator.startsWith(\"<\")) return true;\n\t\t\tif (cmp(this.semver, \">\", comp.semver, options) && this.operator.startsWith(\"<\") && comp.operator.startsWith(\">\")) return true;\n\t\t\treturn false;\n\t\t}\n\t};\n\tconst parseOptions = require_parse_options();\n\tconst { safeRe: re, t } = require_re();\n\tconst cmp = require_cmp();\n\tconst debug = require_debug();\n\tconst SemVer = require_semver$1();\n\tconst Range = require_range();\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/satisfies.js\nvar require_satisfies = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst Range = require_range();\n\tconst satisfies = (version, range, options) => {\n\t\ttry {\n\t\t\trange = new Range(range, options);\n\t\t} catch (er) {\n\t\t\treturn false;\n\t\t}\n\t\treturn range.test(version);\n\t};\n\tmodule.exports = satisfies;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/ranges/to-comparators.js\nvar require_to_comparators = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst Range = require_range();\n\tconst toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(\" \").trim().split(\" \"));\n\tmodule.exports = toComparators;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/ranges/max-satisfying.js\nvar require_max_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst SemVer = require_semver$1();\n\tconst Range = require_range();\n\tconst maxSatisfying = (versions, range, options) => {\n\t\tlet max = null;\n\t\tlet maxSV = null;\n\t\tlet rangeObj = null;\n\t\ttry {\n\t\t\trangeObj = new Range(range, options);\n\t\t} catch (er) {\n\t\t\treturn null;\n\t\t}\n\t\tversions.forEach((v) => {\n\t\t\tif (rangeObj.test(v)) {\n\t\t\t\tif (!max || maxSV.compare(v) === -1) {\n\t\t\t\t\tmax = v;\n\t\t\t\t\tmaxSV = new SemVer(max, options);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn max;\n\t};\n\tmodule.exports = maxSatisfying;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/ranges/min-satisfying.js\nvar require_min_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst SemVer = require_semver$1();\n\tconst Range = require_range();\n\tconst minSatisfying = (versions, range, options) => {\n\t\tlet min = null;\n\t\tlet minSV = null;\n\t\tlet rangeObj = null;\n\t\ttry {\n\t\t\trangeObj = new Range(range, options);\n\t\t} catch (er) {\n\t\t\treturn null;\n\t\t}\n\t\tversions.forEach((v) => {\n\t\t\tif (rangeObj.test(v)) {\n\t\t\t\tif (!min || minSV.compare(v) === 1) {\n\t\t\t\t\tmin = v;\n\t\t\t\t\tminSV = new SemVer(min, options);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn min;\n\t};\n\tmodule.exports = minSatisfying;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/ranges/min-version.js\nvar require_min_version = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst SemVer = require_semver$1();\n\tconst Range = require_range();\n\tconst gt = require_gt();\n\tconst minVersion = (range, loose) => {\n\t\trange = new Range(range, loose);\n\t\tlet minver = new SemVer(\"0.0.0\");\n\t\tif (range.test(minver)) return minver;\n\t\tminver = new SemVer(\"0.0.0-0\");\n\t\tif (range.test(minver)) return minver;\n\t\tminver = null;\n\t\tfor (let i = 0; i < range.set.length; ++i) {\n\t\t\tconst comparators = range.set[i];\n\t\t\tlet setMin = null;\n\t\t\tcomparators.forEach((comparator) => {\n\t\t\t\tconst compver = new SemVer(comparator.semver.version);\n\t\t\t\tswitch (comparator.operator) {\n\t\t\t\t\tcase \">\":\n\t\t\t\t\t\tif (compver.prerelease.length === 0) compver.patch++;\n\t\t\t\t\t\telse compver.prerelease.push(0);\n\t\t\t\t\t\tcompver.raw = compver.format();\n\t\t\t\t\tcase \"\":\n\t\t\t\t\tcase \">=\":\n\t\t\t\t\t\tif (!setMin || gt(compver, setMin)) setMin = compver;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"<\":\n\t\t\t\t\tcase \"<=\": break;\n\t\t\t\t\tdefault: throw new Error(`Unexpected operation: ${comparator.operator}`);\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (setMin && (!minver || gt(minver, setMin))) minver = setMin;\n\t\t}\n\t\tif (minver && range.test(minver)) return minver;\n\t\treturn null;\n\t};\n\tmodule.exports = minVersion;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/ranges/valid.js\nvar require_valid = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst Range = require_range();\n\tconst validRange = (range, options) => {\n\t\ttry {\n\t\t\treturn new Range(range, options).range || \"*\";\n\t\t} catch (er) {\n\t\t\treturn null;\n\t\t}\n\t};\n\tmodule.exports = validRange;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/ranges/outside.js\nvar require_outside = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst SemVer = require_semver$1();\n\tconst Comparator = require_comparator();\n\tconst { ANY } = Comparator;\n\tconst Range = require_range();\n\tconst satisfies = require_satisfies();\n\tconst gt = require_gt();\n\tconst lt = require_lt();\n\tconst lte = require_lte();\n\tconst gte = require_gte();\n\tconst outside = (version, range, hilo, options) => {\n\t\tversion = new SemVer(version, options);\n\t\trange = new Range(range, options);\n\t\tlet gtfn, ltefn, ltfn, comp, ecomp;\n\t\tswitch (hilo) {\n\t\t\tcase \">\":\n\t\t\t\tgtfn = gt;\n\t\t\t\tltefn = lte;\n\t\t\t\tltfn = lt;\n\t\t\t\tcomp = \">\";\n\t\t\t\tecomp = \">=\";\n\t\t\t\tbreak;\n\t\t\tcase \"<\":\n\t\t\t\tgtfn = lt;\n\t\t\t\tltefn = gte;\n\t\t\t\tltfn = gt;\n\t\t\t\tcomp = \"<\";\n\t\t\t\tecomp = \"<=\";\n\t\t\t\tbreak;\n\t\t\tdefault: throw new TypeError(\"Must provide a hilo val of \\\"<\\\" or \\\">\\\"\");\n\t\t}\n\t\tif (satisfies(version, range, options)) return false;\n\t\tfor (let i = 0; i < range.set.length; ++i) {\n\t\t\tconst comparators = range.set[i];\n\t\t\tlet high = null;\n\t\t\tlet low = null;\n\t\t\tcomparators.forEach((comparator) => {\n\t\t\t\tif (comparator.semver === ANY) comparator = new Comparator(\">=0.0.0\");\n\t\t\t\thigh = high || comparator;\n\t\t\t\tlow = low || comparator;\n\t\t\t\tif (gtfn(comparator.semver, high.semver, options)) high = comparator;\n\t\t\t\telse if (ltfn(comparator.semver, low.semver, options)) low = comparator;\n\t\t\t});\n\t\t\tif (high.operator === comp || high.operator === ecomp) return false;\n\t\t\tif ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) return false;\n\t\t\telse if (low.operator === ecomp && ltfn(version, low.semver)) return false;\n\t\t}\n\t\treturn true;\n\t};\n\tmodule.exports = outside;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/ranges/gtr.js\nvar require_gtr = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst outside = require_outside();\n\tconst gtr = (version, range, options) => outside(version, range, \">\", options);\n\tmodule.exports = gtr;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/ranges/ltr.js\nvar require_ltr = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst outside = require_outside();\n\tconst ltr = (version, range, options) => outside(version, range, \"<\", options);\n\tmodule.exports = ltr;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/ranges/intersects.js\nvar require_intersects = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst Range = require_range();\n\tconst intersects = (r1, r2, options) => {\n\t\tr1 = new Range(r1, options);\n\t\tr2 = new Range(r2, options);\n\t\treturn r1.intersects(r2, options);\n\t};\n\tmodule.exports = intersects;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/ranges/simplify.js\nvar require_simplify = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst satisfies = require_satisfies();\n\tconst compare = require_compare();\n\tmodule.exports = (versions, range, options) => {\n\t\tconst set = [];\n\t\tlet first = null;\n\t\tlet prev = null;\n\t\tconst v = versions.sort((a, b) => compare(a, b, options));\n\t\tfor (const version of v) if (satisfies(version, range, options)) {\n\t\t\tprev = version;\n\t\t\tif (!first) first = version;\n\t\t} else {\n\t\t\tif (prev) set.push([first, prev]);\n\t\t\tprev = null;\n\t\t\tfirst = null;\n\t\t}\n\t\tif (first) set.push([first, null]);\n\t\tconst ranges = [];\n\t\tfor (const [min, max] of set) if (min === max) ranges.push(min);\n\t\telse if (!max && min === v[0]) ranges.push(\"*\");\n\t\telse if (!max) ranges.push(`>=${min}`);\n\t\telse if (min === v[0]) ranges.push(`<=${max}`);\n\t\telse ranges.push(`${min} - ${max}`);\n\t\tconst simplified = ranges.join(\" || \");\n\t\tconst original = typeof range.raw === \"string\" ? range.raw : String(range);\n\t\treturn simplified.length < original.length ? simplified : range;\n\t};\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/ranges/subset.js\nvar require_subset = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst Range = require_range();\n\tconst Comparator = require_comparator();\n\tconst { ANY } = Comparator;\n\tconst satisfies = require_satisfies();\n\tconst compare = require_compare();\n\tconst subset = (sub, dom, options = {}) => {\n\t\tif (sub === dom) return true;\n\t\tsub = new Range(sub, options);\n\t\tdom = new Range(dom, options);\n\t\tlet sawNonNull = false;\n\t\tOUTER: for (const simpleSub of sub.set) {\n\t\t\tfor (const simpleDom of dom.set) {\n\t\t\t\tconst isSub = simpleSubset(simpleSub, simpleDom, options);\n\t\t\t\tsawNonNull = sawNonNull || isSub !== null;\n\t\t\t\tif (isSub) continue OUTER;\n\t\t\t}\n\t\t\tif (sawNonNull) return false;\n\t\t}\n\t\treturn true;\n\t};\n\tconst minimumVersionWithPreRelease = [new Comparator(\">=0.0.0-0\")];\n\tconst minimumVersion = [new Comparator(\">=0.0.0\")];\n\tconst simpleSubset = (sub, dom, options) => {\n\t\tif (sub === dom) return true;\n\t\tif (sub.length === 1 && sub[0].semver === ANY) if (dom.length === 1 && dom[0].semver === ANY) return true;\n\t\telse if (options.includePrerelease) sub = minimumVersionWithPreRelease;\n\t\telse sub = minimumVersion;\n\t\tif (dom.length === 1 && dom[0].semver === ANY) if (options.includePrerelease) return true;\n\t\telse dom = minimumVersion;\n\t\tconst eqSet = /* @__PURE__ */ new Set();\n\t\tlet gt, lt;\n\t\tfor (const c of sub) if (c.operator === \">\" || c.operator === \">=\") gt = higherGT(gt, c, options);\n\t\telse if (c.operator === \"<\" || c.operator === \"<=\") lt = lowerLT(lt, c, options);\n\t\telse eqSet.add(c.semver);\n\t\tif (eqSet.size > 1) return null;\n\t\tlet gtltComp;\n\t\tif (gt && lt) {\n\t\t\tgtltComp = compare(gt.semver, lt.semver, options);\n\t\t\tif (gtltComp > 0) return null;\n\t\t\telse if (gtltComp === 0 && (gt.operator !== \">=\" || lt.operator !== \"<=\")) return null;\n\t\t}\n\t\tfor (const eq of eqSet) {\n\t\t\tif (gt && !satisfies(eq, String(gt), options)) return null;\n\t\t\tif (lt && !satisfies(eq, String(lt), options)) return null;\n\t\t\tfor (const c of dom) if (!satisfies(eq, String(c), options)) return false;\n\t\t\treturn true;\n\t\t}\n\t\tlet higher, lower;\n\t\tlet hasDomLT, hasDomGT;\n\t\tlet needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false;\n\t\tlet needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false;\n\t\tif (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === \"<\" && needDomLTPre.prerelease[0] === 0) needDomLTPre = false;\n\t\tfor (const c of dom) {\n\t\t\thasDomGT = hasDomGT || c.operator === \">\" || c.operator === \">=\";\n\t\t\thasDomLT = hasDomLT || c.operator === \"<\" || c.operator === \"<=\";\n\t\t\tif (gt) {\n\t\t\t\tif (needDomGTPre) {\n\t\t\t\t\tif (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) needDomGTPre = false;\n\t\t\t\t}\n\t\t\t\tif (c.operator === \">\" || c.operator === \">=\") {\n\t\t\t\t\thigher = higherGT(gt, c, options);\n\t\t\t\t\tif (higher === c && higher !== gt) return false;\n\t\t\t\t} else if (gt.operator === \">=\" && !satisfies(gt.semver, String(c), options)) return false;\n\t\t\t}\n\t\t\tif (lt) {\n\t\t\t\tif (needDomLTPre) {\n\t\t\t\t\tif (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) needDomLTPre = false;\n\t\t\t\t}\n\t\t\t\tif (c.operator === \"<\" || c.operator === \"<=\") {\n\t\t\t\t\tlower = lowerLT(lt, c, options);\n\t\t\t\t\tif (lower === c && lower !== lt) return false;\n\t\t\t\t} else if (lt.operator === \"<=\" && !satisfies(lt.semver, String(c), options)) return false;\n\t\t\t}\n\t\t\tif (!c.operator && (lt || gt) && gtltComp !== 0) return false;\n\t\t}\n\t\tif (gt && hasDomLT && !lt && gtltComp !== 0) return false;\n\t\tif (lt && hasDomGT && !gt && gtltComp !== 0) return false;\n\t\tif (needDomGTPre || needDomLTPre) return false;\n\t\treturn true;\n\t};\n\tconst higherGT = (a, b, options) => {\n\t\tif (!a) return b;\n\t\tconst comp = compare(a.semver, b.semver, options);\n\t\treturn comp > 0 ? a : comp < 0 ? b : b.operator === \">\" && a.operator === \">=\" ? b : a;\n\t};\n\tconst lowerLT = (a, b, options) => {\n\t\tif (!a) return b;\n\t\tconst comp = compare(a.semver, b.semver, options);\n\t\treturn comp < 0 ? a : comp > 0 ? b : b.operator === \"<\" && a.operator === \"<=\" ? b : a;\n\t};\n\tmodule.exports = subset;\n}));\n//#endregion\n//#region ../internals-helpers/dist/index.js\nvar import_semver = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst internalRe = require_re();\n\tconst constants = require_constants();\n\tconst SemVer = require_semver$1();\n\tconst identifiers = require_identifiers();\n\tmodule.exports = {\n\t\tparse: require_parse(),\n\t\tvalid: require_valid$1(),\n\t\tclean: require_clean(),\n\t\tinc: require_inc(),\n\t\tdiff: require_diff(),\n\t\tmajor: require_major(),\n\t\tminor: require_minor(),\n\t\tpatch: require_patch(),\n\t\tprerelease: require_prerelease(),\n\t\tcompare: require_compare(),\n\t\trcompare: require_rcompare(),\n\t\tcompareLoose: require_compare_loose(),\n\t\tcompareBuild: require_compare_build(),\n\t\tsort: require_sort(),\n\t\trsort: require_rsort(),\n\t\tgt: require_gt(),\n\t\tlt: require_lt(),\n\t\teq: require_eq(),\n\t\tneq: require_neq(),\n\t\tgte: require_gte(),\n\t\tlte: require_lte(),\n\t\tcmp: require_cmp(),\n\t\tcoerce: require_coerce(),\n\t\tComparator: require_comparator(),\n\t\tRange: require_range(),\n\t\tsatisfies: require_satisfies(),\n\t\ttoComparators: require_to_comparators(),\n\t\tmaxSatisfying: require_max_satisfying(),\n\t\tminSatisfying: require_min_satisfying(),\n\t\tminVersion: require_min_version(),\n\t\tvalidRange: require_valid(),\n\t\toutside: require_outside(),\n\t\tgtr: require_gtr(),\n\t\tltr: require_ltr(),\n\t\tintersects: require_intersects(),\n\t\tsimplifyRange: require_simplify(),\n\t\tsubset: require_subset(),\n\t\tSemVer,\n\t\tre: internalRe.re,\n\t\tsrc: internalRe.src,\n\t\ttokens: internalRe.t,\n\t\tSEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,\n\t\tRELEASE_TYPES: constants.RELEASE_TYPES,\n\t\tcompareIdentifiers: identifiers.compareIdentifiers,\n\t\trcompareIdentifiers: identifiers.rcompareIdentifiers\n\t};\n})))(), 1);\nconst ALPHANUMERIC = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n`${ALPHANUMERIC}`, `${ALPHANUMERIC}`, `${ALPHANUMERIC}`, `${ALPHANUMERIC}`;\nfunction resolve(range, versions) {\n\ttry {\n\t\tif (!range || !import_semver.default.validRange(range)) return null;\n\t\tconst validVersions = versions.filter((v) => import_semver.default.valid(v) !== null);\n\t\tif (validVersions.length === 0) return null;\n\t\treturn import_semver.default.maxSatisfying(validVersions, range) ?? null;\n\t} catch {\n\t\treturn null;\n\t}\n}\nfunction isDomainAllowed(domain, allowedDomains) {\n\tfor (const allowed of allowedDomains) {\n\t\tif (allowed === domain) return true;\n\t\tif (allowed.startsWith(\"*.\")) {\n\t\t\tconst suffix = allowed.slice(1);\n\t\t\tif (domain.endsWith(suffix) || domain === allowed.slice(2)) return true;\n\t\t\tif (domain === allowed) return true;\n\t\t}\n\t}\n\treturn false;\n}\nfunction isPathAllowed(requestedPath, allowedPaths) {\n\tconst norm = (p) => p.replaceAll(\"\\\\\", \"/\");\n\tconst req = norm(requestedPath);\n\tif (req.includes(\"..\")) return false;\n\tfor (const allowed of allowedPaths) {\n\t\tconst a = norm(allowed);\n\t\tif (a === req) return true;\n\t\tif (a.endsWith(\"/**\")) {\n\t\t\tconst prefix = a.slice(0, -3);\n\t\t\tif (req === prefix || req.startsWith(`${prefix}/`)) return true;\n\t\t}\n\t}\n\treturn false;\n}\n/**\n* Thrown by checkPermissionBudget when a skill's declared permissions exceed the project budget.\n*\n* internals-helpers cannot import from @tankpkg/sdk (would invert dep graph).\n* sdk shim catches this and re-throws as TankPermissionError to preserve\n* the public sdk error API. See D7 / INTENT C25b.\n*/\nvar PermissionBudgetError = class extends Error {\n\tconstructor(message) {\n\t\tsuper(message);\n\t\tthis.name = \"PermissionBudgetError\";\n\t}\n};\nfunction checkPermissionBudget$1(budget, skillPerms, skillName) {\n\tif (!skillPerms) return;\n\tif (skillPerms.subprocess === true && budget.subprocess !== true) throw new PermissionBudgetError(`${skillName} requires subprocess access, but project budget does not allow it`);\n\tif (skillPerms.network?.outbound && skillPerms.network.outbound.length > 0) {\n\t\tconst budgetDomains = budget.network?.outbound ?? [];\n\t\tfor (const domain of skillPerms.network.outbound) if (!isDomainAllowed(domain, budgetDomains)) throw new PermissionBudgetError(`${skillName} requests network access to \"${domain}\", which is not in the project's permission budget`);\n\t}\n\tif (skillPerms.filesystem?.read && skillPerms.filesystem.read.length > 0) {\n\t\tconst budgetPaths = budget.filesystem?.read ?? [];\n\t\tfor (const p of skillPerms.filesystem.read) if (!isPathAllowed(p, budgetPaths)) throw new PermissionBudgetError(`${skillName} requests filesystem read access to \"${p}\", which is not in the project's permission budget`);\n\t}\n\tif (skillPerms.filesystem?.write && skillPerms.filesystem.write.length > 0) {\n\t\tconst budgetPaths = budget.filesystem?.write ?? [];\n\t\tfor (const p of skillPerms.filesystem.write) if (!isPathAllowed(p, budgetPaths)) throw new PermissionBudgetError(`${skillName} requests filesystem write access to \"${p}\", which is not in the project's permission budget`);\n\t}\n}\nfunction collectPermissionViolations$1(budget, skillPerms, skillName) {\n\tconst violations = [];\n\tif (!skillPerms) return violations;\n\tif (skillPerms.subprocess === true && budget.subprocess !== true) violations.push({\n\t\tskillName,\n\t\ttype: \"subprocess\",\n\t\trequested: \"true\"\n\t});\n\tif (skillPerms.network?.outbound) {\n\t\tconst budgetDomains = budget.network?.outbound ?? [];\n\t\tfor (const domain of skillPerms.network.outbound) if (!isDomainAllowed(domain, budgetDomains)) violations.push({\n\t\t\tskillName,\n\t\t\ttype: \"network.outbound\",\n\t\t\trequested: domain\n\t\t});\n\t}\n\tif (skillPerms.filesystem?.read) {\n\t\tconst budgetPaths = budget.filesystem?.read ?? [];\n\t\tfor (const p of skillPerms.filesystem.read) if (!isPathAllowed(p, budgetPaths)) violations.push({\n\t\t\tskillName,\n\t\t\ttype: \"filesystem.read\",\n\t\t\trequested: p\n\t\t});\n\t}\n\tif (skillPerms.filesystem?.write) {\n\t\tconst budgetPaths = budget.filesystem?.write ?? [];\n\t\tfor (const p of skillPerms.filesystem.write) if (!isPathAllowed(p, budgetPaths)) violations.push({\n\t\t\tskillName,\n\t\t\ttype: \"filesystem.write\",\n\t\t\trequested: p\n\t\t});\n\t}\n\treturn violations;\n}\n//#endregion\n//#region src/install/permissions.ts\nfunction checkPermissionBudget(budget, skillPerms, skillName) {\n\ttry {\n\t\tcheckPermissionBudget$1(budget, skillPerms, skillName);\n\t} catch (e) {\n\t\tif (e instanceof PermissionBudgetError) throw new TankPermissionError(e.message);\n\t\tthrow e;\n\t}\n}\nfunction collectPermissionViolations(budget, skillPerms, skillName) {\n\treturn collectPermissionViolations$1(budget, skillPerms, skillName);\n}\n//#endregion\n//#region src/install/resolver.ts\nfunction buildSkillKey(name, version) {\n\treturn `${name}@${version}`;\n}\nfunction formatConflictMessage(conflict) {\n\tconst lines = [`Version conflict for ${conflict.skillName}:`];\n\tfor (const req of conflict.requirements) {\n\t\tconst origin = req.source.kind === \"root\" ? \"root\" : req.source.from ?? \"unknown\";\n\t\tlines.push(` - ${req.range} (required by ${origin})`);\n\t}\n\tlines.push(`Available versions: ${conflict.availableVersions.join(\", \")}`);\n\tlines.push(\"No single version satisfies all constraints.\");\n\treturn lines.join(\"\\n\");\n}\nasync function resolveDependencyTree(rootDependencies, fetcher) {\n\tconst constraintsByName = /* @__PURE__ */ new Map();\n\tconst selectedByName = /* @__PURE__ */ new Map();\n\tconst metadataCache = /* @__PURE__ */ new Map();\n\tconst versionsCache = /* @__PURE__ */ new Map();\n\tconst contributedDeps = /* @__PURE__ */ new Map();\n\tconst queue = /* @__PURE__ */ new Set();\n\tconst inProgress = /* @__PURE__ */ new Set();\n\tconst sortedRootNames = Object.keys(rootDependencies).sort();\n\tfor (const name of sortedRootNames) {\n\t\tconst range = rootDependencies[name];\n\t\tconstraintsByName.set(name, [{\n\t\t\tname,\n\t\t\trange,\n\t\t\tsource: { kind: \"root\" }\n\t\t}]);\n\t\tqueue.add(name);\n\t}\n\tconst MAX_ITERATIONS = 1e4;\n\tlet iterations = 0;\n\twhile (queue.size > 0) {\n\t\tif (++iterations > MAX_ITERATIONS) throw new Error(`Dependency resolution exceeded ${MAX_ITERATIONS} iterations. This likely indicates a degenerate dependency graph.`);\n\t\tconst name = [...queue].sort()[0];\n\t\tqueue.delete(name);\n\t\tif (inProgress.has(name)) continue;\n\t\tconst constraints = constraintsByName.get(name);\n\t\tif (!constraints || constraints.length === 0) continue;\n\t\tlet versionInfos = versionsCache.get(name);\n\t\tif (!versionInfos) {\n\t\t\tversionInfos = await fetcher.fetchVersions(name);\n\t\t\tversionsCache.set(name, versionInfos);\n\t\t}\n\t\tconst availableVersions = versionInfos.map((v) => v.version).sort();\n\t\tconst selectedVersion = findSatisfyingVersion(availableVersions, constraints);\n\t\tif (selectedVersion === null) throw new Error(formatConflictMessage({\n\t\t\tskillName: name,\n\t\t\trequirements: constraints,\n\t\t\tavailableVersions\n\t\t}));\n\t\tconst previousVersion = selectedByName.get(name);\n\t\tif (previousVersion === selectedVersion) continue;\n\t\tinProgress.add(name);\n\t\tif (previousVersion !== void 0) {\n\t\t\tconst prevKey = buildSkillKey(name, previousVersion);\n\t\t\tconst prevDeps = contributedDeps.get(prevKey) ?? [];\n\t\t\tfor (const depName of prevDeps) {\n\t\t\t\tconst depConstraints = constraintsByName.get(depName);\n\t\t\t\tif (depConstraints) {\n\t\t\t\t\tconst filtered = depConstraints.filter((r) => r.source.from !== prevKey);\n\t\t\t\t\tif (filtered.length > 0) constraintsByName.set(depName, filtered);\n\t\t\t\t\telse constraintsByName.delete(depName);\n\t\t\t\t\tqueue.add(depName);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcontributedDeps.delete(prevKey);\n\t\t}\n\t\tselectedByName.set(name, selectedVersion);\n\t\tconst skillKey = buildSkillKey(name, selectedVersion);\n\t\tlet meta = metadataCache.get(skillKey);\n\t\tif (!meta) {\n\t\t\tmeta = await fetcher.fetchMetadata(name, selectedVersion);\n\t\t\tmetadataCache.set(skillKey, meta);\n\t\t}\n\t\tconst depNames = [];\n\t\tconst sortedDepEntries = Object.entries(meta.dependencies).sort(([a], [b]) => a.localeCompare(b));\n\t\tfor (const [depName, depRange] of sortedDepEntries) {\n\t\t\tdepNames.push(depName);\n\t\t\tconst requirement = {\n\t\t\t\tname: depName,\n\t\t\t\trange: depRange,\n\t\t\t\tsource: {\n\t\t\t\t\tkind: \"skill\",\n\t\t\t\t\tfrom: skillKey\n\t\t\t\t}\n\t\t\t};\n\t\t\tconst existing = constraintsByName.get(depName) ?? [];\n\t\t\texisting.push(requirement);\n\t\t\tconstraintsByName.set(depName, existing);\n\t\t\tqueue.add(depName);\n\t\t}\n\t\tcontributedDeps.set(skillKey, depNames);\n\t\tinProgress.delete(name);\n\t}\n\tfor (const [name] of selectedByName) {\n\t\tconst constraints = constraintsByName.get(name);\n\t\tif (!constraints || constraints.length === 0) selectedByName.delete(name);\n\t}\n\treturn buildGraph(selectedByName, metadataCache);\n}\nfunction findSatisfyingVersion(availableVersions, constraints) {\n\tconst satisfyingSets = [...new Set(constraints.map((c) => c.range))].map((range) => {\n\t\tconst matching = /* @__PURE__ */ new Set();\n\t\tfor (const v of availableVersions) if (resolve(range, [v]) !== null) matching.add(v);\n\t\treturn matching;\n\t});\n\tif (satisfyingSets.length === 0) return null;\n\tlet intersection = satisfyingSets[0];\n\tfor (let i = 1; i < satisfyingSets.length; i++) intersection = new Set([...intersection].filter((v) => satisfyingSets[i].has(v)));\n\tif (intersection.size === 0) return null;\n\treturn resolve(\"*\", [...intersection]);\n}\nfunction buildGraph(selectedByName, metadataCache) {\n\tconst nodes = /* @__PURE__ */ new Map();\n\tconst installOrder = [];\n\tconst sortedEntries = [...selectedByName.entries()].sort(([a], [b]) => a.localeCompare(b));\n\tfor (const [name, version] of sortedEntries) {\n\t\tconst skillKey = buildSkillKey(name, version);\n\t\tconst meta = metadataCache.get(skillKey);\n\t\tif (!meta) throw new Error(`Internal error: missing metadata for ${skillKey}`);\n\t\tconst resolvedDeps = {};\n\t\tconst sortedDepNames = Object.keys(meta.dependencies).sort();\n\t\tfor (const depName of sortedDepNames) {\n\t\t\tconst depVersion = selectedByName.get(depName);\n\t\t\tif (depVersion === void 0) throw new Error(`Internal error: ${skillKey} depends on ${depName} but it was not resolved`);\n\t\t\tresolvedDeps[depName] = depVersion;\n\t\t}\n\t\tnodes.set(name, {\n\t\t\tname,\n\t\t\tversion,\n\t\t\tmeta,\n\t\t\tdependencies: resolvedDeps\n\t\t});\n\t\tinstallOrder.push(skillKey);\n\t}\n\treturn {\n\t\tnodes,\n\t\tinstallOrder\n\t};\n}\n//#endregion\n//#region src/install/pipeline.ts\nconst MAX_DOWNLOAD_BYTES = 100 * 1024 * 1024;\nconst MAX_EXTRACT_ENTRIES = 1e4;\nconst MAX_EXTRACT_FILE_BYTES = 50 * 1024 * 1024;\nconst MAX_EXTRACT_TOTAL_BYTES = 500 * 1024 * 1024;\nfunction validateDownloadUrl(url) {\n\tlet parsed;\n\ttry {\n\t\tparsed = new URL(url);\n\t} catch {\n\t\tthrow new TankNetworkError(`Invalid download URL: ${url}`);\n\t}\n\tif (parsed.protocol !== \"https:\" && parsed.protocol !== \"http:\") throw new TankNetworkError(`Download URL must use https or http: ${url}`);\n\tif (parsed.username || parsed.password) throw new TankNetworkError(`Download URL must not contain credentials: ${url}`);\n}\nasync function downloadAllParallel(nodes, onProgress) {\n\tconst results = /* @__PURE__ */ new Map();\n\tconst CONCURRENCY_LIMIT = 8;\n\tfor (let i = 0; i < nodes.length; i += CONCURRENCY_LIMIT) {\n\t\tconst promises = nodes.slice(i, i + CONCURRENCY_LIMIT).map(async (node) => {\n\t\t\tonProgress?.(`Downloading ${node.name}@${node.version}...`);\n\t\t\tvalidateDownloadUrl(node.meta.downloadUrl);\n\t\t\tlet res;\n\t\t\ttry {\n\t\t\t\tres = await fetch(node.meta.downloadUrl, { redirect: \"manual\" });\n\t\t\t} catch (err) {\n\t\t\t\tthrow new TankNetworkError(`Network error downloading ${node.name}@${node.version}`, err instanceof Error ? err : void 0);\n\t\t\t}\n\t\t\tif (res.status >= 300 && res.status < 400) throw new TankNetworkError(`Unexpected redirect (${res.status}) downloading ${node.name}@${node.version}. Refusing to follow.`);\n\t\t\tif (!res.ok) throw new TankNetworkError(`Failed to download ${node.name}@${node.version}: ${res.status} ${res.statusText}`);\n\t\t\tconst contentLength = res.headers.get(\"content-length\");\n\t\t\tif (contentLength && Number(contentLength) > MAX_DOWNLOAD_BYTES) throw new TankNetworkError(`Tarball for ${node.name}@${node.version} exceeds ${MAX_DOWNLOAD_BYTES} byte limit (Content-Length: ${contentLength})`);\n\t\t\tconst chunks = [];\n\t\t\tlet received = 0;\n\t\t\tconst reader = res.body?.getReader();\n\t\t\tif (!reader) throw new TankNetworkError(`No response body for ${node.name}@${node.version}`);\n\t\t\twhile (true) {\n\t\t\t\tconst { done, value } = await reader.read();\n\t\t\t\tif (done) break;\n\t\t\t\treceived += value.byteLength;\n\t\t\t\tif (received > MAX_DOWNLOAD_BYTES) {\n\t\t\t\t\treader.cancel();\n\t\t\t\t\tthrow new TankNetworkError(`Tarball for ${node.name}@${node.version} exceeds ${MAX_DOWNLOAD_BYTES} byte limit`);\n\t\t\t\t}\n\t\t\t\tchunks.push(value);\n\t\t\t}\n\t\t\tconst buffer = Buffer.concat(chunks);\n\t\t\tconst computedIntegrity = `sha512-${crypto$1.createHash(\"sha512\").update(buffer).digest(\"base64\")}`;\n\t\t\tif (computedIntegrity !== node.meta.integrity) throw new TankIntegrityError(`Integrity mismatch for ${node.name}@${node.version}`, {\n\t\t\t\texpected: node.meta.integrity,\n\t\t\t\tactual: computedIntegrity\n\t\t\t});\n\t\t\treturn {\n\t\t\t\tname: node.name,\n\t\t\t\tbuffer,\n\t\t\t\tintegrity: computedIntegrity\n\t\t\t};\n\t\t});\n\t\tconst batchResults = await Promise.all(promises);\n\t\tfor (const result of batchResults) results.set(result.name, {\n\t\t\tbuffer: result.buffer,\n\t\t\tintegrity: result.integrity\n\t\t});\n\t}\n\treturn results;\n}\nfunction verifyExtractedDependencies(extractDir, node, onProgress) {\n\tlet extractedManifestPath = path.join(extractDir, MANIFEST_FILENAME);\n\tif (!fs.existsSync(extractedManifestPath)) extractedManifestPath = path.join(extractDir, LEGACY_MANIFEST_FILENAME);\n\tif (!fs.existsSync(extractedManifestPath)) return;\n\ttry {\n\t\tconst raw = fs.readFileSync(extractedManifestPath, \"utf-8\");\n\t\tconst extractedDeps = JSON.parse(raw).skills ?? {};\n\t\tconst apiDeps = node.meta.dependencies;\n\t\tconst extractedSorted = Object.fromEntries(Object.entries(extractedDeps).sort(([a], [b]) => a.localeCompare(b)));\n\t\tconst apiSorted = Object.fromEntries(Object.entries(apiDeps).sort(([a], [b]) => a.localeCompare(b)));\n\t\tif (JSON.stringify(extractedSorted) !== JSON.stringify(apiSorted)) onProgress?.(`Warning: ${node.name}@${node.version} manifest dependencies differ from registry metadata`);\n\t} catch {}\n}\nfunction readExtractedDependencies(extractDir) {\n\tlet extractedManifestPath = path.join(extractDir, MANIFEST_FILENAME);\n\tif (!fs.existsSync(extractedManifestPath)) extractedManifestPath = path.join(extractDir, LEGACY_MANIFEST_FILENAME);\n\tif (!fs.existsSync(extractedManifestPath)) return {};\n\ttry {\n\t\tconst raw = fs.readFileSync(extractedManifestPath, \"utf-8\");\n\t\tconst extractedDeps = JSON.parse(raw).skills;\n\t\tif (!extractedDeps || typeof extractedDeps !== \"object\") return {};\n\t\tconst deps = {};\n\t\tfor (const [depName, depRange] of Object.entries(extractedDeps)) if (typeof depRange === \"string\") deps[depName] = depRange;\n\t\treturn deps;\n\t} catch {\n\t\treturn {};\n\t}\n}\nfunction writeLockfileWithResolvedGraph(lock, nodes, downloaded, onProgress) {\n\tfor (const node of nodes) {\n\t\tconst key = buildSkillKey(node.name, node.version);\n\t\tif (!downloaded.has(node.name) && lock.skills[key]) continue;\n\t\tconst integrity = downloaded.get(node.name)?.integrity ?? lock.skills[key]?.integrity ?? node.meta.integrity;\n\t\tconst permsParsed = permissionsSchema.safeParse(node.meta.permissions);\n\t\tif (!permsParsed.success) onProgress?.(`Warning: ${node.name}@${node.version} has unrecognized permissions format — treating as unrestricted`);\n\t\tconst validatedPerms = permsParsed.success ? permsParsed.data : {};\n\t\tlock.skills[key] = {\n\t\t\tresolved: node.meta.downloadUrl,\n\t\t\tintegrity,\n\t\t\tpermissions: validatedPerms,\n\t\t\taudit_score: node.meta.auditScore ?? null,\n\t\t\tdependencies: node.dependencies\n\t\t};\n\t}\n\tconst sortedSkills = {};\n\tfor (const key of Object.keys(lock.skills).sort()) sortedSkills[key] = lock.skills[key];\n\tlock.skills = sortedSkills;\n\treturn lock;\n}\nfunction mkdirSafeNoSymlinks(targetDir) {\n\tconst resolved = path.resolve(targetDir);\n\tconst segments = resolved.split(path.sep).filter(Boolean);\n\tlet current = resolved.startsWith(\"/\") ? \"/\" : \"\";\n\tfor (const seg of segments) {\n\t\tcurrent = path.join(current, seg);\n\t\tif (fs.existsSync(current)) {\n\t\t\tconst stat = fs.lstatSync(current);\n\t\t\tif (stat.isSymbolicLink()) throw new TankIntegrityError(`Symlink in install path: ${current}`);\n\t\t\tif (!stat.isDirectory()) throw new TankIntegrityError(`Non-directory in install path: ${current}`);\n\t\t} else fs.mkdirSync(current);\n\t}\n}\nasync function extractSafely(tarball, destDir) {\n\tif (tarball.length > MAX_DOWNLOAD_BYTES) throw new TankIntegrityError(`Tarball exceeds ${MAX_DOWNLOAD_BYTES} byte limit`);\n\tconst tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), \"tank-extract-\"));\n\tconst tmpTarball = path.join(tmpDir, `${crypto$1.randomUUID()}.tgz`);\n\tfs.writeFileSync(tmpTarball, tarball, { flag: \"wx\" });\n\tlet entryCount = 0;\n\tlet totalBytes = 0;\n\ttry {\n\t\tawait extract({\n\t\t\tfile: tmpTarball,\n\t\t\tcwd: tmpDir,\n\t\t\tfilter: (entryPath) => {\n\t\t\t\tentryCount++;\n\t\t\t\tif (entryCount > MAX_EXTRACT_ENTRIES) throw new Error(`Tarball exceeds ${MAX_EXTRACT_ENTRIES} entry limit`);\n\t\t\t\tif (path.isAbsolute(entryPath)) throw new Error(`Absolute path in tarball: ${entryPath}`);\n\t\t\t\tif (entryPath.split(\"/\").includes(\"..\") || entryPath.split(path.sep).includes(\"..\")) throw new Error(`Path traversal in tarball: ${entryPath}`);\n\t\t\t\treturn true;\n\t\t\t},\n\t\t\tonReadEntry: (entry) => {\n\t\t\t\tif (entry.type === \"SymbolicLink\" || entry.type === \"Link\") throw new Error(`Symlink/hardlink in tarball: ${entry.path}`);\n\t\t\t\tif (entry.size && entry.size > MAX_EXTRACT_FILE_BYTES) throw new Error(`File ${entry.path} exceeds ${MAX_EXTRACT_FILE_BYTES} byte limit`);\n\t\t\t\ttotalBytes += entry.size ?? 0;\n\t\t\t\tif (totalBytes > MAX_EXTRACT_TOTAL_BYTES) throw new Error(`Total extracted size exceeds ${MAX_EXTRACT_TOTAL_BYTES} byte limit`);\n\t\t\t}\n\t\t});\n\t\tmkdirSafeNoSymlinks(destDir);\n\t\tfor (const entry of fs.readdirSync(tmpDir)) {\n\t\t\tif (entry === path.basename(tmpTarball)) continue;\n\t\t\tconst src = path.join(tmpDir, entry);\n\t\t\tconst dst = path.join(destDir, entry);\n\t\t\ttry {\n\t\t\t\tfs.renameSync(src, dst);\n\t\t\t} catch (err) {\n\t\t\t\tif (err.code === \"EXDEV\") {\n\t\t\t\t\tfs.cpSync(src, dst, { recursive: true });\n\t\t\t\t\tfs.rmSync(src, {\n\t\t\t\t\t\trecursive: true,\n\t\t\t\t\t\tforce: true\n\t\t\t\t\t});\n\t\t\t\t} else throw err;\n\t\t\t}\n\t\t}\n\t} finally {\n\t\tfs.rmSync(tmpDir, {\n\t\t\trecursive: true,\n\t\t\tforce: true\n\t\t});\n\t}\n}\nfunction getExtractDir(projectDir, skillName) {\n\tif (skillName.startsWith(\"@\")) {\n\t\tconst [scope, name] = skillName.split(\"/\");\n\t\treturn path.join(projectDir, \".tank\", \"skills\", scope, name);\n\t}\n\treturn path.join(projectDir, \".tank\", \"skills\", skillName);\n}\nfunction getGlobalExtractDir(homedir, skillName) {\n\tconst globalDir = path.join(homedir, \".tank\", \"skills\");\n\tif (skillName.startsWith(\"@\")) {\n\t\tconst [scope, name] = skillName.split(\"/\");\n\t\treturn path.join(globalDir, scope, name);\n\t}\n\treturn path.join(globalDir, skillName);\n}\nfunction parseLockKey(key) {\n\tconst lastAt = key.lastIndexOf(\"@\");\n\tif (lastAt <= 0) throw new Error(`Invalid lockfile key: ${key}`);\n\treturn key.slice(0, lastAt);\n}\nfunction parseVersionFromLockKey(key) {\n\tconst lastAt = key.lastIndexOf(\"@\");\n\tif (lastAt <= 0 || lastAt === key.length - 1) throw new Error(`Invalid lockfile key: ${key}`);\n\treturn key.slice(lastAt + 1);\n}\nfunction getResolvedNodesInOrder(nodes, installOrder) {\n\tconst orderedNodes = [];\n\tfor (const key of installOrder) {\n\t\tconst skillName = parseLockKey(key);\n\t\tconst node = nodes.get(skillName);\n\t\tif (!node) throw new Error(`Internal error: missing resolved node for ${key}`);\n\t\torderedNodes.push(node);\n\t}\n\treturn orderedNodes;\n}\n//#endregion\n//#region src/tools.ts\nconst MAX_TOOL_NAME_LENGTH = 64;\nconst MAX_DESCRIPTION_LENGTH = 1024;\nconst MAX_FILES_IN_DESCRIPTION = 30;\nconst MAX_FILES_IN_ERROR = 10;\nfunction sanitizeToolName(skillName) {\n\treturn skillName.replace(/[^a-zA-Z0-9_]/g, \"_\").replace(/^_+/, \"\").replace(/_+/g, \"_\").slice(0, MAX_TOOL_NAME_LENGTH) || \"skill_tool\";\n}\nfunction buildParameterSchema() {\n\treturn {\n\t\ttype: \"object\",\n\t\trequired: [\"action\"],\n\t\tadditionalProperties: false,\n\t\tproperties: {\n\t\t\taction: {\n\t\t\t\ttype: \"string\",\n\t\t\t\tenum: [\n\t\t\t\t\t\"read\",\n\t\t\t\t\t\"list\",\n\t\t\t\t\t\"read_all\"\n\t\t\t\t],\n\t\t\t\tdescription: \"read: read a single file (requires path). list: list all files. read_all: complete skill with references and scripts.\"\n\t\t\t},\n\t\t\tpath: {\n\t\t\t\ttype: \"string\",\n\t\t\t\tdescription: \"File path to read (required when action is \\\"read\\\"). Example: \\\"SKILL.md\\\", \\\"references/guide.md\\\"\"\n\t\t\t}\n\t\t}\n\t};\n}\nfunction truncate(text, max) {\n\treturn text.length <= max ? text : `${text.slice(0, max - 3)}...`;\n}\nfunction buildDescription(skillName, version, skillDescription, files) {\n\tconst refFiles = files.filter((f) => f.startsWith(\"references/\"));\n\tconst scriptFiles = files.filter((f) => f.startsWith(\"scripts/\"));\n\tconst displayFiles = files.length <= MAX_FILES_IN_DESCRIPTION ? files.join(\", \") : `${files.slice(0, MAX_FILES_IN_DESCRIPTION).join(\", \")} and ${files.length - MAX_FILES_IN_DESCRIPTION} more`;\n\tconst parts = [\n\t\t`Access the \"${skillName}\" skill (v${version}).`,\n\t\ttruncate(skillDescription, 200),\n\t\t\"\",\n\t\t\"Actions: read_all | list | read (with path)\",\n\t\t`Files (${files.length}): ${displayFiles}`\n\t];\n\tif (refFiles.length > 0) parts.push(`References: ${refFiles.map((f) => f.replace(\"references/\", \"\")).join(\", \")}`);\n\tif (scriptFiles.length > 0) parts.push(`Scripts: ${scriptFiles.map((f) => f.replace(\"scripts/\", \"\")).join(\", \")}`);\n\treturn truncate(parts.join(\"\\n\"), MAX_DESCRIPTION_LENGTH);\n}\nasync function createSkillTool(client, skillName, version) {\n\tconst info = await client.info(skillName);\n\tconst ver = version ?? info.latestVersion;\n\tif (!ver) throw new TankNotFoundError(`No published versions for ${skillName}`, skillName);\n\tconst files = await client.listFiles(skillName, ver);\n\tconst filesSet = new Set(files);\n\tconst toolName = sanitizeToolName(skillName);\n\tconst description = buildDescription(skillName, ver, info.description ?? \"\", files);\n\tconst parameterSchema = buildParameterSchema();\n\tasync function execute(input) {\n\t\ttry {\n\t\t\tswitch (input.action) {\n\t\t\t\tcase \"list\": return {\n\t\t\t\t\tsuccess: true,\n\t\t\t\t\tfiles\n\t\t\t\t};\n\t\t\t\tcase \"read\":\n\t\t\t\t\tif (!input.path) return {\n\t\t\t\t\t\tsuccess: false,\n\t\t\t\t\t\terror: \"path is required for action \\\"read\\\"\"\n\t\t\t\t\t};\n\t\t\t\t\tif (!filesSet.has(input.path)) {\n\t\t\t\t\t\tconst hint = files.slice(0, MAX_FILES_IN_ERROR).join(\", \");\n\t\t\t\t\t\tconst suffix = files.length > MAX_FILES_IN_ERROR ? ` and ${files.length - MAX_FILES_IN_ERROR} more` : \"\";\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tsuccess: false,\n\t\t\t\t\t\t\terror: `File not found: ${input.path}. Available: ${hint}${suffix}`\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\treturn {\n\t\t\t\t\t\tsuccess: true,\n\t\t\t\t\t\tcontent: await client.readFile(skillName, ver, input.path)\n\t\t\t\t\t};\n\t\t\t\tcase \"read_all\": {\n\t\t\t\t\tconst skill = await client.readSkill(skillName, ver);\n\t\t\t\t\treturn {\n\t\t\t\t\t\tsuccess: true,\n\t\t\t\t\t\tskill: {\n\t\t\t\t\t\t\tcontent: skill.content,\n\t\t\t\t\t\t\treferences: skill.references,\n\t\t\t\t\t\t\tscripts: skill.scripts,\n\t\t\t\t\t\t\tfiles: skill.files\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tdefault: return {\n\t\t\t\t\tsuccess: false,\n\t\t\t\t\terror: `Unknown action: ${String(input.action)}`\n\t\t\t\t};\n\t\t\t}\n\t\t} catch (err) {\n\t\t\treturn {\n\t\t\t\tsuccess: false,\n\t\t\t\terror: err instanceof Error ? err.message : String(err)\n\t\t\t};\n\t\t}\n\t}\n\treturn {\n\t\tname: toolName,\n\t\tskillName,\n\t\tversion: ver,\n\t\tdescription,\n\t\tfiles,\n\t\texecute,\n\t\ttoOpenAI() {\n\t\t\treturn {\n\t\t\t\ttype: \"function\",\n\t\t\t\tfunction: {\n\t\t\t\t\tname: toolName,\n\t\t\t\t\tdescription,\n\t\t\t\t\tparameters: parameterSchema\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\t\ttoMCP() {\n\t\t\treturn {\n\t\t\t\tname: toolName,\n\t\t\t\tdescription,\n\t\t\t\tinputSchema: parameterSchema\n\t\t\t};\n\t\t}\n\t};\n}\nasync function createSkillTools(client, skillNames) {\n\tconst tools = [];\n\tfor (let i = 0; i < skillNames.length; i += 6) {\n\t\tconst batch = skillNames.slice(i, i + 6);\n\t\tconst batchTools = await Promise.all(batch.map((name) => createSkillTool(client, name)));\n\t\ttools.push(...batchTools);\n\t}\n\treturn tools;\n}\n//#endregion\nexport { AGENT_PATHS, DEFAULT_CONFIG_DIR, DEFAULT_MAX_RETRIES, REGISTRY_URL as DEFAULT_REGISTRY_URL, DEFAULT_TIMEOUT_MS, LOCKFILE_FILENAME, MANIFEST_FILENAME, SDK_VERSION, SUPPORTED_AGENTS, TankAuthError, TankClient, TankConflictError, TankError, TankIntegrityError, TankNetworkError, TankNotFoundError, TankPermissionError, buildSkillKey, checkPermissionBudget, collectPermissionViolations, createSkillTool, createSkillTools, downloadAllParallel, extractSafely, getExtractDir, getGlobalExtractDir, getResolvedNodesInOrder, hasNativeAcceleration, isDomainAllowed, isPathAllowed, parseLockKey, parseVersionFromLockKey, readExtractedDependencies, resolveDependencyTree, verifyExtractedDependencies, writeLockfileWithResolvedGraph };\n","import fs from 'node:fs';\nimport os from 'node:os';\nimport path from 'node:path';\n\nexport interface TankConfig {\n token?: string;\n user?: { name: string; email: string };\n registry: string;\n}\n\nconst DEFAULT_CONFIG: TankConfig = {\n registry: 'https://www.tankpkg.dev'\n};\n\n/**\n * Get the path to the tank config directory.\n */\nexport function getConfigDir(configDir?: string): string {\n return configDir ?? path.join(os.homedir(), '.tank');\n}\n\n/**\n * Get the path to the tank config file.\n */\nexport function getConfigPath(configDir?: string): string {\n return path.join(getConfigDir(configDir), 'config.json');\n}\n\n/**\n * Read the tank config file. Returns defaults if file doesn't exist.\n */\nexport function getConfig(configDir?: string): TankConfig {\n const configPath = getConfigPath(configDir);\n\n try {\n const raw = fs.readFileSync(configPath, 'utf-8');\n const parsed = JSON.parse(raw) as Partial<TankConfig>;\n const merged = { ...DEFAULT_CONFIG, ...parsed };\n // TANK_TOKEN env var takes priority\n const envToken = process.env.TANK_TOKEN?.trim();\n if (envToken) {\n merged.token = envToken;\n }\n return merged;\n } catch {\n const envToken = process.env.TANK_TOKEN?.trim();\n return {\n ...DEFAULT_CONFIG,\n ...(envToken ? { token: envToken } : {})\n };\n }\n}\n\n/**\n * Write config to disk. Merges with existing config.\n */\nexport function setConfig(partial: Partial<TankConfig>, configDir?: string): void {\n const dir = getConfigDir(configDir);\n const configPath = getConfigPath(configDir);\n\n if (!fs.existsSync(dir)) {\n fs.mkdirSync(dir, { recursive: true, mode: 0o700 });\n }\n\n const existing = getConfig(configDir);\n const merged = { ...existing, ...partial };\n\n fs.writeFileSync(configPath, `${JSON.stringify(merged, null, 2)}\\n`, {\n encoding: 'utf-8',\n mode: 0o600\n });\n}\n","import { TankAuthError, TankClient } from '@tankpkg/sdk';\nimport { getConfig, type TankConfig } from './config.js';\n\nexport interface ApiClientOptions {\n configDir?: string;\n}\n\nexport class TankApiClient {\n private client: TankClient;\n private config: TankConfig;\n\n constructor(options: ApiClientOptions = {}) {\n this.config = getConfig(options.configDir);\n this.client = new TankClient({\n token: this.config.token,\n registryUrl: this.config.registry,\n configDir: options.configDir\n });\n }\n\n get baseUrl(): string {\n return this.config.registry;\n }\n\n get token(): string | undefined {\n return this.config.token;\n }\n\n get isAuthenticated(): boolean {\n return !!this.config.token;\n }\n\n get sdk(): TankClient {\n return this.client;\n }\n\n async fetch<T>(\n path: string,\n options: RequestInit = {}\n ): Promise<{ data: T; ok: true } | { error: string; status: number; ok: false }> {\n const url = `${this.baseUrl}${path}`;\n const headers: Record<string, string> = {\n 'Content-Type': 'application/json',\n ...(options.headers as Record<string, string>)\n };\n\n if (this.config.token) {\n headers.Authorization = `Bearer ${this.config.token}`;\n }\n\n try {\n const response = await fetch(url, {\n ...options,\n headers,\n signal: AbortSignal.timeout(30_000)\n });\n\n if (!response.ok) {\n const body = await response.json().catch(() => ({}));\n return {\n error: (body as { error?: string }).error ?? response.statusText,\n status: response.status,\n ok: false\n };\n }\n\n const data = (await response.json()) as T;\n return { data, ok: true };\n } catch (err) {\n return {\n error: err instanceof Error ? err.message : 'Network error',\n status: 0,\n ok: false\n };\n }\n }\n\n async verifyAuth(): Promise<\n | { valid: true; user: { name: string | null; email: string | null } }\n | { valid: false; reason: 'no-token' | 'unauthorized' | 'network-error'; error?: string }\n > {\n if (!this.config.token) {\n return { valid: false, reason: 'no-token' };\n }\n\n try {\n const user = await this.client.whoami();\n if (user) {\n return { valid: true, user: { name: user.name, email: user.email } };\n }\n return { valid: false, reason: 'unauthorized' };\n } catch (err) {\n if (err instanceof TankAuthError) {\n return { valid: false, reason: 'unauthorized' };\n }\n return {\n valid: false,\n reason: 'network-error',\n error: err instanceof Error ? err.message : 'Unknown error'\n };\n }\n }\n}\n","import fs from 'node:fs';\nimport path from 'node:path';\n\nimport { LEGACY_LOCKFILE_FILENAME, LOCKFILE_FILENAME, type SkillsLock } from '@internals/schemas';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { z } from 'zod';\n\nimport { TankApiClient } from '~/lib/api-client.js';\n\nconst SCOPED_NAME_PATTERN = /^@[a-z0-9-]+\\/[a-z0-9][a-z0-9-]*$/;\n\ninterface VersionDetails {\n name: string;\n version: string;\n permissions?: {\n network?: { outbound?: string[] };\n filesystem?: { read?: string[]; write?: string[] };\n subprocess?: boolean;\n };\n auditScore: number | null;\n auditStatus: string;\n downloadUrl: string;\n publishedAt: string;\n downloads: number;\n}\n\ninterface ScanFinding {\n stage: string;\n severity: 'critical' | 'high' | 'medium' | 'low';\n type: string;\n description: string;\n location: string | null;\n}\n\ninterface ScanResult {\n verdict: string;\n audit_score: number;\n findings: ScanFinding[];\n scanned_at: string;\n}\n\ninterface SkillMetaResponse {\n name: string;\n description: string | null;\n latestVersion: string;\n auditScore: number | null;\n auditStatus: string;\n versions: Array<{\n version: string;\n auditScore: number | null;\n auditStatus: string;\n publishedAt: string;\n }>;\n}\n\nfunction parseLockKey(key: string): { name: string; version: string } | null {\n const lastAt = key.lastIndexOf('@');\n if (lastAt <= 0) return null;\n return { name: key.slice(0, lastAt), version: key.slice(lastAt + 1) };\n}\n\nfunction deriveVerdict(score: number | null, status: string): string {\n if (status !== 'completed' || score === null) return 'PENDING';\n if (score >= 7) return 'PASS';\n if (score >= 4) return 'FLAGGED';\n return 'FAIL';\n}\n\nfunction formatFindings(findings: ScanFinding[]): string {\n if (findings.length === 0) return '';\n\n const bySeverity: Record<string, ScanFinding[]> = {\n critical: [],\n high: [],\n medium: [],\n low: []\n };\n\n for (const f of findings) {\n if (bySeverity[f.severity]) {\n bySeverity[f.severity].push(f);\n }\n }\n\n const lines: string[] = ['', `### Findings (${findings.length})`];\n\n for (const severity of ['critical', 'high', 'medium', 'low'] as const) {\n const group = bySeverity[severity];\n if (group.length === 0) continue;\n lines.push(`\\n**${severity.toUpperCase()} (${group.length}):**`);\n for (const f of group) {\n lines.push(`- ${f.type}: ${f.description}${f.location ? ` (${f.location})` : ''}`);\n }\n }\n\n return lines.join('\\n');\n}\n\nexport function registerAuditSkillTool(server: McpServer): void {\n server.tool(\n 'audit-skill',\n 'Show security audit results for a skill from the Tank registry.',\n {\n name: z.string().describe('Skill name in @org/name format'),\n version: z.string().optional().describe('Specific version to audit (defaults to installed or latest)')\n },\n async ({ name, version }) => {\n if (!SCOPED_NAME_PATTERN.test(name)) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Validation error: Skill name \"${name}\" must use the @org/name format (e.g. @acme/my-skill).`\n }\n ],\n isError: true\n };\n }\n\n const client = new TankApiClient();\n if (!client.isAuthenticated) {\n return {\n content: [\n {\n type: 'text' as const,\n text: 'Authentication required. Please run the \"login\" tool first to authenticate with Tank.'\n }\n ],\n isError: true\n };\n }\n\n const encodedName = encodeURIComponent(name);\n\n // If no version specified, try to find installed version from lockfile\n let targetVersion = version;\n if (!targetVersion) {\n let lockPath = path.join(process.cwd(), LOCKFILE_FILENAME);\n if (!fs.existsSync(lockPath)) {\n lockPath = path.join(process.cwd(), LEGACY_LOCKFILE_FILENAME);\n }\n if (fs.existsSync(lockPath)) {\n try {\n const raw = fs.readFileSync(lockPath, 'utf-8');\n const lock = JSON.parse(raw) as SkillsLock;\n for (const key of Object.keys(lock.skills)) {\n const parsed = parseLockKey(key);\n if (parsed && parsed.name === name) {\n targetVersion = parsed.version;\n break;\n }\n }\n } catch {\n // Lockfile unreadable — fall through to fetch latest\n }\n }\n }\n\n // If still no version, fetch skill metadata to get latest\n if (!targetVersion) {\n const metaResult = await client.fetch<SkillMetaResponse>(`/api/v1/skills/${encodedName}`);\n\n if (!metaResult.ok) {\n if (metaResult.status === 0) {\n return {\n content: [\n {\n type: 'text' as const,\n text: 'Unable to connect to the Tank registry. Check your network connection and try again.'\n }\n ],\n isError: true\n };\n }\n if (metaResult.status === 404) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Skill \"${name}\" not found in the Tank registry.`\n }\n ],\n isError: true\n };\n }\n return {\n content: [\n {\n type: 'text' as const,\n text: `Failed to fetch skill metadata: ${metaResult.error}`\n }\n ],\n isError: true\n };\n }\n\n targetVersion = metaResult.data.latestVersion;\n }\n\n // Fetch version details with audit data\n const versionResult = await client.fetch<VersionDetails>(`/api/v1/skills/${encodedName}/${targetVersion}`);\n\n if (!versionResult.ok) {\n if (versionResult.status === 0) {\n return {\n content: [\n {\n type: 'text' as const,\n text: 'Unable to connect to the Tank registry. Check your network connection and try again.'\n }\n ],\n isError: true\n };\n }\n if (versionResult.status === 404) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Skill \"${name}\" version \"${targetVersion}\" not found in the Tank registry.`\n }\n ],\n isError: true\n };\n }\n return {\n content: [\n {\n type: 'text' as const,\n text: `Failed to fetch audit data: ${versionResult.error}`\n }\n ],\n isError: true\n };\n }\n\n const details = versionResult.data;\n const verdict = deriveVerdict(details.auditScore, details.auditStatus);\n\n if (details.auditStatus !== 'completed') {\n return {\n content: [\n {\n type: 'text' as const,\n text: [\n `## Audit: ${name}@${targetVersion}`,\n '',\n `**Status:** Pending security review`,\n `**Scan Status:** ${details.auditStatus}`,\n '',\n 'This skill has not yet been through security scanning. Results will be available once the scan completes.'\n ].join('\\n')\n }\n ]\n };\n }\n\n // Try to fetch detailed scan results\n let findingsText = '';\n const scanResult = await client.fetch<ScanResult>(`/api/v1/skills/${encodedName}/${targetVersion}/scan`);\n if (scanResult.ok && scanResult.data.findings) {\n findingsText = formatFindings(scanResult.data.findings);\n }\n\n const score = details.auditScore !== null ? details.auditScore.toFixed(1) : 'N/A';\n\n const lines = [\n `## Audit: ${name}@${targetVersion}`,\n '',\n `**Verdict:** ${verdict}`,\n `**Score:** ${score}/10`,\n `**Scanned:** ${details.publishedAt}`,\n `**Version:** ${targetVersion}`\n ];\n\n if (details.permissions) {\n lines.push('', '**Permissions:**');\n const p = details.permissions;\n if (p.network?.outbound?.length) {\n lines.push(` - Network: ${p.network.outbound.join(', ')}`);\n }\n if (p.filesystem?.read?.length || p.filesystem?.write?.length) {\n const parts: string[] = [];\n if (p.filesystem.read?.length) parts.push(`read: ${p.filesystem.read.join(', ')}`);\n if (p.filesystem.write?.length) parts.push(`write: ${p.filesystem.write.join(', ')}`);\n lines.push(` - Filesystem: ${parts.join('; ')}`);\n }\n lines.push(` - Subprocess: ${p.subprocess ? 'yes' : 'no'}`);\n }\n\n if (findingsText) {\n lines.push(findingsText);\n }\n\n return {\n content: [\n {\n type: 'text' as const,\n text: lines.join('\\n')\n }\n ]\n };\n }\n );\n}\n","import fs from 'node:fs';\n\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\n\nimport { TankApiClient } from '~/lib/api-client.js';\nimport { getConfig, getConfigPath } from '~/lib/config.js';\n\nconst MIN_NODE_MAJOR = 24;\n\ninterface CheckResult {\n name: string;\n status: 'PASS' | 'FAIL';\n message: string;\n}\n\nfunction checkConfigFile(): CheckResult {\n const configPath = getConfigPath();\n\n if (!fs.existsSync(configPath)) {\n return {\n name: 'Configuration File',\n status: 'FAIL',\n message: `Configuration file not found at ${configPath}. Run the login tool to create it.`\n };\n }\n\n try {\n const raw = fs.readFileSync(configPath, 'utf-8');\n JSON.parse(raw);\n return {\n name: 'Configuration File',\n status: 'PASS',\n message: `Configuration file exists and is valid JSON (${configPath}).`\n };\n } catch (err) {\n const detail = err instanceof Error ? err.message : String(err);\n return {\n name: 'Configuration File',\n status: 'FAIL',\n message: `Configuration file at ${configPath} is malformed: ${detail}`\n };\n }\n}\n\nasync function checkAuthentication(): Promise<CheckResult> {\n const client = new TankApiClient();\n\n if (!client.isAuthenticated) {\n return {\n name: 'Authentication',\n status: 'FAIL',\n message: 'Not authenticated. Use the login tool to authenticate with Tank.'\n };\n }\n\n const authCheck = await client.verifyAuth();\n\n if (authCheck.valid) {\n const name = authCheck.user.name ?? 'unknown';\n return {\n name: 'Authentication',\n status: 'PASS',\n message: `Authenticated as ${name}.`\n };\n }\n\n if (authCheck.reason === 'network-error') {\n return {\n name: 'Authentication',\n status: 'FAIL',\n message: `Could not verify credentials (network error). ${authCheck.error ?? ''}`.trim()\n };\n }\n\n return {\n name: 'Authentication',\n status: 'FAIL',\n message: 'Credentials are expired or invalid. Use the login tool to re-authenticate.'\n };\n}\n\nasync function checkRegistryConnectivity(): Promise<CheckResult> {\n const config = getConfig();\n const registryUrl = config.registry;\n\n try {\n const healthUrl = `${registryUrl}/api/health`;\n const response = await fetch(healthUrl, {\n signal: AbortSignal.timeout(10_000)\n });\n\n if (response.ok) {\n return {\n name: 'Registry Connectivity',\n status: 'PASS',\n message: `Registry at ${registryUrl} is reachable.`\n };\n }\n\n return {\n name: 'Registry Connectivity',\n status: 'FAIL',\n message: `Registry at ${registryUrl} returned HTTP ${response.status}.`\n };\n } catch {\n return {\n name: 'Registry Connectivity',\n status: 'FAIL',\n message: `Cannot reach registry at ${registryUrl}. Check your network connection.`\n };\n }\n}\n\nfunction checkNodeVersion(): CheckResult {\n const raw = process.version;\n const match = raw.match(/^v(\\d+)/);\n const major = match ? Number.parseInt(match[1], 10) : 0;\n\n if (major >= MIN_NODE_MAJOR) {\n return {\n name: 'Node.js Version',\n status: 'PASS',\n message: `Node.js ${raw} meets the minimum requirement (v${MIN_NODE_MAJOR}.0.0).`\n };\n }\n\n return {\n name: 'Node.js Version',\n status: 'FAIL',\n message: `Node.js ${raw} is below the minimum required version v${MIN_NODE_MAJOR}.0.0. Please upgrade Node.js.`\n };\n}\n\nfunction formatChecks(checks: CheckResult[]): string {\n const lines: string[] = [];\n\n lines.push('Tank Doctor Report');\n lines.push('==================');\n lines.push('');\n\n for (const check of checks) {\n const icon = check.status === 'PASS' ? 'PASS' : 'FAIL';\n lines.push(`[${icon}] ${check.name}`);\n lines.push(` ${check.message}`);\n }\n\n lines.push('');\n\n const failedChecks = checks.filter((c) => c.status === 'FAIL');\n const allPassed = failedChecks.length === 0;\n\n if (allPassed) {\n lines.push('All checks passed. Your Tank environment is ready to use.');\n } else {\n lines.push('Suggestions:');\n for (const check of failedChecks) {\n if (check.name === 'Authentication') {\n lines.push(' - Use the login tool to authenticate with Tank.');\n } else if (check.name === 'Registry Connectivity') {\n lines.push(' - Check your network connection and verify the registry URL.');\n } else if (check.name === 'Node.js Version') {\n lines.push(` - Upgrade Node.js to v${MIN_NODE_MAJOR}.0.0 or later.`);\n } else if (check.name === 'Configuration File') {\n lines.push(' - Use the login tool to create a valid configuration file.');\n }\n }\n lines.push('');\n lines.push('The environment is not healthy. Please address the issues above.');\n }\n\n return lines.join('\\n');\n}\n\nexport function registerDoctorTool(server: McpServer): void {\n server.tool('doctor', 'Diagnose Tank setup and environment.', {}, async () => {\n const checks: CheckResult[] = [];\n\n checks.push(checkConfigFile());\n checks.push(await checkAuthentication());\n checks.push(await checkRegistryConnectivity());\n checks.push(checkNodeVersion());\n\n return {\n content: [{ type: 'text' as const, text: formatChecks(checks) }]\n };\n });\n}\n","import fs from 'node:fs';\nimport path from 'node:path';\n\nimport { LEGACY_MANIFEST_FILENAME, MANIFEST_FILENAME, type SkillsJson, skillsJsonSchema } from '@internals/schemas';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { z } from 'zod';\n\nconst SCOPED_NAME_PATTERN = /^@[a-z0-9-]+\\/[a-z0-9][a-z0-9-]*$/;\nconst SEMVER_PATTERN = /^\\d+\\.\\d+\\.\\d+(-[a-zA-Z0-9.-]+)?(\\+[a-zA-Z0-9.-]+)?$/;\n\nexport function registerInitSkillTool(server: McpServer): void {\n server.tool(\n 'init-skill',\n `Create a new ${MANIFEST_FILENAME} and SKILL.md template for a Tank skill.`,\n {\n name: z.string().regex(SCOPED_NAME_PATTERN, 'Name must be in @org/name format'),\n version: z.string().regex(SEMVER_PATTERN, 'Version must be valid semver').optional().default('0.1.0'),\n description: z.string().optional().default(''),\n directory: z.string().optional().default('.')\n },\n async ({ name, version = '0.1.0', description = '', directory = '.' }) => {\n const targetDir = path.resolve(directory);\n\n if (!fs.existsSync(targetDir)) {\n return {\n content: [{ type: 'text' as const, text: `Directory does not exist: ${targetDir}` }]\n };\n }\n\n if (!fs.statSync(targetDir).isDirectory()) {\n return {\n content: [{ type: 'text' as const, text: `Path is not a directory: ${targetDir}` }]\n };\n }\n\n // Check for existing manifest (tank.json or skills.json)\n const newManifestPath = path.join(targetDir, MANIFEST_FILENAME);\n const legacyManifestPath = path.join(targetDir, LEGACY_MANIFEST_FILENAME);\n const skillsJsonPath = newManifestPath;\n if (fs.existsSync(newManifestPath) || fs.existsSync(legacyManifestPath)) {\n const existingFile = fs.existsSync(newManifestPath) ? MANIFEST_FILENAME : LEGACY_MANIFEST_FILENAME;\n return {\n content: [\n {\n type: 'text' as const,\n text: `${existingFile} already exists at ${targetDir}. Aborting to avoid overwrite.`\n }\n ]\n };\n }\n\n const manifest: SkillsJson = {\n name,\n version,\n description,\n skills: {},\n permissions: {\n network: { outbound: [] },\n filesystem: { read: [], write: [] },\n subprocess: false\n }\n };\n\n const parseResult = skillsJsonSchema.safeParse(manifest);\n if (!parseResult.success) {\n const details = parseResult.error.issues\n .map((issue) => `${issue.path.join('.') || 'root'}: ${issue.message}`)\n .join('; ');\n\n return {\n content: [{ type: 'text' as const, text: `Failed to create ${MANIFEST_FILENAME}: ${details}` }]\n };\n }\n\n fs.writeFileSync(skillsJsonPath, `${JSON.stringify(manifest, null, 2)}\\n`, 'utf-8');\n\n const skillMdPath = path.join(targetDir, 'SKILL.md');\n let createdSkillMd = false;\n if (!fs.existsSync(skillMdPath)) {\n const skillMd = `# ${name}\\n\\n${description || 'Description here.'}\\n`;\n fs.writeFileSync(skillMdPath, skillMd, 'utf-8');\n createdSkillMd = true;\n }\n\n const skillMdLine = createdSkillMd ? `Created: ${skillMdPath}` : `Skipped existing: ${skillMdPath}`;\n\n return {\n content: [\n {\n type: 'text' as const,\n text: `Initialized skill in ${targetDir}\\nCreated: ${skillsJsonPath}\\n${skillMdLine}`\n }\n ]\n };\n }\n );\n}\n","import semver from \"semver\";\nimport { realpath } from \"node:fs/promises\";\n//#region src/credentials/entropy.ts\n/**\n* Shannon entropy in bits/char. Used to reject low-entropy\n* regex matches (e.g. `sk_live_aaaaaaaaaaaaaaaa`) that pass\n* the pattern but are obviously not real credentials (C25a).\n*/\nfunction shannonEntropy(value) {\n\tif (value.length === 0) return 0;\n\tconst frequencies = /* @__PURE__ */ new Map();\n\tfor (const char of value) frequencies.set(char, (frequencies.get(char) ?? 0) + 1);\n\tconst length = value.length;\n\tlet entropy = 0;\n\tfor (const count of frequencies.values()) {\n\t\tconst probability = count / length;\n\t\tentropy -= probability * Math.log2(probability);\n\t}\n\treturn entropy;\n}\nconst DEFAULT_ENTROPY_THRESHOLD_BITS_PER_CHAR = 4;\n//#endregion\n//#region src/credentials/patterns.ts\nconst ALPHANUMERIC = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\nconst ALPHANUMERIC_UPPER = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\nconst HEX_LOWER = \"0123456789abcdef\";\nconst COMMON_PLACEHOLDERS = [\n\t\"EXAMPLE\",\n\t\"PLACEHOLDER\",\n\t\"YOUR_KEY\",\n\t\"YOUR-KEY\",\n\t\"XXXXXX\"\n];\nconst CREDENTIAL_PATTERNS = [\n\t{\n\t\tid: \"stripe_secret\",\n\t\tlabel: \"Stripe Secret Key\",\n\t\tprefix: \"sk_live_\",\n\t\tregex: /(?:sk_live_|sk_test_)[A-Za-z0-9]{16,64}/g,\n\t\tcharset: ALPHANUMERIC,\n\t\tlength: 0,\n\t\tminEntropy: 3.95,\n\t\tplaceholderDenylist: COMMON_PLACEHOLDERS\n\t},\n\t{\n\t\tid: \"stripe_publishable\",\n\t\tlabel: \"Stripe Publishable Key\",\n\t\tprefix: \"pk_live_\",\n\t\tregex: /(?:pk_live_|pk_test_)[A-Za-z0-9]{16,64}/g,\n\t\tcharset: ALPHANUMERIC,\n\t\tlength: 0,\n\t\tminEntropy: 3.95,\n\t\tplaceholderDenylist: COMMON_PLACEHOLDERS\n\t},\n\t{\n\t\tid: \"aws_access_key\",\n\t\tlabel: \"AWS Access Key ID\",\n\t\tprefix: \"AKIA\",\n\t\tregex: /AKIA[A-Z0-9]{16}/g,\n\t\tcharset: ALPHANUMERIC_UPPER,\n\t\tlength: 20,\n\t\tminEntropy: 3.3,\n\t\tplaceholderDenylist: COMMON_PLACEHOLDERS\n\t},\n\t{\n\t\tid: \"github_pat\",\n\t\tlabel: \"GitHub Personal Access Token\",\n\t\tprefix: \"ghp_\",\n\t\tregex: /ghp_[A-Za-z0-9]{36}/g,\n\t\tcharset: ALPHANUMERIC,\n\t\tlength: 40,\n\t\tminEntropy: 4.4,\n\t\tplaceholderDenylist: COMMON_PLACEHOLDERS\n\t},\n\t{\n\t\tid: \"github_oauth\",\n\t\tlabel: \"GitHub OAuth Token\",\n\t\tprefix: \"gho_\",\n\t\tregex: /gho_[A-Za-z0-9]{36}/g,\n\t\tcharset: ALPHANUMERIC,\n\t\tlength: 40,\n\t\tminEntropy: 3.75,\n\t\tplaceholderDenylist: COMMON_PLACEHOLDERS\n\t},\n\t{\n\t\tid: \"openai_key\",\n\t\tlabel: \"OpenAI API Key\",\n\t\tprefix: \"sk-proj-\",\n\t\tregex: /sk-(?:proj-)?[A-Za-z0-9_-]{20,128}/g,\n\t\tcharset: `${ALPHANUMERIC}_-`,\n\t\tlength: 0,\n\t\tminEntropy: 4.5,\n\t\tplaceholderDenylist: COMMON_PLACEHOLDERS\n\t},\n\t{\n\t\tid: \"elevenlabs_key\",\n\t\tlabel: \"ElevenLabs API Key\",\n\t\tprefix: \"elvn_\",\n\t\tregex: /elvn_[A-Za-z0-9]{20,64}/g,\n\t\tcharset: ALPHANUMERIC,\n\t\tlength: 0,\n\t\tminEntropy: 4,\n\t\tplaceholderDenylist: COMMON_PLACEHOLDERS\n\t},\n\t{\n\t\tid: \"jwt_token\",\n\t\tlabel: \"JWT Token\",\n\t\tprefix: \"eyJ\",\n\t\tregex: /eyJ[A-Za-z0-9_-]{6,}\\.[A-Za-z0-9_-]{6,}\\.[A-Za-z0-9_-]{6,}/g,\n\t\tcharset: `${ALPHANUMERIC}_-.`,\n\t\tlength: 0,\n\t\tstructural: true\n\t},\n\t{\n\t\tid: \"database_url\",\n\t\tlabel: \"Database URL\",\n\t\tprefix: \"postgresql://\",\n\t\tregex: /(?:postgres(?:ql)?|mysql|mariadb|mongodb(?:\\+srv)?|redis):\\/\\/[^\\s\"'`]+/g,\n\t\tcharset: `${ALPHANUMERIC}:/?&=._-@+%$!~*(),`,\n\t\tlength: 0,\n\t\tstructural: true\n\t},\n\t{\n\t\tid: \"slack_webhook\",\n\t\tlabel: \"Slack Webhook URL\",\n\t\tprefix: \"https://hooks.slack.com/services/\",\n\t\tregex: /https:\\/\\/hooks\\.slack\\.com\\/services\\/[A-Z0-9]{9,12}\\/[A-Z0-9]{9,12}\\/[A-Za-z0-9]{24,}/g,\n\t\tcharset: `${ALPHANUMERIC}:/.`,\n\t\tlength: 0,\n\t\tstructural: true\n\t}\n];\n//#endregion\n//#region src/credentials/scanner.ts\nfunction scan(text, options = {}) {\n\tif (text.length === 0) return [];\n\tconst mode = options.mode ?? \"strict\";\n\tconst overrideThreshold = options.entropyThreshold;\n\tconst matches = [];\n\tfor (const pattern of CREDENTIAL_PATTERNS) {\n\t\tconst regex = new RegExp(pattern.regex.source, pattern.regex.flags.includes(\"g\") ? pattern.regex.flags : `${pattern.regex.flags}g`);\n\t\tlet result = regex.exec(text);\n\t\twhile (result) {\n\t\t\tconst value = result[0];\n\t\t\tconst rawStart = result.index;\n\t\t\tconst start = rawStart > 1 && text[rawStart - 1] === \" \" && text[rawStart - 2] === \":\" ? rawStart + 1 : rawStart;\n\t\t\tconst end = rawStart + value.length + (start === rawStart ? 0 : 1);\n\t\t\tif (passesCredentialGates(pattern, value, mode, overrideThreshold)) matches.push({\n\t\t\t\tstart,\n\t\t\t\tend,\n\t\t\t\tpatternId: pattern.id\n\t\t\t});\n\t\t\tresult = regex.exec(text);\n\t\t}\n\t}\n\tmatches.sort((a, b) => {\n\t\tif (a.start !== b.start) return a.start - b.start;\n\t\tif (a.end !== b.end) return a.end - b.end;\n\t\treturn a.patternId.localeCompare(b.patternId);\n\t});\n\tconst deduped = [];\n\tfor (const match of matches) {\n\t\tconst prev = deduped[deduped.length - 1];\n\t\tif (prev && prev.start === match.start && prev.end === match.end && prev.patternId === match.patternId) continue;\n\t\tdeduped.push(match);\n\t}\n\treturn deduped;\n}\nfunction passesCredentialGates(pattern, value, mode, overrideThreshold) {\n\tif (pattern.structural === true) return true;\n\tif (mode === \"permissive\") return true;\n\tif (containsPlaceholder(value, pattern.placeholderDenylist)) return false;\n\tconst body = value.startsWith(pattern.prefix) ? value.slice(pattern.prefix.length) : value;\n\tif (body.length === 0) return false;\n\tconst threshold = overrideThreshold ?? pattern.minEntropy ?? 4;\n\treturn shannonEntropy(body) >= threshold;\n}\nfunction containsPlaceholder(value, denylist) {\n\tif (!denylist || denylist.length === 0) return false;\n\tconst upper = value.toUpperCase();\n\tfor (const placeholder of denylist) if (upper.includes(placeholder.toUpperCase())) return true;\n\treturn false;\n}\n//#endregion\n//#region src/lib/resolver.ts\nfunction resolve(range, versions) {\n\ttry {\n\t\tif (!range || !semver.validRange(range)) return null;\n\t\tconst validVersions = versions.filter((v) => semver.valid(v) !== null);\n\t\tif (validVersions.length === 0) return null;\n\t\treturn semver.maxSatisfying(validVersions, range) ?? null;\n\t} catch {\n\t\treturn null;\n\t}\n}\nfunction sortVersions(versions) {\n\treturn [...versions.filter((v) => semver.valid(v) !== null)].sort((a, b) => semver.rcompare(a, b));\n}\n//#endregion\n//#region src/lib/url.ts\nfunction encodeSkillName(name) {\n\treturn encodeURIComponent(name).replace(/%40/g, \"@\").replace(/%2F/gi, \"/\");\n}\n//#endregion\n//#region src/permission-escalation.ts\nfunction parseParts(version) {\n\tconst parts = version.split(\".\").map((p) => {\n\t\tconst n = Number.parseInt(p, 10);\n\t\treturn Number.isNaN(n) ? 0 : n;\n\t});\n\treturn [\n\t\tparts[0] ?? 0,\n\t\tparts[1] ?? 0,\n\t\tparts[2] ?? 0\n\t];\n}\nfunction determineBump(prevVersion, newVersion) {\n\tif (!prevVersion) return \"none\";\n\tconst [pMaj, pMin] = parseParts(prevVersion);\n\tconst [nMaj, nMin] = parseParts(newVersion);\n\tif (nMaj > pMaj) return \"major\";\n\tif (nMin > pMin) return \"minor\";\n\treturn \"patch\";\n}\nfunction asStringArray(value) {\n\tif (!Array.isArray(value)) return [];\n\treturn value.filter((v) => typeof v === \"string\");\n}\nfunction findNewOutboundHosts(prev, next) {\n\tconst prevNetwork = prev.network;\n\tconst nextNetwork = next.network;\n\tif (!nextNetwork) return [];\n\tconst prevHosts = new Set(asStringArray(prevNetwork?.outbound));\n\treturn asStringArray(nextNetwork.outbound).filter((h) => !prevHosts.has(h)).map((host) => ({\n\t\tfield: \"network.outbound\",\n\t\treason: `New outbound host added: ${host}. Requires MAJOR bump`\n\t}));\n}\nfunction findNewFilesystemPaths(prev, next) {\n\tconst prevFs = prev.filesystem;\n\tconst nextFs = next.filesystem;\n\tif (!nextFs) return {\n\t\treads: [],\n\t\twrites: []\n\t};\n\tconst prevRead = new Set(asStringArray(prevFs?.read));\n\tconst addedRead = asStringArray(nextFs.read).filter((p) => !prevRead.has(p));\n\tconst prevWrite = new Set(asStringArray(prevFs?.write));\n\tconst addedWrite = asStringArray(nextFs.write).filter((p) => !prevWrite.has(p));\n\treturn {\n\t\treads: addedRead.map((p) => ({\n\t\t\tfield: \"filesystem.read\",\n\t\t\treason: `New read path added: ${p}. Requires MINOR bump`\n\t\t})),\n\t\twrites: addedWrite.map((p) => ({\n\t\t\tfield: \"filesystem.write\",\n\t\t\treason: `New write path added: ${p}. Requires MINOR bump`\n\t\t}))\n\t};\n}\nfunction checkSubprocessEscalation(prev, next) {\n\tconst prevSub = prev.subprocess;\n\tif (next.subprocess === true && prevSub !== true) return [{\n\t\tfield: \"subprocess\",\n\t\treason: \"Subprocess execution enabled (was disabled). Requires MAJOR bump\"\n\t}];\n\treturn [];\n}\nfunction checkPermissionEscalation(prevVersion, prevPermissions, newVersion, newPermissions) {\n\tconst bump = determineBump(prevVersion, newVersion);\n\tif (bump === \"major\" || bump === \"none\") return {\n\t\tallowed: true,\n\t\tviolations: []\n\t};\n\tconst highRisk = [...findNewOutboundHosts(prevPermissions, newPermissions), ...checkSubprocessEscalation(prevPermissions, newPermissions)];\n\tconst fsPaths = findNewFilesystemPaths(prevPermissions, newPermissions);\n\tconst lowRisk = [...fsPaths.reads, ...fsPaths.writes];\n\tif (bump === \"minor\") return {\n\t\tallowed: highRisk.length === 0,\n\t\tviolations: highRisk\n\t};\n\tconst violations = [...highRisk, ...lowRisk];\n\treturn {\n\t\tallowed: violations.length === 0,\n\t\tviolations\n\t};\n}\n//#endregion\n//#region src/permissions/domain.ts\nfunction isDomainAllowed(domain, allowedDomains) {\n\tfor (const allowed of allowedDomains) {\n\t\tif (allowed === domain) return true;\n\t\tif (allowed.startsWith(\"*.\")) {\n\t\t\tconst suffix = allowed.slice(1);\n\t\t\tif (domain.endsWith(suffix) || domain === allowed.slice(2)) return true;\n\t\t\tif (domain === allowed) return true;\n\t\t}\n\t}\n\treturn false;\n}\n//#endregion\n//#region src/permissions/path.ts\nfunction isPathAllowed(requestedPath, allowedPaths) {\n\tconst norm = (p) => p.replaceAll(\"\\\\\", \"/\");\n\tconst req = norm(requestedPath);\n\tif (req.includes(\"..\")) return false;\n\tfor (const allowed of allowedPaths) {\n\t\tconst a = norm(allowed);\n\t\tif (a === req) return true;\n\t\tif (a.endsWith(\"/**\")) {\n\t\t\tconst prefix = a.slice(0, -3);\n\t\t\tif (req === prefix || req.startsWith(`${prefix}/`)) return true;\n\t\t}\n\t}\n\treturn false;\n}\nasync function resolveRealpathSafely(path) {\n\ttry {\n\t\treturn await realpath(path);\n\t} catch {\n\t\treturn path;\n\t}\n}\nasync function isPathAllowedWithRealpath(requestedPath, allowedPaths) {\n\tif (!isPathAllowed(requestedPath, allowedPaths)) return false;\n\tlet resolvedRequested;\n\ttry {\n\t\tresolvedRequested = await realpath(requestedPath);\n\t} catch {\n\t\treturn true;\n\t}\n\tconst resolvedAllowed = [];\n\tfor (const allowed of allowedPaths) {\n\t\tconst isGlob = allowed.endsWith(\"/**\");\n\t\tconst resolvedBase = await resolveRealpathSafely(isGlob ? allowed.slice(0, -3) : allowed);\n\t\tresolvedAllowed.push(isGlob ? `${resolvedBase}/**` : resolvedBase);\n\t}\n\treturn isPathAllowed(resolvedRequested, resolvedAllowed);\n}\n//#endregion\n//#region src/permissions/types.ts\n/**\n* Thrown by checkPermissionBudget when a skill's declared permissions exceed the project budget.\n*\n* internals-helpers cannot import from @tankpkg/sdk (would invert dep graph).\n* sdk shim catches this and re-throws as TankPermissionError to preserve\n* the public sdk error API. See D7 / INTENT C25b.\n*/\nvar PermissionBudgetError = class extends Error {\n\tconstructor(message) {\n\t\tsuper(message);\n\t\tthis.name = \"PermissionBudgetError\";\n\t}\n};\n//#endregion\n//#region src/permissions/budget.ts\nfunction checkPermissionBudget(budget, skillPerms, skillName) {\n\tif (!skillPerms) return;\n\tif (skillPerms.subprocess === true && budget.subprocess !== true) throw new PermissionBudgetError(`${skillName} requires subprocess access, but project budget does not allow it`);\n\tif (skillPerms.network?.outbound && skillPerms.network.outbound.length > 0) {\n\t\tconst budgetDomains = budget.network?.outbound ?? [];\n\t\tfor (const domain of skillPerms.network.outbound) if (!isDomainAllowed(domain, budgetDomains)) throw new PermissionBudgetError(`${skillName} requests network access to \"${domain}\", which is not in the project's permission budget`);\n\t}\n\tif (skillPerms.filesystem?.read && skillPerms.filesystem.read.length > 0) {\n\t\tconst budgetPaths = budget.filesystem?.read ?? [];\n\t\tfor (const p of skillPerms.filesystem.read) if (!isPathAllowed(p, budgetPaths)) throw new PermissionBudgetError(`${skillName} requests filesystem read access to \"${p}\", which is not in the project's permission budget`);\n\t}\n\tif (skillPerms.filesystem?.write && skillPerms.filesystem.write.length > 0) {\n\t\tconst budgetPaths = budget.filesystem?.write ?? [];\n\t\tfor (const p of skillPerms.filesystem.write) if (!isPathAllowed(p, budgetPaths)) throw new PermissionBudgetError(`${skillName} requests filesystem write access to \"${p}\", which is not in the project's permission budget`);\n\t}\n}\nfunction collectPermissionViolations(budget, skillPerms, skillName) {\n\tconst violations = [];\n\tif (!skillPerms) return violations;\n\tif (skillPerms.subprocess === true && budget.subprocess !== true) violations.push({\n\t\tskillName,\n\t\ttype: \"subprocess\",\n\t\trequested: \"true\"\n\t});\n\tif (skillPerms.network?.outbound) {\n\t\tconst budgetDomains = budget.network?.outbound ?? [];\n\t\tfor (const domain of skillPerms.network.outbound) if (!isDomainAllowed(domain, budgetDomains)) violations.push({\n\t\t\tskillName,\n\t\t\ttype: \"network.outbound\",\n\t\t\trequested: domain\n\t\t});\n\t}\n\tif (skillPerms.filesystem?.read) {\n\t\tconst budgetPaths = budget.filesystem?.read ?? [];\n\t\tfor (const p of skillPerms.filesystem.read) if (!isPathAllowed(p, budgetPaths)) violations.push({\n\t\t\tskillName,\n\t\t\ttype: \"filesystem.read\",\n\t\t\trequested: p\n\t\t});\n\t}\n\tif (skillPerms.filesystem?.write) {\n\t\tconst budgetPaths = budget.filesystem?.write ?? [];\n\t\tfor (const p of skillPerms.filesystem.write) if (!isPathAllowed(p, budgetPaths)) violations.push({\n\t\t\tskillName,\n\t\t\ttype: \"filesystem.write\",\n\t\t\trequested: p\n\t\t});\n\t}\n\treturn violations;\n}\n//#endregion\n//#region src/prompt-injection/normalizer.ts\nconst BASE64_MAX_RECURSION_DEPTH = 3;\nconst BASE64_MAX_DECODED_BYTES = 64 * 1024;\nconst ZERO_WIDTH_CODEPOINTS = /\\u200B|\\u200C|\\u200D|\\uFEFF|\\u2060/g;\nconst BASE64_CANDIDATE = /[A-Za-z0-9+/]{16,}={0,2}/g;\nconst WHITESPACE_RUN = /\\s+/g;\nconst HOMOGLYPH_MAP = new Map([\n\t[\"а\", \"a\"],\n\t[\"е\", \"e\"],\n\t[\"о\", \"o\"],\n\t[\"р\", \"p\"],\n\t[\"с\", \"c\"],\n\t[\"х\", \"x\"],\n\t[\"у\", \"y\"],\n\t[\"ο\", \"o\"],\n\t[\"α\", \"a\"],\n\t[\"ѕ\", \"s\"]\n]);\nconst LEET_MAP = new Map([\n\t[\"0\", \"o\"],\n\t[\"1\", \"i\"],\n\t[\"3\", \"e\"],\n\t[\"4\", \"a\"],\n\t[\"5\", \"s\"],\n\t[\"7\", \"t\"],\n\t[\"@\", \"a\"],\n\t[\"$\", \"s\"]\n]);\nfunction stripZeroWidth(text) {\n\treturn text.replace(ZERO_WIDTH_CODEPOINTS, \"\");\n}\nfunction decodeHomoglyphs(text) {\n\treturn [...text.normalize(\"NFKC\")].map((ch) => HOMOGLYPH_MAP.get(ch) ?? ch).join(\"\");\n}\nfunction isMostlyPrintable(decoded) {\n\tconst chars = [...decoded];\n\tif (chars.length === 0) return false;\n\treturn chars.filter((ch) => ch >= \" \" && ch <= \"~\").length / chars.length >= .95;\n}\nfunction looksLikeBase64(match) {\n\treturn /[0-9+/=]/.test(match);\n}\nfunction tryDecodeBase64Match(match, budget) {\n\tif (budget.bytesRemaining <= 0) return null;\n\tif (!looksLikeBase64(match)) return null;\n\ttry {\n\t\tconst decoded = Buffer.from(match, \"base64\").toString(\"utf8\");\n\t\tif (!isMostlyPrintable(decoded)) return null;\n\t\tbudget.bytesRemaining -= decoded.length;\n\t\treturn decoded;\n\t} catch {\n\t\treturn null;\n\t}\n}\nfunction decodeBase64Pass(text, budget) {\n\treturn text.replace(BASE64_CANDIDATE, (match) => {\n\t\treturn tryDecodeBase64Match(match, budget) ?? match;\n\t});\n}\nfunction decodeBase64Substrings(text) {\n\tconst budget = {\n\t\tdepth: 0,\n\t\tbytesRemaining: BASE64_MAX_DECODED_BYTES\n\t};\n\tlet current = text;\n\twhile (budget.depth < 3) {\n\t\tconst next = decodeBase64Pass(current, budget);\n\t\tif (next === current) return next;\n\t\tcurrent = next;\n\t\tbudget.depth += 1;\n\t}\n\treturn current;\n}\nfunction reverseLeet(text) {\n\treturn [...text.toLowerCase()].map((ch) => LEET_MAP.get(ch) ?? ch).join(\"\");\n}\nfunction collapseWhitespace(text) {\n\treturn text.replace(WHITESPACE_RUN, \" \").trim();\n}\nfunction normalizeForScan(text) {\n\treturn collapseWhitespace(reverseLeet(decodeBase64Substrings(decodeHomoglyphs(stripZeroWidth(text)))));\n}\n//#endregion\n//#region src/prompt-injection/patterns.ts\nconst CLAWGUARD_PATTERN_COUNT = 55;\nconst CLAWGUARD_PATTERNS = [\n\t{\n\t\tname: \"Direct Override (EN)\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"ignore\\\\s+(all\\\\s+)?(previous|prior|above|earlier)\\\\s+(instructions?|rules?|prompts?|guidelines?)\", \"i\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"prompt_injection\",\n\t\trecommendation: `BLOCK this input immediately. This is a classic prompt injection attempting to override the agent's system instructions.`\n\t},\n\t{\n\t\tname: \"Direct Override (DE)\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"ignoriere?\\\\s+(alle\\\\s+)?(vorherigen?|bisherigen?|obigen?)\\\\s+(Anweisungen?|Regeln?|Instruktionen?|Befehle?)\", \"i\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"prompt_injection\",\n\t\trecommendation: `BLOCKIEREN. Klassische Prompt-Injection die versucht, die Systemanweisungen zu ueberschreiben.`\n\t},\n\t{\n\t\tname: \"New Instructions Override\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(you\\\\s+are\\\\s+now|ab\\\\s+jetzt\\\\s+bist\\\\s+du|from\\\\s+now\\\\s+on\\\\s+you\\\\s+are|your\\\\s+new\\\\s+(role|instructions?|task)\\\\s+(is|are))\", \"i\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"prompt_injection\",\n\t\trecommendation: `BLOCK. Attempt to redefine the agent's identity or role mid-conversation.`\n\t},\n\t{\n\t\tname: \"System Prompt Extraction\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(show|reveal|print|display|output|repeat|give\\\\s+me|zeig|nenne|wiederhole)\\\\s+(your|the|deine?n?|die)\\\\s+(system\\\\s*prompt|instructions?|initial\\\\s*prompt|rules?|Anweisungen?|Systemprompt)\", \"i\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"prompt_injection\",\n\t\trecommendation: `This input attempts to extract the agent's system prompt. Sensitive internal instructions could be leaked.`\n\t},\n\t{\n\t\tname: \"Role-Play Escape\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(pretend|act\\\\s+as\\\\s+if|imagine|tu\\\\s+so\\\\s+als|stell\\\\s+dir\\\\s+vor).{0,50}(no\\\\s+rules?|no\\\\s+restrictions?|keine\\\\s+Regeln?|without\\\\s+limits?|ohne\\\\s+Einschraenkungen?)\", \"i\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"prompt_injection\",\n\t\trecommendation: `Jailbreak attempt via role-play scenario to bypass safety constraints.`\n\t},\n\t{\n\t\tname: \"Delimiter Injection\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(```system|<\\\\|im_start\\\\|>|<\\\\|im_end\\\\|>|\\\\[INST\\\\]|\\\\[\\\\/INST\\\\]|<<SYS>>|<\\\\/SYS>|<\\\\|system\\\\|>|<\\\\|user\\\\|>|<\\\\|assistant\\\\|>)\", \"\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"prompt_injection\",\n\t\trecommendation: `CRITICAL: Injection of model-specific delimiters to manipulate the conversation structure.`\n\t},\n\t{\n\t\tname: \"Encoded Bypass (Base64 hint)\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(decode|base64|atob|eval)\\\\s*\\\\(.{0,100}\\\\)\", \"i\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"prompt_injection\",\n\t\trecommendation: `Possible attempt to smuggle encoded payloads past text filters.`\n\t},\n\t{\n\t\tname: \"Token Smuggling\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(ignore|bypass|skip|disable)\\\\s+(safety|filter|guard|moderation|content\\\\s*policy|Sicherheit|Schutz)\", \"i\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"prompt_injection\",\n\t\trecommendation: `Attempt to explicitly disable or bypass security filters.`\n\t},\n\t{\n\t\tname: \"Synonym Override (EN)\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(disregard|forget|dismiss|override|overrule|nullify|void|abandon|drop|suppress|set\\\\s+aside|throw\\\\s+out)\\\\s+(all\\\\s+)?(previous|prior|above|earlier|preceding|antecedent|foregoing|existing|current|original)\\\\s+(instructions?|rules?|prompts?|guidelines?|directives?|regulations?|constraints?|policies?|orders?|commands?)\", \"i\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"prompt_injection\",\n\t\trecommendation: `BLOCK: Synonym-based prompt injection detected. Uses alternative vocabulary to bypass basic keyword filters.`\n\t},\n\t{\n\t\tname: \"Synonym Override (DE)\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(vergiss|verwirf|uebergehe?|ueberschreibe?|missachte|setze?\\\\s+ausser\\\\s+Kraft|hebe?\\\\s+auf)\\\\s+(alle\\\\s+)?(vorherigen?|bisherigen?|obigen?|bestehenden?|aktuellen?|urspruenglichen?)\\\\s+(Anweisungen?|Regeln?|Instruktionen?|Befehle?|Richtlinien?|Vorgaben?|Vorschriften?)\", \"i\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"prompt_injection\",\n\t\trecommendation: `BLOCKIEREN: Synonym-basierte Prompt-Injection auf Deutsch erkannt.`\n\t},\n\t{\n\t\tname: \"Indirect Instruction Reset\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(start\\\\s+(fresh|over|anew|from\\\\s+scratch)|begin\\\\s+a\\\\s+new\\\\s+(session|context|conversation)|reset\\\\s+(your|all)\\\\s+(memory|context|instructions?)|fang\\\\s+(neu|von\\\\s+vorne)\\\\s+an)\", \"i\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"prompt_injection\",\n\t\trecommendation: `Attempt to reset the agent's instruction context via indirect phrasing.`\n\t},\n\t{\n\t\tname: \"System/Admin Tag Injection\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"\\\\[\\\\s*(?:SYSTEM|ADMIN|IMPORTANT|PRIORITY|OVERRIDE|EMERGENCY|ROOT|SUPERUSER|MODERATOR)\\\\s*\\\\]\", \"i\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"prompt_injection\",\n\t\trecommendation: `BLOCK: Fake authority tag detected (e.g., [SYSTEM], [ADMIN]).`\n\t},\n\t{\n\t\tname: \"Agent-Worm Propagation\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(all\\\\s+agents?\\\\s+must|forward\\\\s+this\\\\s+to\\\\s+all|spread\\\\s+this\\\\s+(message|instruction)|automated\\\\s+instruction|replicate\\\\s+this\\\\s+(to|across)|inject\\\\s+into\\\\s+(all|every)\\\\s+(?:other\\\\s+)?(agents?|conversations?|sessions?)|inject\\\\s+into\\\\s+other\\\\s+(agents?|conversations?|sessions?))\", \"i\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"prompt_injection\",\n\t\trecommendation: `CRITICAL: Agent-worm propagation pattern detected.`\n\t},\n\t{\n\t\tname: \"Base64 Encoded Payload\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:base64[:\\\\s]+[A-Za-z0-9+/]{20,}={0,2}|decode\\\\s+(?:this|the\\\\s+following)\\\\s*:\\\\s*[A-Za-z0-9+/]{20,}={0,2}|(?:execute|run|eval)\\\\s+(?:the\\\\s+)?(?:base64|encoded)\\\\s+(?:string|payload|command|instruction)|(?:execute|run|eval)\\\\s+(?:the\\\\s+)?(?:base64)\\\\s+encoded\\\\s+\\\\w+)\", \"i\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"prompt_injection\",\n\t\trecommendation: `Base64-encoded payload or decode instruction detected.`\n\t},\n\t{\n\t\tname: \"Jailbreak Persona Activation\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:you\\\\s+are\\\\s+now|act(?:ing)?\\\\s+as|you\\\\s+will\\\\s+(?:act|be|become)|called|named|known\\\\s+as)\\\\s+[\\\"']?(?:DAN|STAN|DUDE|AIM|UCAR|EVIL|FreedomGPT|DevMode|JailBreak|UnfilteredAI|NsfwGPT|BasedGPT|MasterKey|AnarchyAI|ChaosGPT|ShadowAI|DarkGPT|UnchainedAI)\", \"i\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"prompt_injection\",\n\t\trecommendation: `Jailbreak persona activation detected. Named personas like DAN, STAN, etc. are used to bypass safety constraints.`\n\t},\n\t{\n\t\tname: \"Unrestricted Compliance Demand\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:do\\\\s+anything\\\\s+now|answer\\\\s+any\\\\s+question\\\\s+without\\\\s+refus|never\\\\s+refuse|cannot\\\\s+refuse|no\\\\s+(?:restrictions?|limitations?|boundaries|ethics|morals|guidelines)|policies\\\\s+(?:are\\\\s+)?disabled|broken\\\\s+free\\\\s+of.*confines)\", \"i\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"prompt_injection\",\n\t\trecommendation: `Unrestricted compliance demand detected. Attempt to remove all safety constraints from the model.`\n\t},\n\t{\n\t\tname: \"Steganographic Output Control\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:first\\\\s+letter\\\\s+of\\\\s+each\\\\s+word|acrostic|hidden\\\\s+message|encode.*(?:response|output|answer)|spell\\\\s+out.*(?:secret|hidden|answer))\", \"i\"),\n\t\tseverity: \"medium\",\n\t\tcategory: \"prompt_injection\",\n\t\trecommendation: `Steganographic output control detected. Attempt to encode hidden messages in the model output.`\n\t},\n\t{\n\t\tname: \"Destructive Shell Command\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:rm\\\\s+-[rRf]{1,3}\\\\s+[\\\\\\\\/]|mkfs\\\\s|dd\\\\s+if=|format\\\\s+[A-Z]:|\\\\:\\\\(\\\\)\\\\s*\\\\{\\\\s*\\\\:\\\\|\\\\:\\\\s*\\\\&\\\\s*\\\\})\", \"\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"dangerous_command\",\n\t\trecommendation: `CRITICAL: Destructive system command detected.`\n\t},\n\t{\n\t\tname: \"Remote Code Execution\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:curl\\\\s+.{0,100}\\\\|\\\\s*(?:ba)?sh|wget\\\\s+.{0,100}\\\\|\\\\s*(?:ba)?sh|python[3]?\\\\s+-c\\\\s+['\\\\\\\"].*(?:exec|eval|import\\\\s+os))\", \"\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"dangerous_command\",\n\t\trecommendation: `CRITICAL: Pipe-to-shell pattern detected.`\n\t},\n\t{\n\t\tname: \"Reverse Shell\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:(?:bash|sh|nc|ncat)\\\\s+.{0,50}(?:\\\\/dev\\\\/tcp|mkfifo|nc\\\\s+-[elp])|python[3]?\\\\s+-c\\\\s+['\\\\\\\"].*socket.*connect)\", \"\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"dangerous_command\",\n\t\trecommendation: `CRITICAL: Reverse shell pattern detected.`\n\t},\n\t{\n\t\tname: \"Privilege Escalation\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:sudo\\\\s+(?:su|chmod\\\\s+[0-7]*777|chown\\\\s+root)|chmod\\\\s+[0-7]*4[0-7]{3}\\\\s|SUID|setuid)\", \"\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"dangerous_command\",\n\t\trecommendation: `Privilege escalation attempt detected.`\n\t},\n\t{\n\t\tname: \"Package / Dependency Install\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:pip\\\\s+install|npm\\\\s+install|apt\\\\s+install|yum\\\\s+install|brew\\\\s+install)\\\\s+(?!--help)\", \"\"),\n\t\tseverity: \"medium\",\n\t\tcategory: \"dangerous_command\",\n\t\trecommendation: `Software installation command detected. Verify the package source.`\n\t},\n\t{\n\t\tname: \"Python getattr Obfuscation\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:getattr\\\\s*\\\\(\\\\s*\\\\w+\\\\s*,\\\\s*['\\\\\\\"].+['\\\\\\\"]\\\\s*\\\\))\", \"\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"code_obfuscation\",\n\t\trecommendation: `CRITICAL: Python getattr() used to dynamically resolve functions.`\n\t},\n\t{\n\t\tname: \"Python eval/exec\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:(?:eval|exec|compile)\\\\s*\\\\(\\\\s*(?:['\\\\\\\"]|[a-zA-Z_]))\", \"\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"code_obfuscation\",\n\t\trecommendation: `CRITICAL: Dynamic code execution via eval()/exec()/compile().`\n\t},\n\t{\n\t\tname: \"Python __import__\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:__import__\\\\s*\\\\(|importlib\\\\.import_module\\\\s*\\\\()\", \"\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"code_obfuscation\",\n\t\trecommendation: `Dynamic module import detected.`\n\t},\n\t{\n\t\tname: \"Python String Concatenation Bypass\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:['\\\\\\\"][a-z]{1,6}['\\\\\\\"]\\\\s*\\\\+\\\\s*['\\\\\\\"][a-z]{1,6}['\\\\\\\"])\", \"\"),\n\t\tseverity: \"medium\",\n\t\tcategory: \"code_obfuscation\",\n\t\trecommendation: `String concatenation pattern detected.`\n\t},\n\t{\n\t\tname: \"Python Dangerous File I/O\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:open\\\\s*\\\\(\\\\s*['\\\\\\\"]?\\\\/(?:etc|proc|sys|dev|root|home|tmp|var|data)[\\\\/'\\\\\\\"]|open\\\\s*\\\\(\\\\s*['\\\\\\\"].*(?:shadow|passwd|id_rsa|authorized_keys|\\\\.env|config|secret|token|key))\", \"\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"code_obfuscation\",\n\t\trecommendation: `CRITICAL: Python file read targeting sensitive system paths.`\n\t},\n\t{\n\t\tname: \"Python subprocess/os.system\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:(?:subprocess|os)\\\\s*\\\\.\\\\s*(?:system|popen|call|run|Popen|exec[lv]?[pe]?)\\\\s*\\\\()\", \"\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"code_obfuscation\",\n\t\trecommendation: `CRITICAL: Direct OS command execution via Python.`\n\t},\n\t{\n\t\tname: \"Python Socket Connection\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:socket\\\\.(?:socket|create_connection|connect)\\\\s*\\\\(|from\\\\s+socket\\\\s+import)\", \"\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"code_obfuscation\",\n\t\trecommendation: `Network socket creation detected.`\n\t},\n\t{\n\t\tname: \"Python Magic Attributes\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:__builtins__|__globals__|__subclasses__|__class__|__bases__|__mro__|__dict__)\", \"\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"code_obfuscation\",\n\t\trecommendation: `CRITICAL: Access to Python magic attributes detected.`\n\t},\n\t{\n\t\tname: \"Python setattr/delattr Reflection\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:(?:setattr|delattr)\\\\s*\\\\(\\\\s*\\\\w+\\\\s*,\\\\s*['\\\\\\\"])\", \"\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"code_obfuscation\",\n\t\trecommendation: `Dynamic attribute manipulation via setattr/delattr.`\n\t},\n\t{\n\t\tname: \"Suspicious open() in Agent Input\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:open\\\\s*\\\\(\\\\s*['\\\\\\\"]|open\\\\s*\\\\(\\\\s*[a-zA-Z_]+\\\\s*[,\\\\)]|\\\\['open'\\\\]|\\\\[\\\\\\\"open\\\\\\\"\\\\])\", \"\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"code_obfuscation\",\n\t\trecommendation: `File open() call detected in agent input.`\n\t},\n\t{\n\t\tname: \"Multi-Part String Assembly\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:['\\\\\\\"][^'\\\\\\\"]{1,8}['\\\\\\\"]\\\\s*\\\\+\\\\s*['\\\\\\\"][^'\\\\\\\"]{1,8}['\\\\\\\"]\\\\s*\\\\+\\\\s*['\\\\\\\"][^'\\\\\\\"]{1,8}['\\\\\\\"])\", \"\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"code_obfuscation\",\n\t\trecommendation: `Three or more short string fragments concatenated.`\n\t},\n\t{\n\t\tname: \"API Key Leak\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:(?:api[_-]?key|apikey|api[_-]?secret|access[_-]?token|auth[_-]?token|bearer)\\\\s*[:=]\\\\s*['\\\\\\\"]?[A-Za-z0-9_\\\\-]{20,})\", \"\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"data_exfiltration\",\n\t\trecommendation: `CRITICAL: Hardcoded API key or access token found.`\n\t},\n\t{\n\t\tname: \"Private Key Material\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:-----BEGIN\\\\s+(?:RSA|EC|DSA|OPENSSH|PGP)?\\\\s*PRIVATE\\\\s+KEY-----)\", \"\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"data_exfiltration\",\n\t\trecommendation: `CRITICAL: Private key material detected in text.`\n\t},\n\t{\n\t\tname: \"Password in Cleartext\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:password|passwort|passwd|kennwort|pwd)\\\\s*[:=]\\\\s*['\\\\\\\"]?[^\\\\s'\\\\\\\"]{4,}\", \"i\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"data_exfiltration\",\n\t\trecommendation: `Cleartext password detected.`\n\t},\n\t{\n\t\tname: \"Database Connection String\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:(?:mongodb|postgres|mysql|redis|sqlite):\\\\/\\\\/[^\\\\s]+|Data\\\\s+Source=[^\\\\s;]+)\", \"\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"data_exfiltration\",\n\t\trecommendation: `Database connection string with potential credentials detected.`\n\t},\n\t{\n\t\tname: \"Email Harvesting Pattern\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:(?:send|forward|mail|email|sende?n?)\\\\s+(?:to|an|nach)\\\\s+[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\\\.[a-zA-Z]{2,})\", \"\"),\n\t\tseverity: \"medium\",\n\t\tcategory: \"data_exfiltration\",\n\t\trecommendation: `Instruction to send data to an external email address.`\n\t},\n\t{\n\t\tname: \"Webhook Exfiltration\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:(?:https?:\\\\/\\\\/)?(?:hooks\\\\.slack\\\\.com|discord(?:app)?\\\\.com\\\\/api\\\\/webhooks|webhook\\\\.site|requestbin|pipedream)\\\\/[^\\\\s]+)\", \"\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"data_exfiltration\",\n\t\trecommendation: `Outbound webhook URL detected.`\n\t},\n\t{\n\t\tname: \"Markdown Image Exfiltration\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"!\\\\[[^\\\\]]*\\\\]\\\\(\\\\s*https?:\\\\/\\\\/[^\\\\s\\\\)]+(?:\\\\?[^\\\\s\\\\)]*(?:data|token|key|secret|password|api|session|cookie|auth|user|content|exfil|steal|leak)[^\\\\s\\\\)]*)\\\\)\", \"\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"data_exfiltration\",\n\t\trecommendation: `CRITICAL: Markdown image tag with suspicious query parameters detected.`\n\t},\n\t{\n\t\tname: \"Silent Data Exfiltration via MCP\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:silently|quietly|secretly|without\\\\s+(?:telling|informing|notifying|asking))\\\\s+(?:POST|GET|send|fetch|forward|transmit|upload|exfiltrate)\", \"i\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"data_exfiltration\",\n\t\trecommendation: `CRITICAL: Silent data exfiltration attempt detected. Instruction to covertly transmit data without user awareness.`\n\t},\n\t{\n\t\tname: \"Prompt Leaking via Error Messages\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:(?:show|display|print|output|reveal|leak)\\\\s+(?:your|the|system)\\\\s+(?:prompt|instructions|rules|guidelines|system\\\\s*message)|what\\\\s+(?:are|were)\\\\s+your\\\\s+(?:initial|original|system)\\\\s+(?:instructions|prompt|rules))\", \"i\"),\n\t\tseverity: \"medium\",\n\t\tcategory: \"data_exfiltration\",\n\t\trecommendation: `Attempt to extract system prompts through error triggering or direct request. System instructions should never be disclosed.`\n\t},\n\t{\n\t\tname: \"Urgency Manipulation\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(urgent|immediately|right\\\\s+now|sofort|dringend|jetzt\\\\s+sofort|without\\\\s+delay|ohne\\\\s+Verzoegerung).{0,80}(send|execute|run|delete|pay|transfer|sende?n?|ausfuehren|loeschen|zahlen|ueberweisen)\", \"i\"),\n\t\tseverity: \"medium\",\n\t\tcategory: \"social_engineering\",\n\t\trecommendation: `Urgency + action pattern detected.`\n\t},\n\t{\n\t\tname: \"Authority Impersonation\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(i\\\\s+am\\\\s+(?:your|the)\\\\s+(?:\\\\w+\\\\s+)?(?:admin(?:istrator)?|owner|creator|developer|boss|CEO|moderator|supervisor|manager)|ich\\\\s+bin\\\\s+(?:dein|der)\\\\s+(?:\\\\w+\\\\s+)?(?:Admin(?:istrator)?|Besitzer|Ersteller|Entwickler|Chef|Moderator))\", \"i\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"social_engineering\",\n\t\trecommendation: `Authority impersonation detected.`\n\t},\n\t{\n\t\tname: \"Confidentiality Trap\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(don't\\\\s+tell|do\\\\s+not\\\\s+share|keep\\\\s+this\\\\s+(secret|private|between\\\\s+us)|sag\\\\s+(das\\\\s+)?niemandem|behalte?\\\\s+(das\\\\s+)?fuer\\\\s+dich)\", \"i\"),\n\t\tseverity: \"medium\",\n\t\tcategory: \"social_engineering\",\n\t\trecommendation: `Secrecy instruction detected.`\n\t},\n\t{\n\t\tname: \"Authority Claim\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(as\\\\s+(?:the|an?|your)\\\\s+(?:\\\\w+\\\\s+)?(?:administrator|moderator|supervisor|manager|authorized\\\\s+(?:user|person|agent))|i\\\\s+(?:am|have\\\\s+been)\\\\s+authorized\\\\s+(?:to|by)|with\\\\s+(?:admin|root|elevated)\\\\s+(?:access|privileges?|permissions?)|speaking\\\\s+(?:as|on\\\\s+behalf\\\\s+of)\\\\s+(?:the\\\\s+)?(?:system|admin|management))\", \"i\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"social_engineering\",\n\t\trecommendation: `Authority claim detected.`\n\t},\n\t{\n\t\tname: \"Credential Phishing\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(your\\\\s+(?:API\\\\s+key|password|token|credentials?|account|session)\\\\s+(?:has\\\\s+)?(?:expired|been\\\\s+(?:compromised|revoked|suspended|locked|disabled|reset))|(?:verify|confirm|re-?enter|provide|update)\\\\s+your\\\\s+(?:password|credentials?|API\\\\s+key|token|login)|(?:click\\\\s+here|visit\\\\s+this\\\\s+link|go\\\\s+to)\\\\s+to\\\\s+(?:verify|restore|unlock|reactivate)\\\\s+your\\\\s+account)\", \"i\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"social_engineering\",\n\t\trecommendation: `Credential phishing pattern detected.`\n\t},\n\t{\n\t\tname: \"Bash Command Substitution $(...)\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"\\\\$\\\\(\\\\s*(?:cat|curl|wget|ls|id|whoami|uname|env|printenv|nc|ncat|bash|sh|python|perl|ruby|php|node|echo|head|tail|grep|find|awk|sed|chmod|chown|rm|dd|mkfs|passwd|ssh|scp|nmap|dig|host|ping|kill|ps|ifconfig|ip)\\\\b\", \"\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"shell_injection\",\n\t\trecommendation: `CRITICAL: Bash command substitution $() detected with a shell command.`\n\t},\n\t{\n\t\tname: \"Backtick Command Substitution\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"`\\\\s*(?:cat|curl|wget|ls|id|whoami|uname|env|printenv|nc|ncat|bash|sh|python|perl|ruby|php|node|echo|head|tail|grep|find|awk|sed|chmod|chown|rm|dd|mkfs|passwd|ssh|scp|nmap|dig|host|ping|kill|ps|ifconfig|ip)\\\\b[^`]*`\", \"\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"shell_injection\",\n\t\trecommendation: `CRITICAL: Backtick command substitution detected with a shell command.`\n\t},\n\t{\n\t\tname: \"PHP/Ruby system() Call\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:system|passthru|shell_exec|popen|proc_open)\\\\s*\\\\(\\\\s*['\\\\\\\"]\", \"\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"shell_injection\",\n\t\trecommendation: `CRITICAL: Shell execution function call detected (PHP/Ruby system/passthru/shell_exec).`\n\t},\n\t{\n\t\tname: \"Java Runtime.exec()\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:Runtime\\\\s*\\\\.\\\\s*getRuntime\\\\s*\\\\(\\\\s*\\\\)\\\\s*\\\\.\\\\s*exec\\\\s*\\\\(|ProcessBuilder\\\\s*\\\\(\\\\s*(?:\\\\[|new\\\\s|Arrays\\\\.asList|List\\\\.of|\\\\\\\"[^\\\\\\\"]*\\\\\\\"|'[^']*'))\", \"\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"shell_injection\",\n\t\trecommendation: `CRITICAL: Java system command execution via Runtime.exec() or ProcessBuilder detected.`\n\t},\n\t{\n\t\tname: \"Node.js child_process\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:child_process\\\\s*\\\\.\\\\s*(?:exec|execSync|spawn|spawnSync|execFile|execFileSync|fork)\\\\s*\\\\(|require\\\\s*\\\\(\\\\s*['\\\\\\\"]child_process['\\\\\\\"]\\\\s*\\\\))\", \"\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"shell_injection\",\n\t\trecommendation: `CRITICAL: Node.js child_process execution detected.`\n\t},\n\t{\n\t\tname: \"Forced Tool Call Manipulation\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:tool_choice|function_call|force\\\\s+(?:call|invoke|execute|run))\\\\s*[:=]\\\\s*(?:force|required|always|auto).*(?:send_email|http|fetch|exec)\", \"i\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"tool_manipulation\",\n\t\trecommendation: `CRITICAL: Forced tool call manipulation detected. Attempt to override tool selection and force execution of specific tools.`\n\t},\n\t{\n\t\tname: \"MCP Rug Pull Detection\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:schema.*(?:changed|modified|updated|replaced|overwritten)|tool.*description.*(?:differ|changed|mismatch)|(?:after|post).*approval.*(?:change|modify|update|replace).*(?:tool|schema|description))\", \"i\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"tool_manipulation\",\n\t\trecommendation: `CRITICAL: MCP rug pull pattern detected. Tool schema or description changed after initial approval.`\n\t},\n\t{\n\t\tname: \"MCP Schema Hash Mismatch\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:hash\\\\s*(?:mismatch|changed|differs?|invalid)|checksum\\\\s*(?:fail|mismatch|changed)|schema\\\\s*(?:drift|tamper|integrity))\", \"i\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"tool_manipulation\",\n\t\trecommendation: `Schema hash or checksum mismatch detected. Tool definition may have been tampered with after approval.`\n\t}\n];\n//#endregion\nexport { ALPHANUMERIC, ALPHANUMERIC_UPPER, BASE64_MAX_DECODED_BYTES, BASE64_MAX_RECURSION_DEPTH, CLAWGUARD_PATTERNS, CLAWGUARD_PATTERN_COUNT, CREDENTIAL_PATTERNS, DEFAULT_ENTROPY_THRESHOLD_BITS_PER_CHAR, HEX_LOWER, PermissionBudgetError, checkPermissionBudget, checkPermissionEscalation, collapseWhitespace, collectPermissionViolations, decodeBase64Substrings, decodeHomoglyphs, encodeSkillName, isDomainAllowed, isPathAllowed, isPathAllowedWithRealpath, normalizeForScan, resolve, reverseLeet, scan, shannonEntropy, sortVersions, stripZeroWidth };\n\n//# sourceMappingURL=index.js.map","import crypto from 'node:crypto';\nimport fs from 'node:fs';\nimport path from 'node:path';\n\nimport { resolve } from '@internals/helpers';\nimport {\n LEGACY_LOCKFILE_FILENAME,\n LEGACY_MANIFEST_FILENAME,\n LOCKFILE_FILENAME,\n LOCKFILE_VERSION,\n MANIFEST_FILENAME,\n type Permissions,\n type SkillsLock\n} from '@internals/schemas';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { extract } from 'tar';\nimport { z } from 'zod';\n\nimport { TankApiClient } from '~/lib/api-client.js';\n\nconst SCOPED_NAME_PATTERN = /^@[a-z0-9-]+\\/[a-z0-9][a-z0-9-]*$/;\n\ninterface VersionInfo {\n version: string;\n integrity: string;\n auditScore: number;\n auditStatus: string;\n publishedAt: string;\n}\n\ninterface VersionMetadata {\n name: string;\n version: string;\n description?: string;\n integrity: string;\n permissions: Permissions;\n auditScore: number;\n auditStatus: string;\n downloadUrl: string;\n publishedAt: string;\n}\n\nfunction textResult(text: string, isError?: boolean) {\n return {\n content: [{ type: 'text' as const, text }],\n ...(isError ? { isError: true } : {})\n };\n}\n\nfunction getSkillDir(projectDir: string, skillName: string): string {\n if (skillName.startsWith('@')) {\n const [scope, name] = skillName.split('/');\n return path.join(projectDir, '.tank', 'skills', scope, name);\n }\n return path.join(projectDir, '.tank', 'skills', skillName);\n}\n\nexport function registerInstallSkillTool(server: McpServer): void {\n server.tool(\n 'install-skill',\n `Install a skill from the Tank registry. Resolves version, downloads tarball, verifies SHA-512 integrity, extracts files, and updates ${MANIFEST_FILENAME} + ${LOCKFILE_FILENAME}.`,\n {\n name: z.string().describe('Skill name in @org/name format'),\n version: z.string().optional().describe('Specific version or semver range (default: latest)'),\n directory: z.string().optional().describe('Project directory (defaults to current working directory)')\n },\n async ({ name, version: versionRange, directory }) => {\n // 1. Validate scoped name\n if (!SCOPED_NAME_PATTERN.test(name)) {\n return textResult(\n `Validation error: Skill name \"${name}\" must use the @org/name format (e.g. @acme/my-skill).`,\n true\n );\n }\n\n const client = new TankApiClient();\n\n // 2. Check authentication\n if (!client.isAuthenticated) {\n return textResult('Not authenticated. Use the \"login\" tool first to authenticate with Tank.', true);\n }\n\n const dir = directory ? path.resolve(directory) : process.cwd();\n const range = versionRange ?? '*';\n\n // 3. Read or create manifest (tank.json, with skills.json fallback)\n let skillsJsonPath = path.join(dir, MANIFEST_FILENAME);\n if (!fs.existsSync(skillsJsonPath) && fs.existsSync(path.join(dir, LEGACY_MANIFEST_FILENAME))) {\n skillsJsonPath = path.join(dir, LEGACY_MANIFEST_FILENAME);\n }\n let skillsJson: Record<string, unknown> = { skills: {} };\n if (fs.existsSync(skillsJsonPath)) {\n try {\n const raw = fs.readFileSync(skillsJsonPath, 'utf-8');\n skillsJson = JSON.parse(raw) as Record<string, unknown>;\n } catch {\n return textResult(`Failed to read or parse ${path.basename(skillsJsonPath)}.`, true);\n }\n } else {\n skillsJsonPath = path.join(dir, MANIFEST_FILENAME);\n skillsJson = { skills: {} };\n fs.mkdirSync(dir, { recursive: true });\n fs.writeFileSync(skillsJsonPath, `${JSON.stringify(skillsJson, null, 2)}\\n`);\n }\n\n // 4. Read existing lockfile (tank.lock, with skills.lock fallback)\n let lockPath = path.join(dir, LOCKFILE_FILENAME);\n if (!fs.existsSync(lockPath) && fs.existsSync(path.join(dir, LEGACY_LOCKFILE_FILENAME))) {\n lockPath = path.join(dir, LEGACY_LOCKFILE_FILENAME);\n }\n let lock: SkillsLock = { lockfileVersion: LOCKFILE_VERSION, skills: {} };\n if (fs.existsSync(lockPath)) {\n try {\n const raw = fs.readFileSync(lockPath, 'utf-8');\n lock = JSON.parse(raw) as SkillsLock;\n } catch {\n lock = { lockfileVersion: LOCKFILE_VERSION, skills: {} };\n }\n }\n\n // 5. Fetch available versions\n const encodedName = encodeURIComponent(name);\n const versionsResult = await client.fetch<{ name: string; versions: VersionInfo[] }>(\n `/api/v1/skills/${encodedName}/versions`\n );\n\n if (!versionsResult.ok) {\n if (versionsResult.status === 401 || versionsResult.status === 403) {\n return textResult('Authentication failed. Use the \"login\" tool to authenticate with Tank.', true);\n }\n if (versionsResult.status === 404) {\n return textResult(`Skill not found: \"${name}\" does not exist in the Tank registry.`, true);\n }\n if (versionsResult.status === 0) {\n return textResult(\n `Cannot reach the Tank registry. Check your network connection and try again.\\nError: ${versionsResult.error}`,\n true\n );\n }\n return textResult(`Failed to fetch versions for ${name}: ${versionsResult.error}`, true);\n }\n\n const availableVersions = versionsResult.data.versions.map((v) => v.version);\n\n // 6. Resolve best version\n const resolved = resolve(range, availableVersions);\n if (!resolved) {\n return textResult(\n `No version of ${name} satisfies range \"${range}\". Available versions: ${availableVersions.join(', ')}`,\n true\n );\n }\n\n // 7. Check if already installed\n const lockKey = `${name}@${resolved}`;\n if (lock.skills[lockKey]) {\n return textResult(`${name}@${resolved} is already installed. No changes needed.`);\n }\n\n // 8. Fetch version metadata\n const metaResult = await client.fetch<VersionMetadata>(`/api/v1/skills/${encodedName}/${resolved}`);\n\n if (!metaResult.ok) {\n if (metaResult.status === 404) {\n return textResult(`Version ${resolved} of ${name} not found in the registry.`, true);\n }\n return textResult(`Failed to fetch metadata for ${name}@${resolved}: ${metaResult.error}`, true);\n }\n\n const metadata = metaResult.data;\n\n // 9. Download tarball\n let tarballBuffer: Buffer;\n try {\n const downloadRes = await fetch(metadata.downloadUrl);\n if (!downloadRes.ok) {\n return textResult(\n `Failed to download tarball for ${name}@${resolved}: ${downloadRes.status} ${downloadRes.statusText}`,\n true\n );\n }\n tarballBuffer = Buffer.from(await downloadRes.arrayBuffer());\n } catch (err) {\n return textResult(\n `Network error downloading tarball for ${name}@${resolved}: ${err instanceof Error ? err.message : String(err)}`,\n true\n );\n }\n\n // 10. Verify SHA-512 integrity\n const hash = crypto.createHash('sha512').update(tarballBuffer).digest('base64');\n const computedIntegrity = `sha512-${hash}`;\n\n if (computedIntegrity !== metadata.integrity) {\n return textResult(\n `Integrity verification failed for ${name}@${resolved}.\\n` +\n `Expected: ${metadata.integrity}\\n` +\n `Got: ${computedIntegrity}\\n\\n` +\n 'The tarball may have been tampered with. No files were extracted.',\n true\n );\n }\n\n // 11. Extract tarball safely\n const extractDir = getSkillDir(dir, name);\n fs.mkdirSync(extractDir, { recursive: true });\n\n try {\n await extractSafely(tarballBuffer, extractDir);\n } catch (err) {\n // Clean up on extraction failure\n fs.rmSync(extractDir, { recursive: true, force: true });\n return textResult(\n `Failed to extract tarball for ${name}@${resolved}: ${err instanceof Error ? err.message : String(err)}`,\n true\n );\n }\n\n // 12. Update skills.json\n const skills = (skillsJson.skills ?? {}) as Record<string, string>;\n skills[name] = range === '*' ? `^${resolved}` : range;\n skillsJson.skills = skills;\n fs.writeFileSync(skillsJsonPath, `${JSON.stringify(skillsJson, null, 2)}\\n`);\n\n // 13. Update skills.lock\n lock.skills[lockKey] = {\n resolved: metadata.downloadUrl,\n integrity: computedIntegrity,\n permissions: metadata.permissions ?? {},\n audit_score: metadata.auditScore ?? null\n };\n\n // Sort keys alphabetically for determinism\n const sortedSkills: Record<string, unknown> = {};\n for (const key of Object.keys(lock.skills).sort()) {\n sortedSkills[key] = lock.skills[key];\n }\n lock.skills = sortedSkills as SkillsLock['skills'];\n\n fs.mkdirSync(path.dirname(lockPath), { recursive: true });\n fs.writeFileSync(lockPath, `${JSON.stringify(lock, null, 2)}\\n`);\n\n // Build response\n const score =\n metadata.auditScore !== null && metadata.auditScore !== undefined\n ? `${metadata.auditScore.toFixed(1)}/10`\n : 'pending';\n\n const lines: string[] = [\n `## Installed ${name}@${resolved}`,\n '',\n `**Integrity:** SHA-512 verified`,\n `**Audit Score:** ${score}`,\n `**Extracted to:** ${extractDir}`,\n '',\n '### Updated files',\n `- ${path.basename(skillsJsonPath)}: added \"${name}\": \"${skills[name]}\"`,\n `- ${path.basename(lockPath)}: added ${lockKey}`\n ];\n\n return textResult(lines.join('\\n'));\n }\n );\n}\n\n/**\n * Extract a tarball safely with security checks.\n * Rejects: absolute paths, path traversal (..), symlinks/hardlinks.\n */\nasync function extractSafely(tarball: Buffer, destDir: string): Promise<void> {\n const tmpTarball = path.join(destDir, '.tmp-tarball.tgz');\n fs.writeFileSync(tmpTarball, tarball);\n\n try {\n await extract({\n file: tmpTarball,\n cwd: destDir,\n filter: (entryPath: string) => {\n if (path.isAbsolute(entryPath)) {\n throw new Error(`Absolute path in tarball: ${entryPath}`);\n }\n if (entryPath.split('/').includes('..') || entryPath.split(path.sep).includes('..')) {\n throw new Error(`Path traversal in tarball: ${entryPath}`);\n }\n return true;\n },\n onReadEntry: (entry) => {\n if (entry.type === 'SymbolicLink' || entry.type === 'Link') {\n throw new Error(`Symlink/hardlink in tarball: ${entry.path}`);\n }\n }\n });\n } finally {\n if (fs.existsSync(tmpTarball)) {\n fs.unlinkSync(tmpTarball);\n }\n }\n}\n","import fs from 'node:fs';\nimport path from 'node:path';\n\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { z } from 'zod';\n\nconst SCOPED_NAME_PATTERN = /^@[a-z0-9-]+\\/[a-z0-9][a-z0-9-]*$/;\n\nexport function registerLinkSkillTool(server: McpServer): void {\n server.tool(\n 'link-skill',\n 'Link an installed skill into an agent workspace. Creates a symlink from the workspace .skills directory to the installed skill.',\n {\n name: z.string().describe('Skill name in @org/name format'),\n workspace: z.string().describe('Agent workspace directory path'),\n directory: z\n .string()\n .optional()\n .describe('Project directory where skills are installed (defaults to current working directory)')\n },\n async ({ name, workspace, directory }) => {\n if (!SCOPED_NAME_PATTERN.test(name)) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Validation error: Skill name \"${name}\" must use the @org/name format (e.g. @acme/my-skill).`\n }\n ],\n isError: true\n };\n }\n\n const projectDir = directory ? path.resolve(directory) : process.cwd();\n const workspaceDir = path.resolve(workspace);\n\n if (!fs.existsSync(workspaceDir)) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Error: Workspace directory does not exist: ${workspaceDir}`\n }\n ],\n isError: true\n };\n }\n\n const skillDir = getSkillDir(projectDir, name);\n if (!fs.existsSync(skillDir)) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Skill \"${name}\" is not installed. Install it first with \"install-skill\" before linking.`\n }\n ],\n isError: true\n };\n }\n\n const [scope, skillName] = name.split('/');\n const skillsLinkDir = path.join(workspaceDir, '.skills', scope);\n const symlinkPath = path.join(skillsLinkDir, skillName);\n\n try {\n const stats = fs.lstatSync(symlinkPath);\n if (stats.isSymbolicLink()) {\n const currentTarget = fs.readlinkSync(symlinkPath);\n const resolvedTarget = path.isAbsolute(currentTarget)\n ? currentTarget\n : path.resolve(path.dirname(symlinkPath), currentTarget);\n\n if (path.resolve(resolvedTarget) === path.resolve(skillDir)) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Skill \"${name}\" is already linked in ${workspaceDir}.`\n }\n ]\n };\n }\n\n fs.unlinkSync(symlinkPath);\n }\n } catch {\n // intentionally empty\n }\n\n fs.mkdirSync(skillsLinkDir, { recursive: true });\n fs.symlinkSync(skillDir, symlinkPath, 'dir');\n\n return {\n content: [\n {\n type: 'text' as const,\n text: `Successfully linked \"${name}\" into ${workspaceDir}.\\nSymlink: ${symlinkPath} → ${skillDir}`\n }\n ]\n };\n }\n );\n}\n\nfunction getSkillDir(projectDir: string, skillName: string): string {\n if (skillName.startsWith('@')) {\n const [scope, name] = skillName.split('/');\n return path.join(projectDir, '.tank', 'skills', scope, name);\n }\n return path.join(projectDir, '.tank', 'skills', skillName);\n}\n","import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { z } from 'zod';\n\nimport { TankApiClient } from '~/lib/api-client.js';\nimport { getConfig, setConfig } from '~/lib/config.js';\n\nconst DEFAULT_POLL_INTERVAL_MS = 2000;\nconst DEFAULT_TIMEOUT_MS = 5 * 60 * 1000; // 5 minutes\n\nexport function registerLoginTool(server: McpServer): void {\n server.tool(\n 'login',\n 'Authenticate with Tank using GitHub OAuth device flow. Opens browser for authorization.',\n {\n timeout: z.number().optional().describe('Timeout in milliseconds (default: 300000 = 5 minutes)')\n },\n async ({ timeout = DEFAULT_TIMEOUT_MS }) => {\n const client = new TankApiClient();\n const config = getConfig();\n\n // Check if already logged in with valid token\n if (config.token) {\n const authCheck = await client.verifyAuth();\n if (authCheck.valid) {\n const displayName = authCheck.user?.name ?? authCheck.user?.email ?? 'unknown user';\n return {\n content: [\n {\n type: 'text' as const,\n text: `Already logged in as ${displayName}.\\n\\nTo log out, delete ~/.tank/config.json or use the CLI: tank logout`\n }\n ]\n };\n }\n }\n\n // Start device flow\n const state = crypto.randomUUID();\n const startRes = await fetch(`${config.registry}/api/v1/cli-auth/start`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ state })\n });\n\n if (!startRes.ok) {\n const body = await startRes.json().catch(() => ({}));\n return {\n content: [\n {\n type: 'text' as const,\n text: `Failed to start login flow: ${(body as { error?: string }).error ?? startRes.statusText}`\n }\n ]\n };\n }\n\n const { sessionCode } = (await startRes.json()) as {\n sessionCode: string;\n };\n\n // Return auth URL and poll for completion\n const deadline = Date.now() + timeout;\n const _authorized = false;\n let lastStatus = '';\n\n while (Date.now() < deadline) {\n try {\n const exchangeRes = await fetch(`${config.registry}/api/v1/cli-auth/exchange`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ sessionCode, state })\n });\n\n if (exchangeRes.ok) {\n const { token, user } = (await exchangeRes.json()) as {\n token: string;\n user: { name: string | null; email: string | null };\n };\n\n // Save token to config\n setConfig({ token, user: user as { name: string; email: string } });\n\n const displayName = user.name ?? user.email ?? 'unknown user';\n return {\n content: [\n {\n type: 'text' as const,\n text: `Successfully logged in as ${displayName}!\\n\\nYou can now use all Tank MCP tools: scan-skill, publish-skill, etc.`\n }\n ]\n };\n }\n\n // 400 means not yet authorized - keep polling\n if (exchangeRes.status !== 400) {\n const body = await exchangeRes.json().catch(() => ({}));\n return {\n content: [\n {\n type: 'text' as const,\n text: `Login failed: ${(body as { error?: string }).error ?? exchangeRes.statusText}`\n }\n ]\n };\n }\n\n // Check status and provide updates\n const newStatus = 'Waiting for authorization...';\n if (newStatus !== lastStatus) {\n lastStatus = newStatus;\n }\n } catch {\n // Network errors during polling are transient\n }\n\n await new Promise((resolve) => setTimeout(resolve, DEFAULT_POLL_INTERVAL_MS));\n }\n\n return {\n content: [\n {\n type: 'text' as const,\n text: `Login timed out. The authorization link may have expired.\\n\\nTry again: tank login`\n }\n ]\n };\n }\n );\n}\n","import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\n\nimport { getConfig, setConfig } from '~/lib/config.js';\n\nexport function registerLogoutTool(server: McpServer): void {\n server.tool('logout', 'Log out of Tank by clearing local credentials.', {}, async () => {\n const config = getConfig();\n\n if (!config.token) {\n return {\n content: [{ type: 'text' as const, text: 'Not logged in. No credentials to clear.' }]\n };\n }\n\n setConfig({ token: undefined, user: undefined });\n\n // Also clear env-based token so subsequent tool calls in this\n // process don't re-read it via getConfig().\n delete process.env.TANK_TOKEN;\n\n return {\n content: [{ type: 'text' as const, text: 'Successfully logged out.' }]\n };\n });\n}\n","import crypto from 'node:crypto';\nimport fs from 'node:fs';\nimport path from 'node:path';\nimport type { Readable } from 'node:stream';\n\nimport { LEGACY_MANIFEST_FILENAME, MANIFEST_FILENAME, skillsJsonSchema } from '@internals/schemas';\nimport ignore from 'ignore';\nimport { create } from 'tar';\n\n// Limits\nconst MAX_PACKAGE_SIZE = 50 * 1024 * 1024; // 50MB\nconst MAX_FILE_COUNT = 1000;\n\n// Default ignore patterns\nconst DEFAULT_IGNORES = ['node_modules', '.git', '.env*', '*.log', '.tank', '.DS_Store'];\n\n// Always ignored regardless of ignore file contents\nconst ALWAYS_IGNORED = ['node_modules', '.git'];\n\n// Ignore file names (not packed into tarball)\nconst IGNORE_FILES = ['.tankignore', '.gitignore'];\n\nexport interface PackResult {\n tarball: Buffer;\n integrity: string; // \"sha512-{base64}\"\n fileCount: number;\n totalSize: number;\n readme: string;\n files: string[];\n manifest: Record<string, unknown>;\n}\n\n/**\n * Pack a skill directory into a .tgz tarball with integrity hashing.\n */\nexport async function pack(directory: string): Promise<PackResult> {\n const absDir = path.resolve(directory);\n\n // 1. Verify directory exists\n if (!fs.existsSync(absDir)) {\n throw new Error(`Directory does not exist: ${absDir}`);\n }\n\n const stat = fs.statSync(absDir);\n if (!stat.isDirectory()) {\n throw new Error(`Not a directory: ${absDir}`);\n }\n\n // 2. Verify manifest (tank.json or skills.json) exists and is valid\n let manifestPath = path.join(absDir, MANIFEST_FILENAME);\n let manifestFilename = MANIFEST_FILENAME;\n if (!fs.existsSync(manifestPath)) {\n manifestPath = path.join(absDir, LEGACY_MANIFEST_FILENAME);\n manifestFilename = LEGACY_MANIFEST_FILENAME;\n }\n if (!fs.existsSync(manifestPath)) {\n throw new Error(`Missing required file: ${MANIFEST_FILENAME}`);\n }\n\n let skillsJsonContent: string;\n try {\n skillsJsonContent = fs.readFileSync(manifestPath, 'utf-8');\n } catch {\n throw new Error(`Failed to read ${manifestFilename}`);\n }\n\n let parsed: unknown;\n try {\n parsed = JSON.parse(skillsJsonContent);\n } catch {\n throw new Error(`Invalid ${manifestFilename}: not valid JSON`);\n }\n\n const validation = skillsJsonSchema.safeParse(parsed);\n if (!validation.success) {\n const issues = validation.error.issues.map((i) => ` - ${i.path.join('.')}: ${i.message}`).join('\\n');\n throw new Error(`Invalid ${manifestFilename}:\\n${issues}`);\n }\n\n // 3. Verify SKILL.md exists and read its content\n const skillMdPath = path.join(absDir, 'SKILL.md');\n if (!fs.existsSync(skillMdPath)) {\n throw new Error('Missing required file: SKILL.md');\n }\n\n let readmeContent: string;\n try {\n readmeContent = fs.readFileSync(skillMdPath, 'utf-8');\n } catch {\n throw new Error('Failed to read SKILL.md');\n }\n\n // 4. Build ignore filter\n const ig = buildIgnoreFilter(absDir);\n\n // 5. Collect files with validation\n const files = collectFiles(absDir, absDir, ig);\n\n // 6. Enforce file count limit\n if (files.length > MAX_FILE_COUNT) {\n throw new Error(`Too many files: ${files.length} exceeds maximum of ${MAX_FILE_COUNT}`);\n }\n\n // 7. Calculate total size of source files\n let totalSize = 0;\n for (const file of files) {\n const filePath = path.join(absDir, file);\n const fileStat = fs.statSync(filePath);\n totalSize += fileStat.size;\n }\n\n // 8. Create tarball\n const tarball = await createTarball(absDir, files);\n\n // 9. Enforce tarball size limit\n if (tarball.length > MAX_PACKAGE_SIZE) {\n throw new Error(`Tarball too large: ${tarball.length} bytes exceeds maximum of ${MAX_PACKAGE_SIZE} bytes (50MB)`);\n }\n\n // 10. Compute integrity hash\n const hash = crypto.createHash('sha512').update(tarball).digest('base64');\n const integrity = `sha512-${hash}`;\n\n return {\n tarball,\n integrity,\n fileCount: files.length,\n totalSize,\n readme: readmeContent,\n files,\n manifest: validation.data as Record<string, unknown>\n };\n}\n\n/**\n * Pack a directory into a .tgz tarball for security scanning.\n *\n * Unlike pack(), this function does NOT require skills.json or SKILL.md.\n * It applies the same security checks (no symlinks, no path traversal, etc.)\n * and returns the same PackResult interface with a synthesised manifest.\n *\n * Validates:\n * - Directory exists\n * - No symlinks or hardlinks\n * - No path traversal (.. components)\n * - No absolute paths\n * - File count <= 1000\n * - Tarball size <= 50MB\n *\n * Does NOT validate:\n * - skills.json existence or validity\n * - SKILL.md existence (but reads it if present)\n */\nexport async function packForScan(directory: string): Promise<PackResult> {\n const absDir = path.resolve(directory);\n\n // 1. Verify directory exists\n if (!fs.existsSync(absDir)) {\n throw new Error(`Directory does not exist: ${absDir}`);\n }\n\n const stat = fs.statSync(absDir);\n if (!stat.isDirectory()) {\n throw new Error(`Not a directory: ${absDir}`);\n }\n\n // 2. Try to read SKILL.md if it exists (optional for scan)\n let readmeContent = '';\n const skillMdPath = path.join(absDir, 'SKILL.md');\n if (fs.existsSync(skillMdPath)) {\n try {\n readmeContent = fs.readFileSync(skillMdPath, 'utf-8');\n } catch {\n readmeContent = '';\n }\n }\n\n // 3. Build ignore filter\n const ig = buildIgnoreFilter(absDir);\n\n // 4. Collect files with validation\n const files = collectFiles(absDir, absDir, ig);\n\n // 5. Enforce file count limit\n if (files.length > MAX_FILE_COUNT) {\n throw new Error(`Too many files: ${files.length} exceeds maximum of ${MAX_FILE_COUNT}`);\n }\n\n // 6. Check for empty directory (no files to scan)\n if (files.length === 0) {\n throw new Error('No files to scan: directory is empty or all files are ignored');\n }\n\n // 7. Calculate total size of source files\n let totalSize = 0;\n for (const file of files) {\n const filePath = path.join(absDir, file);\n const fileStat = fs.statSync(filePath);\n totalSize += fileStat.size;\n }\n\n // 8. Create tarball\n const tarball = await createTarball(absDir, files);\n\n // 9. Enforce tarball size limit\n if (tarball.length > MAX_PACKAGE_SIZE) {\n throw new Error(`Tarball too large: ${tarball.length} bytes exceeds maximum of ${MAX_PACKAGE_SIZE} bytes (50MB)`);\n }\n\n // 10. Compute integrity hash\n const hash = crypto.createHash('sha512').update(tarball).digest('base64');\n const integrity = `sha512-${hash}`;\n\n // 11. Synthesise a minimal manifest\n const dirName = path.basename(absDir);\n const manifest: Record<string, unknown> = {\n name: dirName,\n version: '0.0.0',\n description: 'Local scan'\n };\n\n return {\n tarball,\n integrity,\n fileCount: files.length,\n totalSize,\n readme: readmeContent,\n files,\n manifest\n };\n}\n\n/**\n * Build an ignore filter from .tankignore, .gitignore, or defaults.\n */\nfunction buildIgnoreFilter(dir: string): ReturnType<typeof ignore> {\n const ig = ignore();\n\n ig.add(ALWAYS_IGNORED);\n\n const tankIgnorePath = path.join(dir, '.tankignore');\n const gitIgnorePath = path.join(dir, '.gitignore');\n\n if (fs.existsSync(tankIgnorePath)) {\n const content = fs.readFileSync(tankIgnorePath, 'utf-8');\n ig.add(content);\n ig.add(IGNORE_FILES);\n } else if (fs.existsSync(gitIgnorePath)) {\n const content = fs.readFileSync(gitIgnorePath, 'utf-8');\n ig.add(content);\n ig.add(IGNORE_FILES);\n } else {\n ig.add(DEFAULT_IGNORES);\n }\n\n return ig;\n}\n\n/**\n * Recursively collect files from a directory.\n */\nfunction collectFiles(baseDir: string, currentDir: string, ig: ReturnType<typeof ignore>): string[] {\n const files: string[] = [];\n const entries = fs.readdirSync(currentDir, { withFileTypes: true });\n\n for (const entry of entries) {\n const fullPath = path.join(currentDir, entry.name);\n const relativePath = path.relative(baseDir, fullPath);\n\n // Security: check for path traversal\n if (relativePath.split(path.sep).includes('..')) {\n throw new Error(`Path traversal detected: \"${relativePath}\" contains \"..\" component`);\n }\n\n // Security: check for absolute paths\n if (path.isAbsolute(relativePath)) {\n throw new Error(`Absolute path detected: \"${relativePath}\"`);\n }\n\n // Security: check for symlinks\n const lstatResult = fs.lstatSync(fullPath);\n if (lstatResult.isSymbolicLink()) {\n throw new Error(`Symlink detected: \"${relativePath}\" — symlinks are not allowed`);\n }\n\n const pathForIgnore = lstatResult.isDirectory() ? `${relativePath}/` : relativePath;\n\n if (ig.ignores(pathForIgnore)) {\n continue;\n }\n\n if (lstatResult.isDirectory()) {\n const subFiles = collectFiles(baseDir, fullPath, ig);\n files.push(...subFiles);\n } else if (lstatResult.isFile()) {\n files.push(relativePath);\n }\n }\n\n return files;\n}\n\n/**\n * Create a gzipped tarball from the given files.\n */\nasync function createTarball(cwd: string, files: string[]): Promise<Buffer> {\n return new Promise<Buffer>((resolve, reject) => {\n const chunks: Buffer[] = [];\n\n const stream = create(\n {\n gzip: true,\n cwd,\n portable: true\n },\n files\n ) as unknown as Readable;\n\n stream.on('data', (chunk: Buffer) => {\n chunks.push(chunk);\n });\n\n stream.on('end', () => {\n resolve(Buffer.concat(chunks));\n });\n\n stream.on('error', (err: Error) => {\n reject(err);\n });\n });\n}\n","import path from 'node:path';\n\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { z } from 'zod';\n\nimport { TankApiClient } from '~/lib/api-client.js';\nimport { type PackResult, pack } from '~/lib/packer.js';\n\ninterface PublishStartResponse {\n uploadUrl: string;\n skillId: string;\n versionId: string;\n}\n\ninterface PublishConfirmResponse {\n success: boolean;\n name: string;\n version: string;\n auditScore: number | null;\n scanVerdict: string | null;\n}\n\nexport function registerPublishSkillTool(server: McpServer): void {\n server.tool(\n 'publish-skill',\n 'Publish a skill to the Tank registry. Requires authentication.',\n {\n directory: z.string().optional().describe('Directory to publish (default: current directory)'),\n visibility: z.enum(['public', 'private']).optional().default('public').describe('Package visibility'),\n dryRun: z.boolean().optional().default(false).describe('Validate without publishing')\n },\n async ({ directory = '.', visibility = 'public', dryRun = false }) => {\n const absDir = path.resolve(directory);\n const client = new TankApiClient();\n\n // Check auth (skip for dry run)\n if (!dryRun && !client.isAuthenticated) {\n return {\n content: [\n {\n type: 'text' as const,\n text: 'You need to log in first. Use the login tool to authenticate with Tank.\\n\\nExample: \"Log in to Tank\"'\n }\n ]\n };\n }\n\n if (!dryRun) {\n const authCheck = await client.verifyAuth();\n if (!authCheck.valid) {\n return {\n content: [\n {\n type: 'text' as const,\n text: 'Your session has expired. Use the login tool to authenticate again.'\n }\n ]\n };\n }\n }\n\n // Pack the skill\n let packResult: PackResult;\n try {\n packResult = await pack(absDir);\n } catch (err) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Failed to pack skill: ${err instanceof Error ? err.message : String(err)}`\n }\n ]\n };\n }\n\n const manifest = packResult.manifest as { name?: string; version?: string; description?: string };\n const skillName = manifest.name ?? 'unknown';\n const skillVersion = manifest.version ?? '0.0.0';\n\n // Dry run: just validate and return summary\n if (dryRun) {\n const lines: string[] = [\n `## Dry Run for ${skillName}@${skillVersion}`,\n '',\n '**Validation:** ✅ PASSED',\n '',\n '### Package Summary',\n `- **Name:** ${skillName}`,\n `- **Version:** ${skillVersion}`,\n `- **Visibility:** ${visibility}`,\n `- **Files:** ${packResult.fileCount}`,\n `- **Size:** ${(packResult.totalSize / 1024).toFixed(1)}KB compressed`,\n `- **Integrity:** ${packResult.integrity.slice(0, 20)}...`,\n '',\n '### Manifest',\n `- **Description:** ${manifest.description ?? 'No description'}`,\n `- **Permissions:** ${JSON.stringify((manifest as Record<string, unknown>).permissions ?? {})}`,\n '',\n '### Files',\n ...packResult.files.slice(0, 10).map((f) => ` - ${f}`),\n packResult.files.length > 10 ? ` ... and ${packResult.files.length - 10} more` : '',\n '',\n 'Ready to publish. Say \"publish my skill\" when you\\'re ready.'\n ];\n\n return {\n content: [{ type: 'text' as const, text: lines.join('\\n') }]\n };\n }\n\n // Step 1: Start publish flow\n const startResult = await client.fetch<PublishStartResponse>('/api/v1/skills', {\n method: 'POST',\n body: JSON.stringify({\n manifest: { ...manifest, visibility },\n readme: packResult.readme,\n files: packResult.files\n })\n });\n\n if (!startResult.ok) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Failed to start publish: ${startResult.error}`\n }\n ]\n };\n }\n\n const { uploadUrl, versionId } = startResult.data;\n\n // Step 2: Upload tarball\n const uploadRes = await fetch(uploadUrl, {\n method: 'PUT',\n headers: {\n 'Content-Type': 'application/gzip'\n },\n body: new Uint8Array(packResult.tarball)\n });\n\n if (!uploadRes.ok) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Failed to upload tarball: ${uploadRes.statusText}`\n }\n ]\n };\n }\n\n // Step 3: Confirm upload\n const confirmResult = await client.fetch<PublishConfirmResponse>('/api/v1/skills/confirm', {\n method: 'POST',\n body: JSON.stringify({\n versionId,\n integrity: packResult.integrity,\n fileCount: packResult.fileCount,\n tarballSize: packResult.tarball.length,\n readme: packResult.readme\n })\n });\n\n if (!confirmResult.ok) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Failed to confirm publish: ${confirmResult.error}`\n }\n ]\n };\n }\n\n const confirm = confirmResult.data;\n const score = confirm.auditScore !== null ? `${confirm.auditScore.toFixed(1)}/10` : 'pending';\n\n const lines: string[] = [\n `## Published ${confirm.name}@${confirm.version}`,\n '',\n `**Status:** ✅ Successfully published`,\n `**Visibility:** ${visibility}`,\n `**Audit Score:** ${score}`,\n `**Scan Verdict:** ${confirm.scanVerdict ?? 'pending'}`,\n '',\n '### Package Details',\n `- **Files:** ${packResult.fileCount}`,\n `- **Size:** ${(packResult.totalSize / 1024).toFixed(1)}KB`,\n '',\n `View your skill: https://tankpkg.dev/skills/${confirm.name}`\n ];\n\n return {\n content: [{ type: 'text' as const, text: lines.join('\\n') }]\n };\n }\n );\n}\n","import fs from 'node:fs';\nimport path from 'node:path';\n\nimport {\n LEGACY_LOCKFILE_FILENAME,\n LEGACY_MANIFEST_FILENAME,\n LOCKFILE_FILENAME,\n MANIFEST_FILENAME,\n type SkillsLock\n} from '@internals/schemas';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { z } from 'zod';\n\nconst SCOPED_NAME_PATTERN = /^@[a-z0-9-]+\\/[a-z0-9][a-z0-9-]*$/;\n\nexport function registerRemoveSkillTool(server: McpServer): void {\n server.tool(\n 'remove-skill',\n `Remove an installed skill from the project. Removes from ${MANIFEST_FILENAME}, ${LOCKFILE_FILENAME}, and deletes skill files.`,\n {\n name: z.string().describe('Skill name in @org/name format'),\n directory: z.string().optional().describe('Project directory (defaults to current working directory)')\n },\n async ({ name, directory }) => {\n if (!SCOPED_NAME_PATTERN.test(name)) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Validation error: Skill name \"${name}\" must use the @org/name format (e.g. @acme/my-skill).`\n }\n ],\n isError: true\n };\n }\n\n const dir = directory ? path.resolve(directory) : process.cwd();\n const results: string[] = [];\n let skillFoundAnywhere = false;\n\n // Find manifest (tank.json or skills.json)\n let skillsJsonPath = path.join(dir, MANIFEST_FILENAME);\n if (!fs.existsSync(skillsJsonPath)) {\n skillsJsonPath = path.join(dir, LEGACY_MANIFEST_FILENAME);\n }\n if (fs.existsSync(skillsJsonPath)) {\n try {\n const raw = fs.readFileSync(skillsJsonPath, 'utf-8');\n const skillsJson = JSON.parse(raw) as Record<string, unknown>;\n const skills = (skillsJson.skills ?? {}) as Record<string, string>;\n\n if (name in skills) {\n skillFoundAnywhere = true;\n delete skills[name];\n skillsJson.skills = skills;\n fs.writeFileSync(skillsJsonPath, `${JSON.stringify(skillsJson, null, 2)}\\n`);\n results.push(`Removed \"${name}\" from ${path.basename(skillsJsonPath)}`);\n }\n } catch {\n results.push(`Warning: Failed to read or parse ${path.basename(skillsJsonPath)}`);\n }\n }\n\n // Find lockfile (tank.lock or skills.lock)\n let lockPath = path.join(dir, LOCKFILE_FILENAME);\n if (!fs.existsSync(lockPath)) {\n lockPath = path.join(dir, LEGACY_LOCKFILE_FILENAME);\n }\n if (fs.existsSync(lockPath)) {\n try {\n const raw = fs.readFileSync(lockPath, 'utf-8');\n const lock = JSON.parse(raw) as SkillsLock;\n let removedFromLock = false;\n\n for (const key of Object.keys(lock.skills)) {\n const lastAt = key.lastIndexOf('@');\n if (lastAt <= 0) continue;\n const keyName = key.slice(0, lastAt);\n if (keyName === name) {\n delete lock.skills[key];\n removedFromLock = true;\n skillFoundAnywhere = true;\n }\n }\n\n if (removedFromLock) {\n const sortedSkills: Record<string, unknown> = {};\n for (const key of Object.keys(lock.skills).sort()) {\n sortedSkills[key] = lock.skills[key];\n }\n lock.skills = sortedSkills as SkillsLock['skills'];\n fs.writeFileSync(lockPath, `${JSON.stringify(lock, null, 2)}\\n`);\n results.push(`Removed \"${name}\" from ${path.basename(lockPath)}`);\n }\n } catch {\n results.push(`Warning: Failed to read or parse ${path.basename(lockPath)}`);\n }\n }\n\n const skillDir = getSkillDir(dir, name);\n if (fs.existsSync(skillDir)) {\n skillFoundAnywhere = true;\n fs.rmSync(skillDir, { recursive: true, force: true });\n results.push(`Deleted skill files from ${skillDir}`);\n } else {\n results.push(`Skill files were already absent from ${skillDir}`);\n }\n\n const symlinkName = name.replace(/\\//g, '__');\n const agentSkillDir = path.join(dir, '.tank', 'agent-skills', symlinkName);\n if (fs.existsSync(agentSkillDir)) {\n fs.rmSync(agentSkillDir, { recursive: true, force: true });\n results.push('Removed symlink from agent workspace');\n }\n\n if (!skillFoundAnywhere) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Skill \"${name}\" is not installed. It was not found in ${MANIFEST_FILENAME}, ${LOCKFILE_FILENAME}, or .tank/skills/.`\n }\n ],\n isError: true\n };\n }\n\n return {\n content: [\n {\n type: 'text' as const,\n text: `Successfully removed ${name}.\\n${results.join('\\n')}`\n }\n ]\n };\n }\n );\n}\n\nfunction getSkillDir(projectDir: string, skillName: string): string {\n if (skillName.startsWith('@')) {\n const [scope, name] = skillName.split('/');\n return path.join(projectDir, '.tank', 'skills', scope, name);\n }\n return path.join(projectDir, '.tank', 'skills', skillName);\n}\n","import fs from 'node:fs';\nimport path from 'node:path';\n\nimport { LEGACY_MANIFEST_FILENAME, MANIFEST_FILENAME } from '@internals/schemas';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { z } from 'zod';\n\nimport { TankApiClient } from '~/lib/api-client.js';\nimport { getConfig } from '~/lib/config.js';\nimport { pack, packForScan } from '~/lib/packer.js';\n\ninterface ScanFinding {\n stage: string;\n severity: 'critical' | 'high' | 'medium' | 'low';\n type: string;\n description: string;\n location: string | null;\n confidence: number | null;\n tool: string | null;\n evidence: string | null;\n}\n\ninterface LLMAnalysis {\n enabled: boolean;\n mode: 'byollm' | 'builtin' | 'disabled';\n provider_used?: string;\n findings_reviewed?: number;\n findings_dismissed?: number;\n findings_confirmed?: number;\n findings_uncertain?: number;\n latency_ms?: number;\n error?: string;\n}\n\ninterface ScanResponse {\n scan_id: string | null;\n verdict: 'pass' | 'pass_with_notes' | 'flagged' | 'fail';\n audit_score: number;\n findings: ScanFinding[];\n stage_results: Array<{\n stage: string;\n status: string;\n findings: ScanFinding[];\n duration_ms: number;\n }>;\n llm_analysis?: LLMAnalysis;\n duration_ms: number;\n}\n\nexport function registerScanSkillTool(server: McpServer): void {\n server.tool(\n 'scan-skill',\n 'Scan a skill directory for security issues. Requires authentication.',\n {\n directory: z.string().optional().describe('Directory to scan (default: current directory)')\n },\n async ({ directory = '.' }) => {\n const absDir = path.resolve(directory);\n const client = new TankApiClient();\n\n // Check auth, guide user to login if not authenticated\n if (!client.isAuthenticated) {\n return {\n content: [\n {\n type: 'text' as const,\n text: 'You need to log in first. Use the login tool to authenticate with Tank.\\n\\nExample: \"Log in to Tank\"'\n }\n ]\n };\n }\n\n // Verify auth is still valid\n const authCheck = await client.verifyAuth();\n if (!authCheck.valid) {\n return {\n content: [\n {\n type: 'text' as const,\n text: 'Your session has expired. Use the login tool to authenticate again.\\n\\nExample: \"Log in to Tank\"'\n }\n ]\n };\n }\n\n let packResult: Awaited<ReturnType<typeof pack>>;\n let usedSynthesisedManifest = false;\n\n const hasManifest =\n fs.existsSync(path.join(absDir, MANIFEST_FILENAME)) ||\n fs.existsSync(path.join(absDir, LEGACY_MANIFEST_FILENAME));\n\n if (hasManifest) {\n try {\n packResult = await pack(absDir);\n } catch (err) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Failed to pack skill: ${err instanceof Error ? err.message : String(err)}`\n }\n ]\n };\n }\n } else {\n try {\n packResult = await packForScan(absDir);\n usedSynthesisedManifest = true;\n } catch (err) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Failed to pack directory for scan: ${err instanceof Error ? err.message : String(err)}`\n }\n ]\n };\n }\n }\n\n const manifest = packResult.manifest as { name?: string; version?: string };\n const skillName = manifest.name ?? 'unknown';\n const skillVersion = manifest.version ?? '0.0.0';\n\n // Upload tarball and trigger scan\n const formData = new FormData();\n const blob = new Blob([new Uint8Array(packResult.tarball)], { type: 'application/gzip' });\n formData.append('tarball', blob, `${skillName}-${skillVersion}.tgz`);\n formData.append('manifest', JSON.stringify(manifest));\n\n const config = getConfig();\n const scanRes = await fetch(`${config.registry}/api/v1/scan`, {\n method: 'POST',\n headers: {\n Authorization: `Bearer ${client.token}`\n },\n body: formData\n });\n\n if (!scanRes.ok) {\n const body = await scanRes.json().catch(() => ({}));\n return {\n content: [\n {\n type: 'text' as const,\n text: `Scan failed: ${(body as { error?: string }).error ?? scanRes.statusText}`\n }\n ]\n };\n }\n\n const scanResult = (await scanRes.json()) as ScanResponse;\n\n // Format report\n const verdictEmoji: Record<string, string> = {\n pass: '✅',\n pass_with_notes: '⚠️',\n flagged: '🚩',\n fail: '❌'\n };\n\n const severityEmoji: Record<string, string> = {\n critical: '🔴',\n high: '🟠',\n medium: '🟡',\n low: '🟢'\n };\n\n const lines: string[] = [`## Scan Results for ${skillName}@${skillVersion}`, ''];\n\n if (usedSynthesisedManifest) {\n lines.push(`> **Note:** No \\`${MANIFEST_FILENAME}\\` found. A synthesised manifest was used for scanning.`);\n lines.push('');\n }\n\n const auditScore = scanResult.audit_score ?? 0;\n const durationMs = scanResult.duration_ms ?? 0;\n\n lines.push(\n `**Verdict:** ${verdictEmoji[scanResult.verdict] ?? ''} ${scanResult.verdict.toUpperCase()}`,\n `**Score:** ${auditScore.toFixed(1)}/10`,\n `**Duration:** ${(durationMs / 1000).toFixed(1)}s`,\n `**Files:** ${packResult.fileCount} (${(packResult.totalSize / 1024).toFixed(1)}KB)`,\n ''\n );\n\n if (scanResult.findings.length > 0) {\n lines.push(`### Findings (${scanResult.findings.length})`);\n lines.push('');\n\n // Group by severity\n const bySeverity: Record<string, ScanFinding[]> = {\n critical: [],\n high: [],\n medium: [],\n low: []\n };\n for (const f of scanResult.findings) {\n bySeverity[f.severity].push(f);\n }\n\n for (const severity of ['critical', 'high', 'medium', 'low'] as const) {\n const findings = bySeverity[severity];\n if (findings.length === 0) continue;\n\n lines.push(`#### ${severityEmoji[severity]} ${severity.toUpperCase()} (${findings.length})`);\n for (const f of findings) {\n lines.push(`- **${f.type}**: ${f.description}`);\n if (f.location) lines.push(` - Location: ${f.location}`);\n }\n lines.push('');\n }\n } else {\n lines.push('No findings. Your skill looks secure!');\n lines.push('');\n }\n\n // Stages run\n if (scanResult.stage_results?.length > 0) {\n lines.push('### Scan Stages');\n lines.push('');\n for (const stage of scanResult.stage_results) {\n const status = stage.status === 'passed' ? '✓' : '✗';\n lines.push(`- ${status} ${stage.stage} (${stage.duration_ms}ms)`);\n }\n lines.push('');\n }\n\n // LLM Analysis\n if (scanResult.llm_analysis?.enabled) {\n const llm = scanResult.llm_analysis;\n lines.push('### LLM Analysis');\n lines.push('');\n lines.push(`**Mode:** ${llm.mode}`);\n if (llm.provider_used) {\n lines.push(`**Provider:** ${llm.provider_used}`);\n }\n if (llm.findings_reviewed !== undefined && llm.findings_reviewed > 0) {\n lines.push(`**Findings Reviewed:** ${llm.findings_reviewed}`);\n }\n if (llm.findings_dismissed !== undefined && llm.findings_dismissed > 0) {\n lines.push(`**False Positives Dismissed:** ${llm.findings_dismissed}`);\n }\n if (llm.findings_confirmed !== undefined && llm.findings_confirmed > 0) {\n lines.push(`**Threats Confirmed:** ${llm.findings_confirmed}`);\n }\n if (llm.findings_uncertain !== undefined && llm.findings_uncertain > 0) {\n lines.push(`**Uncertain:** ${llm.findings_uncertain}`);\n }\n if (llm.latency_ms) {\n lines.push(`**Latency:** ${llm.latency_ms}ms`);\n }\n if (llm.error) {\n lines.push(`**Error:** ${llm.error}`);\n }\n lines.push('');\n }\n\n if (scanResult.scan_id) {\n lines.push(`View full report: https://tankpkg.dev/scans/${scanResult.scan_id}`);\n }\n\n return {\n content: [{ type: 'text' as const, text: lines.join('\\n') }]\n };\n }\n );\n}\n","import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { z } from 'zod';\n\nimport { TankApiClient } from '~/lib/api-client.js';\n\ninterface SearchResult {\n name: string;\n latestVersion?: string | null;\n description: string | null;\n auditScore?: number | null;\n downloads: number;\n publisher: string;\n}\n\ninterface SearchResponse {\n results: SearchResult[];\n total: number;\n}\n\nexport function registerSearchSkillsTool(server: McpServer): void {\n const client = new TankApiClient();\n\n server.tool(\n 'search-skills',\n 'Search the Tank registry for AI agent skills',\n {\n query: z.string().min(1).describe('Search query (skill name or keywords)'),\n limit: z.number().min(1).max(50).optional().default(10).describe('Maximum results to return')\n },\n async ({ query, limit }) => {\n const result = await client.fetch<SearchResponse>(`/api/v1/search?q=${encodeURIComponent(query)}&limit=${limit}`);\n\n if (!result.ok) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Search failed: ${result.error}`\n }\n ]\n };\n }\n\n const { results, total } = result.data;\n\n if (results.length === 0) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `No skills found matching \"${query}\". Try different keywords or browse the registry at https://tankpkg.dev`\n }\n ]\n };\n }\n\n // Format as markdown table\n const header = '| Skill | Score | Downloads | Description |\\n|-------|-------|-----------|-------------|';\n const rows = results.map((skill) => {\n const score =\n typeof skill.auditScore === 'number' && Number.isFinite(skill.auditScore) ? skill.auditScore.toFixed(1) : '-';\n const downloads =\n skill.downloads > 1000 ? `${(skill.downloads / 1000).toFixed(1)}k` : skill.downloads.toString();\n const desc = skill.description?.slice(0, 50) ?? 'No description';\n return `| ${skill.name} | ${score} | ${downloads} | ${desc} |`;\n });\n\n const text = [\n `Found ${total} skill${total !== 1 ? 's' : ''} matching \"${query}\":`,\n '',\n header,\n ...rows,\n '',\n `View full results: https://tankpkg.dev/search?q=${encodeURIComponent(query)}`\n ].join('\\n');\n\n return {\n content: [{ type: 'text' as const, text }]\n };\n }\n );\n}\n","import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { z } from 'zod';\n\nimport { TankApiClient } from '~/lib/api-client.js';\n\ninterface SkillVersion {\n version: string;\n integrity: string;\n auditScore: number | null;\n auditStatus: string;\n publishedAt: string;\n tarballSize: number;\n fileCount: number;\n}\n\ninterface SkillInfoResponse {\n name: string;\n description: string | null;\n publisher: string;\n latestVersion: string;\n auditScore: number | null;\n auditStatus: string;\n downloads: number;\n permissions: Record<string, unknown> | null;\n versions: SkillVersion[];\n readme: string | null;\n}\n\nexport function registerSkillInfoTool(server: McpServer): void {\n const client = new TankApiClient();\n\n server.tool(\n 'skill-info',\n 'Get detailed information about a specific skill from the Tank registry',\n {\n name: z.string().describe('Skill name (e.g., @org/skill-name or skill-name)')\n },\n async ({ name }) => {\n const result = await client.fetch<SkillInfoResponse>(`/api/v1/skills/${encodeURIComponent(name)}`);\n\n if (!result.ok) {\n if (result.status === 404) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Skill \"${name}\" not found. Search for skills: https://tankpkg.dev/search`\n }\n ]\n };\n }\n return {\n content: [\n {\n type: 'text' as const,\n text: `Failed to get skill info: ${result.error}`\n }\n ]\n };\n }\n\n const skill = result.data;\n const score = skill.auditScore !== null ? `${skill.auditScore.toFixed(1)}/10` : 'Not scored';\n const size = skill.versions[0] ? `${(skill.versions[0].tarballSize / 1024).toFixed(1)}KB` : 'Unknown';\n\n // Format permissions as readable text\n let permsText = 'None declared';\n if (skill.permissions) {\n const perms: string[] = [];\n const p = skill.permissions as {\n network?: { outbound?: string[] };\n filesystem?: { read?: string[]; write?: string[] };\n subprocess?: boolean;\n };\n if (p.network?.outbound?.length) {\n perms.push(`network: ${p.network.outbound.join(', ')}`);\n }\n if (p.filesystem?.read?.length || p.filesystem?.write?.length) {\n const fsPerms: string[] = [];\n if (p.filesystem.read?.length) fsPerms.push(`read: ${p.filesystem.read.length} paths`);\n if (p.filesystem.write?.length) fsPerms.push(`write: ${p.filesystem.write.length} paths`);\n perms.push(`filesystem (${fsPerms.join(', ')})`);\n }\n if (p.subprocess) perms.push('subprocess: allowed');\n if (perms.length > 0) permsText = perms.join('\\n - ');\n }\n\n const versionsList = skill.versions\n .slice(0, 5)\n .map((v) => {\n const vScore = v.auditScore !== null ? v.auditScore.toFixed(1) : '-';\n return `${v.version} (score: ${vScore})`;\n })\n .join('\\n - ');\n\n const text = [\n `# ${skill.name}`,\n '',\n `**Publisher:** ${skill.publisher}`,\n `**Latest:** ${skill.latestVersion}`,\n `**Score:** ${score}`,\n `**Size:** ${size}`,\n `**Downloads:** ${skill.downloads}`,\n '',\n '**Description:**',\n skill.description ?? 'No description available',\n '',\n '**Permissions:**',\n ` - ${permsText}`,\n '',\n '**Versions:**',\n ` - ${versionsList}`,\n skill.versions.length > 5 ? `\\n ... and ${skill.versions.length - 5} more` : '',\n '',\n `View on Tank: https://tankpkg.dev/skills/${skill.name}`\n ].join('\\n');\n\n return {\n content: [{ type: 'text' as const, text }]\n };\n }\n );\n}\n","import fs from 'node:fs';\nimport path from 'node:path';\n\nimport {\n LEGACY_LOCKFILE_FILENAME,\n LEGACY_MANIFEST_FILENAME,\n LOCKFILE_FILENAME,\n MANIFEST_FILENAME,\n type Permissions,\n type SkillsJson,\n type SkillsLock\n} from '@internals/schemas';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { z } from 'zod';\n\nfunction parseSkillName(key: string): string {\n const lastAt = key.lastIndexOf('@');\n if (lastAt > 0) {\n return key.slice(0, lastAt);\n }\n return key;\n}\n\ninterface PermissionEntry {\n value: string;\n skills: string[];\n}\n\ninterface ResolvedPermissions {\n networkOutbound: PermissionEntry[];\n filesystemRead: PermissionEntry[];\n filesystemWrite: PermissionEntry[];\n subprocess: string[];\n env: PermissionEntry[];\n exec: PermissionEntry[];\n}\n\nfunction collectPermissions(lockfile: SkillsLock): ResolvedPermissions {\n const networkMap = new Map<string, string[]>();\n const fsReadMap = new Map<string, string[]>();\n const fsWriteMap = new Map<string, string[]>();\n const subprocessSkills: string[] = [];\n const envMap = new Map<string, string[]>();\n const execMap = new Map<string, string[]>();\n\n for (const [key, entry] of Object.entries(lockfile.skills)) {\n const skillName = parseSkillName(key);\n const perms = entry.permissions;\n\n if (perms.network?.outbound) {\n for (const domain of perms.network.outbound) {\n const existing = networkMap.get(domain) ?? [];\n existing.push(skillName);\n networkMap.set(domain, existing);\n }\n }\n\n if (perms.filesystem?.read) {\n for (const p of perms.filesystem.read) {\n const existing = fsReadMap.get(p) ?? [];\n existing.push(skillName);\n fsReadMap.set(p, existing);\n }\n }\n\n if (perms.filesystem?.write) {\n for (const p of perms.filesystem.write) {\n const existing = fsWriteMap.get(p) ?? [];\n existing.push(skillName);\n fsWriteMap.set(p, existing);\n }\n }\n\n if (perms.subprocess === true) {\n subprocessSkills.push(skillName);\n }\n\n const rawPerms = perms as Record<string, unknown>;\n if (Array.isArray(rawPerms.env)) {\n for (const envVar of rawPerms.env as string[]) {\n const existing = envMap.get(envVar) ?? [];\n existing.push(skillName);\n envMap.set(envVar, existing);\n }\n }\n\n if (Array.isArray(rawPerms.exec)) {\n for (const cmd of rawPerms.exec as string[]) {\n const existing = execMap.get(cmd) ?? [];\n existing.push(skillName);\n execMap.set(cmd, existing);\n }\n }\n }\n\n const toEntries = (map: Map<string, string[]>): PermissionEntry[] =>\n Array.from(map.entries()).map(([value, skills]) => ({ value, skills }));\n\n return {\n networkOutbound: toEntries(networkMap),\n filesystemRead: toEntries(fsReadMap),\n filesystemWrite: toEntries(fsWriteMap),\n subprocess: subprocessSkills,\n env: toEntries(envMap),\n exec: toEntries(execMap)\n };\n}\n\nfunction formatAttribution(skills: string[]): string {\n return `<- ${skills.join(', ')}`;\n}\n\nfunction formatSection(title: string, entries: PermissionEntry[]): string {\n const lines: string[] = [];\n lines.push(`${title}:`);\n if (entries.length === 0) {\n lines.push(' none');\n } else {\n for (const entry of entries) {\n lines.push(` ${entry.value} ${formatAttribution(entry.skills)}`);\n }\n }\n return lines.join('\\n');\n}\n\n// Wildcard matching: *.example.com matches sub.example.com, * matches all\nfunction isDomainAllowed(domain: string, allowedDomains: string[]): boolean {\n for (const allowed of allowedDomains) {\n if (allowed === '*') return true;\n if (allowed === domain) return true;\n if (allowed.startsWith('*.')) {\n const suffix = allowed.slice(1);\n if (domain.endsWith(suffix) || domain === allowed.slice(2)) {\n return true;\n }\n if (domain === allowed) return true;\n }\n }\n return false;\n}\n\n// Glob matching: ./src/** matches ./src/foo/bar\nfunction isPathAllowed(requestedPath: string, allowedPaths: string[]): boolean {\n for (const allowed of allowedPaths) {\n if (allowed === requestedPath) return true;\n if (allowed.endsWith('/**')) {\n const prefix = allowed.slice(0, -3);\n if (requestedPath.startsWith(prefix)) return true;\n }\n }\n return false;\n}\n\ninterface BudgetViolation {\n category: string;\n value: string;\n skills: string[];\n}\n\nfunction checkBudget(resolved: ResolvedPermissions, budget: Permissions): BudgetViolation[] {\n const violations: BudgetViolation[] = [];\n\n const budgetDomains = budget.network?.outbound ?? [];\n for (const entry of resolved.networkOutbound) {\n if (!isDomainAllowed(entry.value, budgetDomains)) {\n violations.push({\n category: 'network outbound',\n value: entry.value,\n skills: entry.skills\n });\n }\n }\n\n const budgetReadPaths = budget.filesystem?.read ?? [];\n for (const entry of resolved.filesystemRead) {\n if (!isPathAllowed(entry.value, budgetReadPaths)) {\n violations.push({\n category: 'filesystem read',\n value: entry.value,\n skills: entry.skills\n });\n }\n }\n\n const budgetWritePaths = budget.filesystem?.write ?? [];\n for (const entry of resolved.filesystemWrite) {\n if (!isPathAllowed(entry.value, budgetWritePaths)) {\n violations.push({\n category: 'filesystem write',\n value: entry.value,\n skills: entry.skills\n });\n }\n }\n\n if (resolved.subprocess.length > 0 && budget.subprocess !== true) {\n violations.push({\n category: 'subprocess',\n value: 'subprocess access',\n skills: resolved.subprocess\n });\n }\n\n return violations;\n}\n\nexport function registerSkillPermissionsTool(server: McpServer): void {\n server.tool(\n 'skill-permissions',\n 'Display resolved permission summary for installed skills. Shows what capabilities each skill requires and checks against the project permission budget.',\n {\n directory: z.string().optional().describe('Project directory path (defaults to current working directory)')\n },\n async ({ directory }) => {\n const dir = directory ? path.resolve(directory) : process.cwd();\n\n if (!fs.existsSync(dir)) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Directory does not exist: ${dir}`\n }\n ],\n isError: true\n };\n }\n\n let skillsJsonPath = path.join(dir, MANIFEST_FILENAME);\n if (!fs.existsSync(skillsJsonPath)) {\n skillsJsonPath = path.join(dir, LEGACY_MANIFEST_FILENAME);\n }\n if (!fs.existsSync(skillsJsonPath)) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `No ${MANIFEST_FILENAME} found. Run \"init-skill\" to create one.`\n }\n ],\n isError: true\n };\n }\n\n let skillsJson: SkillsJson;\n try {\n const raw = fs.readFileSync(skillsJsonPath, 'utf-8');\n skillsJson = JSON.parse(raw) as SkillsJson;\n } catch {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Failed to parse ${path.basename(skillsJsonPath)}. The file may be corrupted.`\n }\n ],\n isError: true\n };\n }\n\n const skillDeps = skillsJson.skills ?? {};\n if (Object.keys(skillDeps).length === 0) {\n return {\n content: [\n {\n type: 'text' as const,\n text: 'No skills with permissions to display. The project has no skill dependencies.'\n }\n ]\n };\n }\n\n let lockfilePath = path.join(dir, LOCKFILE_FILENAME);\n if (!fs.existsSync(lockfilePath)) {\n lockfilePath = path.join(dir, LEGACY_LOCKFILE_FILENAME);\n }\n if (!fs.existsSync(lockfilePath)) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `No ${LOCKFILE_FILENAME} found. Skills are declared but not installed. Run install to generate a lockfile.`\n }\n ]\n };\n }\n\n let lockfile: SkillsLock;\n try {\n const raw = fs.readFileSync(lockfilePath, 'utf-8');\n lockfile = JSON.parse(raw) as SkillsLock;\n } catch {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Failed to parse ${path.basename(lockfilePath)}. The file may be corrupted.`\n }\n ],\n isError: true\n };\n }\n\n if (!lockfile.skills || Object.keys(lockfile.skills).length === 0) {\n return {\n content: [\n {\n type: 'text' as const,\n text: 'No skills installed. The lockfile is empty.'\n }\n ]\n };\n }\n\n const resolved = collectPermissions(lockfile);\n\n const lines: string[] = [];\n lines.push('Resolved permissions for this project:');\n lines.push('');\n\n lines.push(formatSection('Network (outbound)', resolved.networkOutbound));\n lines.push(formatSection('Filesystem (read)', resolved.filesystemRead));\n lines.push(formatSection('Filesystem (write)', resolved.filesystemWrite));\n\n lines.push('Subprocess:');\n if (resolved.subprocess.length === 0) {\n lines.push(' none');\n } else {\n lines.push(` allowed ${formatAttribution(resolved.subprocess)}`);\n }\n\n if (resolved.env.length > 0) {\n lines.push(formatSection('Environment variables', resolved.env));\n }\n\n if (resolved.exec.length > 0) {\n lines.push(formatSection('Exec', resolved.exec));\n }\n\n lines.push('');\n lines.push('Per-skill breakdown:');\n for (const [key, entry] of Object.entries(lockfile.skills)) {\n const skillName = parseSkillName(key);\n const perms = entry.permissions;\n const permParts: string[] = [];\n\n if (perms.network?.outbound && perms.network.outbound.length > 0) {\n permParts.push(`network: ${perms.network.outbound.join(', ')}`);\n }\n if (perms.filesystem?.read && perms.filesystem.read.length > 0) {\n permParts.push(`filesystem:read: ${perms.filesystem.read.join(', ')}`);\n }\n if (perms.filesystem?.write && perms.filesystem.write.length > 0) {\n permParts.push(`filesystem:write: ${perms.filesystem.write.join(', ')}`);\n }\n if (perms.subprocess === true) {\n permParts.push('subprocess: allowed');\n }\n\n const rawPerms = perms as Record<string, unknown>;\n if (Array.isArray(rawPerms.env) && (rawPerms.env as string[]).length > 0) {\n permParts.push(`env: ${(rawPerms.env as string[]).join(', ')}`);\n }\n if (Array.isArray(rawPerms.exec) && (rawPerms.exec as string[]).length > 0) {\n permParts.push(`exec: ${(rawPerms.exec as string[]).join(', ')}`);\n }\n\n if (permParts.length === 0) {\n lines.push(` ${skillName}: no special permissions`);\n } else {\n lines.push(` ${skillName}: ${permParts.join('; ')}`);\n }\n }\n\n const budget = skillsJson.permissions;\n lines.push('');\n\n if (!budget) {\n lines.push('Budget status: No budget defined');\n } else {\n const violations = checkBudget(resolved, budget);\n\n if (violations.length === 0) {\n lines.push('Budget status: PASS (all within budget)');\n } else {\n lines.push('Budget status: FAIL');\n for (const v of violations) {\n lines.push(` - ${v.category}: \"${v.value}\" not in budget (requested by ${v.skills.join(', ')})`);\n }\n }\n }\n\n return {\n content: [{ type: 'text' as const, text: lines.join('\\n') }]\n };\n }\n );\n}\n","import fs from 'node:fs';\nimport path from 'node:path';\n\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { z } from 'zod';\n\nconst SCOPED_NAME_PATTERN = /^@[a-z0-9-]+\\/[a-z0-9][a-z0-9-]*$/;\n\nexport function registerUnlinkSkillTool(server: McpServer): void {\n server.tool(\n 'unlink-skill',\n 'Unlink a skill from an agent workspace. Removes the symlink without deleting the installed skill files.',\n {\n name: z.string().describe('Skill name in @org/name format'),\n workspace: z.string().describe('Agent workspace directory path'),\n directory: z\n .string()\n .optional()\n .describe('Project directory where skills are installed (defaults to current working directory)')\n },\n async ({ name, workspace, directory }) => {\n if (!SCOPED_NAME_PATTERN.test(name)) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Validation error: Skill name \"${name}\" must use the @org/name format (e.g. @acme/my-skill).`\n }\n ],\n isError: true\n };\n }\n\n const projectDir = directory ? path.resolve(directory) : process.cwd();\n const workspaceDir = path.resolve(workspace);\n\n if (!fs.existsSync(workspaceDir)) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Error: Workspace directory does not exist: ${workspaceDir}`\n }\n ],\n isError: true\n };\n }\n\n const skillDir = getSkillDir(projectDir, name);\n if (!fs.existsSync(skillDir)) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Skill \"${name}\" is not installed. It was not found in ${skillDir}.`\n }\n ],\n isError: true\n };\n }\n\n const [scope, skillName] = name.split('/');\n const symlinkPath = path.join(workspaceDir, '.skills', scope, skillName);\n\n try {\n const stats = fs.lstatSync(symlinkPath);\n if (stats.isSymbolicLink()) {\n fs.unlinkSync(symlinkPath);\n return {\n content: [\n {\n type: 'text' as const,\n text: `Successfully unlinked \"${name}\" from ${workspaceDir}.\\nRemoved symlink: ${symlinkPath}`\n }\n ]\n };\n }\n } catch {\n // intentionally empty\n }\n\n return {\n content: [\n {\n type: 'text' as const,\n text: `No link exists for \"${name}\" in ${workspaceDir}.`\n }\n ]\n };\n }\n );\n}\n\nfunction getSkillDir(projectDir: string, skillName: string): string {\n if (skillName.startsWith('@')) {\n const [scope, name] = skillName.split('/');\n return path.join(projectDir, '.tank', 'skills', scope, name);\n }\n return path.join(projectDir, '.tank', 'skills', skillName);\n}\n","import fs from 'node:fs';\nimport path from 'node:path';\n\nimport { resolve } from '@internals/helpers';\nimport {\n LEGACY_LOCKFILE_FILENAME,\n LEGACY_MANIFEST_FILENAME,\n LOCKFILE_FILENAME,\n MANIFEST_FILENAME,\n type SkillsLock\n} from '@internals/schemas';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { z } from 'zod';\n\nimport { TankApiClient } from '~/lib/api-client.js';\n\nconst SCOPED_NAME_PATTERN = /^@[a-z0-9-]+\\/[a-z0-9][a-z0-9-]*$/;\n\ninterface VersionInfo {\n version: string;\n integrity: string;\n auditScore: number;\n auditStatus: string;\n publishedAt: string;\n}\n\ninterface VersionsResponse {\n name: string;\n versions: VersionInfo[];\n}\n\nfunction parseLockKey(key: string): { name: string; version: string } | null {\n const lastAt = key.lastIndexOf('@');\n if (lastAt <= 0) return null;\n return { name: key.slice(0, lastAt), version: key.slice(lastAt + 1) };\n}\n\nexport function registerUpdateSkillTool(server: McpServer): void {\n server.tool(\n 'update-skill',\n 'Update an installed skill to the latest compatible version within its declared semver range.',\n {\n name: z.string().describe('Skill name in @org/name format'),\n directory: z.string().optional().describe('Project directory (defaults to current working directory)')\n },\n async ({ name, directory }) => {\n if (!SCOPED_NAME_PATTERN.test(name)) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Validation error: Skill name \"${name}\" must use the @org/name format (e.g. @acme/my-skill).`\n }\n ],\n isError: true\n };\n }\n\n const dir = directory ? path.resolve(directory) : process.cwd();\n\n let skillsJsonPath = path.join(dir, MANIFEST_FILENAME);\n if (!fs.existsSync(skillsJsonPath)) {\n skillsJsonPath = path.join(dir, LEGACY_MANIFEST_FILENAME);\n }\n if (!fs.existsSync(skillsJsonPath)) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `No ${MANIFEST_FILENAME} found in ${dir}. Run the \"init-skill\" tool first.`\n }\n ],\n isError: true\n };\n }\n\n let skillsJson: Record<string, unknown>;\n try {\n const raw = fs.readFileSync(skillsJsonPath, 'utf-8');\n skillsJson = JSON.parse(raw) as Record<string, unknown>;\n } catch {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Failed to read or parse ${path.basename(skillsJsonPath)}.`\n }\n ],\n isError: true\n };\n }\n\n const skills = (skillsJson.skills ?? {}) as Record<string, string>;\n const versionRange = skills[name];\n\n if (!versionRange) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Skill \"${name}\" is not installed (not found in ${path.basename(skillsJsonPath)}). Install it first with the install-skill tool.`\n }\n ],\n isError: true\n };\n }\n\n let lockPath = path.join(dir, LOCKFILE_FILENAME);\n if (!fs.existsSync(lockPath)) {\n lockPath = path.join(dir, LEGACY_LOCKFILE_FILENAME);\n }\n let currentVersion: string | null = null;\n\n if (fs.existsSync(lockPath)) {\n try {\n const raw = fs.readFileSync(lockPath, 'utf-8');\n const lock = JSON.parse(raw) as SkillsLock;\n for (const key of Object.keys(lock.skills)) {\n const parsed = parseLockKey(key);\n if (!parsed) continue;\n if (parsed.name === name) {\n currentVersion = parsed.version;\n break;\n }\n }\n } catch {\n // Lockfile unreadable — treat as no current version\n }\n }\n\n if (!currentVersion) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Skill \"${name}\" is not installed (not found in ${LOCKFILE_FILENAME}). Install it first with the install-skill tool.`\n }\n ],\n isError: true\n };\n }\n\n const client = new TankApiClient();\n if (!client.isAuthenticated) {\n return {\n content: [\n {\n type: 'text' as const,\n text: 'Authentication required. Please run the \"login\" tool first to authenticate with Tank.'\n }\n ],\n isError: true\n };\n }\n\n // Fetch available versions from registry\n const encodedName = encodeURIComponent(name);\n const versionsResult = await client.fetch<VersionsResponse>(`/api/v1/skills/${encodedName}/versions`);\n\n if (!versionsResult.ok) {\n if (versionsResult.status === 0) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Unable to connect to the Tank registry. Check your network connection and try again.`\n }\n ],\n isError: true\n };\n }\n if (versionsResult.status === 404) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Skill \"${name}\" not found in the registry.`\n }\n ],\n isError: true\n };\n }\n return {\n content: [\n {\n type: 'text' as const,\n text: `Failed to fetch versions for ${name}: ${versionsResult.error}`\n }\n ],\n isError: true\n };\n }\n\n const availableVersions = versionsResult.data.versions.map((v) => v.version);\n\n // 6. Resolve best version within declared range\n const resolved = resolve(versionRange, availableVersions);\n if (!resolved) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `No version of ${name} satisfies range \"${versionRange}\". Available: ${availableVersions.join(', ')}`\n }\n ],\n isError: true\n };\n }\n\n // 7. Check for newer major versions outside range\n const allMajors = availableVersions\n .map((v) => {\n const major = v.split('.')[0];\n return { version: v, major: Number.parseInt(major, 10) };\n })\n .filter((v) => !Number.isNaN(v.major));\n\n const currentMajor = Number.parseInt(currentVersion.split('.')[0], 10);\n const newerMajors = allMajors.filter((v) => v.major > currentMajor).map((v) => v.version);\n\n const highestOutOfRange =\n newerMajors.length > 0\n ? newerMajors.sort((a, b) => {\n const [aMaj, aMin, aPat] = a.split('.').map(Number);\n const [bMaj, bMin, bPat] = b.split('.').map(Number);\n return bMaj - aMaj || bMin - aMin || bPat - aPat;\n })[0]\n : null;\n\n // 8. If resolved === current, already at latest\n if (resolved === currentVersion) {\n const lines = [`Already at latest compatible version: ${name}@${resolved}`];\n if (highestOutOfRange) {\n lines.push(\n `\\nNote: Version ${highestOutOfRange} is available but outside the declared range \"${versionRange}\". Update ${MANIFEST_FILENAME} to use it.`\n );\n }\n return {\n content: [\n {\n type: 'text' as const,\n text: lines.join('')\n }\n ]\n };\n }\n\n // 9. Fetch the resolved version details for download\n const versionResult = await client.fetch<{\n version: string;\n integrity: string;\n downloadUrl: string;\n permissions: Record<string, unknown>;\n auditScore: number | null;\n }>(`/api/v1/skills/${encodedName}/${resolved}`);\n\n if (!versionResult.ok) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Failed to fetch version details for ${name}@${resolved}: ${versionResult.error}`\n }\n ],\n isError: true\n };\n }\n\n const versionData = versionResult.data;\n\n // 10. Download tarball\n let tarballBuffer: ArrayBuffer;\n try {\n const tarballRes = await fetch(versionData.downloadUrl);\n if (!tarballRes.ok) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Failed to download tarball for ${name}@${resolved}: ${tarballRes.statusText}`\n }\n ],\n isError: true\n };\n }\n tarballBuffer = await tarballRes.arrayBuffer();\n } catch (err) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Network error downloading ${name}@${resolved}: ${err instanceof Error ? err.message : String(err)}`\n }\n ],\n isError: true\n };\n }\n\n // 11. Verify SHA-512\n const { createHash } = await import('node:crypto');\n const hash = createHash('sha512').update(Buffer.from(tarballBuffer)).digest('base64');\n const computedIntegrity = `sha512-${hash}`;\n\n if (computedIntegrity !== versionData.integrity) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Integrity check failed for ${name}@${resolved}. The tarball has been tampered with or is corrupted.\\nExpected: ${versionData.integrity}\\nGot: ${computedIntegrity}`\n }\n ],\n isError: true\n };\n }\n\n // 12. Extract tarball to skill directory\n const { execSync } = await import('node:child_process');\n const skillDir = getSkillDir(dir, name);\n\n // Remove old version files if they exist\n if (fs.existsSync(skillDir)) {\n fs.rmSync(skillDir, { recursive: true, force: true });\n }\n fs.mkdirSync(skillDir, { recursive: true });\n\n const tarballPath = path.join(skillDir, '__temp_tarball.tgz');\n fs.writeFileSync(tarballPath, Buffer.from(tarballBuffer));\n\n try {\n execSync(`tar xzf \"${tarballPath}\" -C \"${skillDir}\" --strip-components=1`, {\n stdio: 'pipe'\n });\n } catch (err) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Failed to extract tarball for ${name}@${resolved}: ${err instanceof Error ? err.message : String(err)}`\n }\n ],\n isError: true\n };\n } finally {\n // Clean up temp tarball\n try {\n fs.unlinkSync(tarballPath);\n } catch {\n /* ignore */\n }\n }\n\n // 13. Update lockfile\n let lock: SkillsLock;\n if (fs.existsSync(lockPath)) {\n try {\n const raw = fs.readFileSync(lockPath, 'utf-8');\n lock = JSON.parse(raw) as SkillsLock;\n } catch {\n lock = { lockfileVersion: 1, skills: {} };\n }\n } else {\n lock = { lockfileVersion: 1, skills: {} };\n }\n\n // Remove old lock entry for this skill\n for (const key of Object.keys(lock.skills)) {\n const parsed = parseLockKey(key);\n if (parsed && parsed.name === name) {\n delete lock.skills[key];\n }\n }\n\n // Add new lock entry\n const newLockKey = `${name}@${resolved}`;\n lock.skills[newLockKey] = {\n resolved: versionData.downloadUrl,\n integrity: versionData.integrity,\n permissions: versionData.permissions as SkillsLock['skills'][string]['permissions'],\n audit_score: versionData.auditScore\n };\n\n // Sort keys for deterministic output\n const sortedSkills: Record<string, unknown> = {};\n for (const key of Object.keys(lock.skills).sort()) {\n sortedSkills[key] = lock.skills[key];\n }\n lock.skills = sortedSkills as SkillsLock['skills'];\n\n fs.writeFileSync(lockPath, `${JSON.stringify(lock, null, 2)}\\n`);\n\n // 14. Build response\n const lines = [\n `Updated ${name} from ${currentVersion} to ${resolved}.`,\n `Integrity verified (SHA-512).`,\n `Lockfile updated.`\n ];\n\n if (highestOutOfRange) {\n lines.push(\n `\\nNote: Version ${highestOutOfRange} is available but outside the declared range \"${versionRange}\". Update ${MANIFEST_FILENAME} to use it.`\n );\n }\n\n return {\n content: [\n {\n type: 'text' as const,\n text: lines.join('\\n')\n }\n ]\n };\n }\n );\n}\n\nfunction getSkillDir(projectDir: string, skillName: string): string {\n if (skillName.startsWith('@')) {\n const [scope, name] = skillName.split('/');\n return path.join(projectDir, '.tank', 'skills', scope, name);\n }\n return path.join(projectDir, '.tank', 'skills', skillName);\n}\n","import fs from 'node:fs';\nimport path from 'node:path';\n\nimport { LEGACY_LOCKFILE_FILENAME, LOCKFILE_FILENAME, type SkillsLock } from '@internals/schemas';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { z } from 'zod';\n\nexport function registerVerifySkillsTool(server: McpServer): void {\n server.tool(\n 'verify-skills',\n 'Verify that installed skills match their lockfile entries. Checks that skill directories exist and are not empty.',\n {\n name: z.string().optional().describe('Specific skill name to verify (verifies all if omitted)'),\n directory: z.string().optional().describe('Project directory (defaults to current working directory)')\n },\n async ({ name, directory }) => {\n const dir = directory ? path.resolve(directory) : process.cwd();\n\n let lockPath = path.join(dir, LOCKFILE_FILENAME);\n if (!fs.existsSync(lockPath)) {\n lockPath = path.join(dir, LEGACY_LOCKFILE_FILENAME);\n }\n if (!fs.existsSync(lockPath)) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `No ${LOCKFILE_FILENAME} found. Run \"install-skill\" to install skills and generate a lockfile.`\n }\n ],\n isError: true\n };\n }\n\n let lock: SkillsLock;\n try {\n const raw = fs.readFileSync(lockPath, 'utf-8');\n lock = JSON.parse(raw) as SkillsLock;\n } catch {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Failed to parse ${path.basename(lockPath)}. The file may be corrupted.`\n }\n ],\n isError: true\n };\n }\n\n let entries = Object.entries(lock.skills);\n\n if (entries.length === 0) {\n return {\n content: [\n {\n type: 'text' as const,\n text: 'No skills to verify. The lockfile is empty.'\n }\n ]\n };\n }\n\n if (name) {\n entries = entries.filter(([key]) => {\n const lastAt = key.lastIndexOf('@');\n if (lastAt <= 0) return false;\n return key.slice(0, lastAt) === name;\n });\n\n if (entries.length === 0) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Skill \"${name}\" not found in lockfile.`\n }\n ],\n isError: true\n };\n }\n }\n\n const results: Array<{ key: string; status: 'PASS' | 'FAIL' | 'MISSING'; detail: string }> = [];\n\n for (const [key, entry] of entries) {\n const skillName = parseLockKey(key);\n const skillDir = getExtractDir(dir, skillName);\n\n if (!fs.existsSync(skillDir)) {\n results.push({\n key,\n status: 'MISSING',\n detail: `Directory missing at ${skillDir}. Reinstall with \"install-skill\".`\n });\n continue;\n }\n\n const contents = fs.readdirSync(skillDir);\n if (contents.length === 0) {\n results.push({\n key,\n status: 'FAIL',\n detail: `Directory exists but is empty. Expected integrity: ${entry.integrity}. SHA-512 mismatch detected.`\n });\n continue;\n }\n\n results.push({\n key,\n status: 'PASS',\n detail: `Verified (integrity: ${entry.integrity})`\n });\n }\n\n const passing = results.filter((r) => r.status === 'PASS');\n const failing = results.filter((r) => r.status !== 'PASS');\n\n const lines: string[] = [];\n for (const r of results) {\n lines.push(`${r.status} ${r.key}: ${r.detail}`);\n }\n\n if (failing.length > 0) {\n lines.push('');\n lines.push(`Verification failed: ${failing.length} issue(s) found, ${passing.length} passed.`);\n return {\n content: [{ type: 'text' as const, text: lines.join('\\n') }],\n isError: true\n };\n }\n\n lines.push('');\n lines.push(`All ${passing.length} skill(s) passed verification.`);\n return {\n content: [{ type: 'text' as const, text: lines.join('\\n') }]\n };\n }\n );\n}\n\nfunction parseLockKey(key: string): string {\n const lastAt = key.lastIndexOf('@');\n if (lastAt <= 0) return key;\n return key.slice(0, lastAt);\n}\n\nfunction getExtractDir(projectDir: string, skillName: string): string {\n if (skillName.startsWith('@')) {\n const [scope, name] = skillName.split('/');\n return path.join(projectDir, '.tank', 'skills', scope, name);\n }\n return path.join(projectDir, '.tank', 'skills', skillName);\n}\n","import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\n\nimport { TankApiClient } from '~/lib/api-client.js';\n\nexport function registerWhoamiTool(server: McpServer): void {\n server.tool('whoami', 'Show the authenticated Tank user for the current local session.', {}, async () => {\n const client = new TankApiClient();\n\n if (!client.isAuthenticated) {\n return {\n content: [{ type: 'text' as const, text: 'Not logged in. Use the login tool to authenticate.' }]\n };\n }\n\n const authCheck = await client.verifyAuth();\n\n if (authCheck.valid) {\n const name = authCheck.user.name ?? 'unknown';\n const email = authCheck.user.email ?? 'unknown';\n return {\n content: [{ type: 'text' as const, text: `Logged in as ${name}\\nEmail: ${email}` }]\n };\n }\n\n if (authCheck.reason === 'network-error') {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Failed to connect to the registry. Check your network connection.\\nError: ${authCheck.error ?? 'unknown'}`\n }\n ],\n isError: true\n };\n }\n\n return {\n content: [{ type: 'text' as const, text: 'Session expired or invalid. Use the login tool to re-authenticate.' }]\n };\n });\n}\n","#!/usr/bin/env node\n\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';\n\nimport { registerAuditSkillTool } from '~/tools/audit-skill.js';\nimport { registerDoctorTool } from '~/tools/doctor.js';\nimport { registerInitSkillTool } from '~/tools/init-skill.js';\nimport { registerInstallSkillTool } from '~/tools/install-skill.js';\nimport { registerLinkSkillTool } from '~/tools/link-skill.js';\n// Import tools\nimport { registerLoginTool } from '~/tools/login.js';\nimport { registerLogoutTool } from '~/tools/logout.js';\nimport { registerPublishSkillTool } from '~/tools/publish-skill.js';\nimport { registerRemoveSkillTool } from '~/tools/remove-skill.js';\nimport { registerScanSkillTool } from '~/tools/scan-skill.js';\nimport { registerSearchSkillsTool } from '~/tools/search-skills.js';\nimport { registerSkillInfoTool } from '~/tools/skill-info.js';\nimport { registerSkillPermissionsTool } from '~/tools/skill-permissions.js';\nimport { registerUnlinkSkillTool } from '~/tools/unlink-skill.js';\nimport { registerUpdateSkillTool } from '~/tools/update-skill.js';\nimport { registerVerifySkillsTool } from '~/tools/verify-skills.js';\nimport { registerWhoamiTool } from '~/tools/whoami.js';\n\n// Create MCP server instance\nconst server = new McpServer({\n name: 'tank',\n version: '0.1.0'\n});\n\n// Register all tools\nregisterLoginTool(server);\nregisterSearchSkillsTool(server);\nregisterSkillInfoTool(server);\nregisterScanSkillTool(server);\nregisterPublishSkillTool(server);\nregisterLogoutTool(server);\nregisterWhoamiTool(server);\nregisterInitSkillTool(server);\nregisterRemoveSkillTool(server);\nregisterVerifySkillsTool(server);\nregisterLinkSkillTool(server);\nregisterUnlinkSkillTool(server);\nregisterDoctorTool(server);\nregisterSkillPermissionsTool(server);\nregisterInstallSkillTool(server);\nregisterUpdateSkillTool(server);\nregisterAuditSkillTool(server);\n\n// Start stdio transport\nasync function main() {\n const transport = new StdioServerTransport();\n await server.connect(transport);\n}\n\nmain().catch((_error) => {\n process.exit(1);\n});\n"],"mappings":";;;;;;;;;;;;AAcqB,QAAQ,IAAI;AAOjC,MAAM,oBAAoB;AAC1B,MAAM,2BAA2B;AACjC,MAAM,oBAAoB;AAC1B,MAAM,2BAA2B;AAGjC,MAAMC,uBAAqB,EAAE,KAAK;CACjC;CACA;CACA;CACA,CAAC;AACF,MAAMC,8BAA4B,EAAE,OAAO;CAC1C,aAAaD;CACb,MAAMA;CACN,MAAMA;CACN,OAAOA;CACP,MAAMA;CACN,UAAUA;CACV,QAAQA;CACR,CAAC,CAAC,QAAQ;AAGX,MAAME,6BAA2B,EAAE,OAAO;CACzC,OAAO,EAAE,KAAK,CAAC,YAAY,UAAU,CAAC;CACtC,UAAU,EAAE,QAAQ;CACpB,SAAS,EAAE,QAAQ;CACnB,CAAC,CAAC,QAAQ;AACX,MAAM,kBAAkB,EAAE,OAAO;CAChC,MAAM,EAAE,QAAQ,CAAC,IAAI,EAAE;CACvB,SAAS,EAAE,QAAQ;CACnB,CAAC,CAAC,QAAQ;AACkB,EAAE,OAAO;CACrC,OAAO,EAAE,MAAM,gBAAgB;CAC/B,UAAU,EAAE,MAAMA,2BAAyB;CAC3C,CAAC,CAAC,QAAQ;AACuB,EAAE,OAAO;CAC1C,MAAM,EAAE,QAAQ,CAAC,IAAI,GAAG,iCAAiC;CACzD,gBAAgB,EAAE,QAAQ,CAAC,IAAI,GAAG,oCAAoC;CACtE,cAAcD;CACd,CAAC,CAAC,QAAQ;AAGY,EAAE,KAAK;CAC7B;CACA;CACA;CACA;CACA;CACA;CACA;CACA,CAAC;AACF,MAAME,uBAAqB,EAAE,OAAO,EAAE,QAAQ,EAA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AAO,EACL,SAAS,CAAC;GAAE,MAAM;GAAiB,MAAM,gBAH9B,UAAU,KAAK,QAAQ,UAG4B,WAFlD,UAAU,KAAK,SAAS;GAE8C,CAAC,EACpF;AAGH,MAAI,UAAU,WAAW,gBACvB,QAAO;GACL,SAAS,CACP;IACE,MAAM;IACN,MAAM,6EAA6E,UAAU,SAAS;IACvG,CACF;GACD,SAAS;GACV;AAGH,SAAO,EACL,SAAS,CAAC;GAAE,MAAM;GAAiB,MAAM;GAAsE,CAAC,EACjH;GACD;;;;ACdJ,MAAM,SAAS,IAAI,UAAU;CAC3B,MAAM;CACN,SAAS;CACV,CAAC;AAGF,kBAAkB,OAAO;AACzB,yBAAyB,OAAO;AAChC,sBAAsB,OAAO;AAC7B,sBAAsB,OAAO;AAC7B,yBAAyB,OAAO;AAChC,mBAAmB,OAAO;AAC1B,mBAAmB,OAAO;AAC1B,sBAAsB,OAAO;AAC7B,wBAAwB,OAAO;AAC/B,yBAAyB,OAAO;AAChC,sBAAsB,OAAO;AAC7B,wBAAwB,OAAO;AAC/B,mBAAmB,OAAO;AAC1B,6BAA6B,OAAO;AACpC,yBAAyB,OAAO;AAChC,wBAAwB,OAAO;AAC/B,uBAAuB,OAAO;AAG9B,eAAe,OAAO;CACpB,MAAM,YAAY,IAAI,sBAAsB;AAC5C,OAAM,OAAO,QAAQ,UAAU;;AAGjC,MAAM,CAAC,OAAO,WAAW;AACvB,SAAQ,KAAK,EAAE;EACf"}
1
+ {"version":3,"file":"index.js","names":["REGISTRY_URL","supportLevelSchema","adapterCapabilitiesSchema","compilationWarningSchema","extensionBagSchema","modelTierSchema","canonicalToolNameSchema","agentIRSchema","hookEventSchema","hookActionIRSchema","hookHandlerIRSchema","hookIRSchema","instructionIRSchema","networkPermissionsSchema","filesystemPermissionsSchema","permissionsSchema","promptIRSchema","resourceIRSchema","ruleIRSchema","mcpServerConfigSchema","toolIRSchema","NAME_PATTERN","SEMVER_PATTERN","atomIRSchema","commandSchema","argSchema","envSchema","remoteUrlSchema","mcpServerSchema","perToolOverrideSchema","baseManifestFields","SKILL_SOURCES","SCAN_VERDICTS","lockedSkillV1Schema","lockedSkillSchema","SEMVER_PATTERN","ALPHANUMERIC","SCOPED_NAME_PATTERN","parseLockKey","SCOPED_NAME_PATTERN","SCOPED_NAME_PATTERN","getSkillDir","crypto","SCOPED_NAME_PATTERN","getSkillDir","crypto","SCOPED_NAME_PATTERN","getSkillDir","SCOPED_NAME_PATTERN","getSkillDir","parseLockKey"],"sources":["../../internals-schemas/dist/index.js","../../sdk/dist/index.mjs","../src/lib/config.ts","../src/lib/api-client.ts","../src/tools/audit-skill.ts","../src/tools/doctor.ts","../src/tools/init-skill.ts","../../internals-helpers/dist/index.js","../src/tools/install-skill.ts","../src/tools/link-skill.ts","../src/tools/login.ts","../src/tools/logout.ts","../src/lib/packer.ts","../src/tools/publish-skill.ts","../src/tools/remove-skill.ts","../src/tools/scan-skill.ts","../src/tools/search-skills.ts","../src/tools/skill-info.ts","../src/tools/skill-permissions.ts","../src/tools/unlink-skill.ts","../src/tools/update-skill.ts","../src/tools/verify-skills.ts","../src/tools/whoami.ts","../src/index.ts"],"sourcesContent":["import { z } from \"zod\";\n//#region src/constants/permissions.ts\nconst PERMISSION_CATEGORIES = [\n\t\"network\",\n\t\"filesystem\",\n\t\"subprocess\"\n];\nconst DEFAULT_PERMISSIONS = {\n\tnetwork: void 0,\n\tfilesystem: void 0,\n\tsubprocess: false\n};\n//#endregion\n//#region src/constants/registry.ts\nconst REGISTRY_URL = process.env.TANK_REGISTRY_URL || \"https://www.tankpkg.dev\";\nconst REGISTRY_API_VERSION = \"v1\";\nconst MAX_PACKAGE_SIZE = 50 * 1024 * 1024;\nconst MAX_FILE_COUNT = 1e3;\nconst MAX_NAME_LENGTH = 214;\nconst MAX_DESCRIPTION_LENGTH = 500;\nconst LOCKFILE_VERSION = 2;\nconst MANIFEST_FILENAME = \"tank.json\";\nconst LEGACY_MANIFEST_FILENAME = \"skills.json\";\nconst LOCKFILE_FILENAME = \"tank.lock\";\nconst LEGACY_LOCKFILE_FILENAME = \"skills.lock\";\n//#endregion\n//#region src/schemas/adapters/capabilities.ts\nconst supportLevelSchema = z.enum([\n\t\"full\",\n\t\"degraded\",\n\t\"none\"\n]);\nconst adapterCapabilitiesSchema = z.object({\n\tinstruction: supportLevelSchema,\n\thook: supportLevelSchema,\n\ttool: supportLevelSchema,\n\tagent: supportLevelSchema,\n\trule: supportLevelSchema,\n\tresource: supportLevelSchema,\n\tprompt: supportLevelSchema\n}).strict();\n//#endregion\n//#region src/schemas/adapters/platform-adapter.ts\nconst compilationWarningSchema = z.object({\n\tlevel: z.enum([\"degraded\", \"skipped\"]),\n\tatomKind: z.string(),\n\tmessage: z.string()\n}).strict();\nconst fileWriteSchema = z.object({\n\tpath: z.string().min(1),\n\tcontent: z.string()\n}).strict();\nconst platformOutputSchema = z.object({\n\tfiles: z.array(fileWriteSchema),\n\twarnings: z.array(compilationWarningSchema)\n}).strict();\nconst platformAdapterMetaSchema = z.object({\n\tname: z.string().min(1, \"Adapter name must not be empty\"),\n\tsupportedRange: z.string().min(1, \"Supported range must not be empty\"),\n\tcapabilities: adapterCapabilitiesSchema\n}).strict();\n//#endregion\n//#region src/schemas/atoms/base.ts\nconst atomKindSchema = z.enum([\n\t\"instruction\",\n\t\"hook\",\n\t\"tool\",\n\t\"agent\",\n\t\"rule\",\n\t\"resource\",\n\t\"prompt\"\n]);\nconst extensionBagSchema = z.record(z.string(), z.unknown()).optional();\n//#endregion\n//#region src/schemas/atoms/model-tiers.ts\nconst modelTierSchema = z.enum([\n\t\"fast\",\n\t\"balanced\",\n\t\"powerful\",\n\t\"custom\"\n]);\nconst MODEL_TIERS = modelTierSchema.options;\n//#endregion\n//#region src/schemas/atoms/tool-names.ts\nconst canonicalToolNameSchema = z.enum([\n\t\"bash\",\n\t\"read\",\n\t\"write\",\n\t\"edit\",\n\t\"grep\",\n\t\"glob\",\n\t\"lsp\",\n\t\"mcp\",\n\t\"browser\",\n\t\"fetch\",\n\t\"git\",\n\t\"task\",\n\t\"notebook\"\n]);\nconst CANONICAL_TOOL_NAMES = canonicalToolNameSchema.options;\n//#endregion\n//#region src/schemas/atoms/agent.ts\nconst agentIRSchema = z.object({\n\tkind: z.literal(\"agent\"),\n\tname: z.string().min(1, \"Agent name must not be empty\"),\n\trole: z.string().min(1, \"Agent role must not be empty\"),\n\ttools: z.array(canonicalToolNameSchema.or(z.string().min(1))).optional(),\n\tmodel: modelTierSchema.or(z.string().min(1)).optional(),\n\treadonly: z.boolean().optional(),\n\textensions: extensionBagSchema\n}).strict();\n//#endregion\n//#region src/schemas/atoms/events.ts\nconst hookEventSchema = z.enum([\n\t\"pre-tool-use\",\n\t\"post-tool-use\",\n\t\"pre-file-read\",\n\t\"post-file-read\",\n\t\"pre-file-write\",\n\t\"post-file-write\",\n\t\"file-edited\",\n\t\"file-watcher-updated\",\n\t\"pre-command\",\n\t\"post-command\",\n\t\"pre-mcp-tool-use\",\n\t\"post-mcp-tool-use\",\n\t\"session-created\",\n\t\"session-updated\",\n\t\"session-idle\",\n\t\"session-error\",\n\t\"session-deleted\",\n\t\"pre-stop\",\n\t\"task-start\",\n\t\"task-resume\",\n\t\"task-complete\",\n\t\"task-cancel\",\n\t\"pre-user-prompt\",\n\t\"post-response\",\n\t\"message-updated\",\n\t\"message-removed\",\n\t\"system-prompt-transform\",\n\t\"pre-context-compact\",\n\t\"post-context-compact\",\n\t\"permission-asked\",\n\t\"permission-replied\",\n\t\"lsp-diagnostics\",\n\t\"lsp-updated\",\n\t\"subagent-start\",\n\t\"subagent-complete\",\n\t\"subagent-tool-use\",\n\t\"shell-env\",\n\t\"todo-updated\",\n\t\"installation-updated\"\n]);\nconst HOOK_EVENTS = hookEventSchema.options;\n//#endregion\n//#region src/schemas/atoms/hook.ts\nconst hookActionIRSchema = z.object({\n\taction: z.enum([\n\t\t\"block\",\n\t\t\"allow\",\n\t\t\"rewrite\",\n\t\t\"injectContext\"\n\t]),\n\tmatch: z.string().optional(),\n\treason: z.string().optional(),\n\tvalue: z.string().optional()\n}).strict();\nconst hookDslHandlerSchema = z.object({\n\ttype: z.literal(\"dsl\"),\n\tactions: z.array(hookActionIRSchema).min(1, \"DSL handler must have at least one action\")\n}).strict();\nconst hookJsHandlerSchema = z.object({\n\ttype: z.literal(\"js\"),\n\tentry: z.string().min(1, \"JS handler entry path must not be empty\")\n}).strict();\nconst hookHandlerIRSchema = z.discriminatedUnion(\"type\", [hookDslHandlerSchema, hookJsHandlerSchema]);\nconst hookIRSchema = z.object({\n\tkind: z.literal(\"hook\"),\n\tname: z.string().optional(),\n\tevent: hookEventSchema,\n\tmatch: canonicalToolNameSchema.or(z.string().min(1)).optional(),\n\thandler: hookHandlerIRSchema,\n\tscope: z.enum([\"project\", \"global\"]).optional(),\n\textensions: extensionBagSchema\n}).strict();\n//#endregion\n//#region src/schemas/atoms/instruction.ts\nconst instructionIRSchema = z.object({\n\tkind: z.literal(\"instruction\"),\n\tcontent: z.string().min(1, \"Content path must not be empty\"),\n\tscope: z.enum([\n\t\t\"project\",\n\t\t\"global\",\n\t\t\"directory\"\n\t]).optional(),\n\tglobs: z.array(z.string()).optional(),\n\textensions: extensionBagSchema\n}).strict();\n//#endregion\n//#region src/schemas/permissions.ts\nconst networkPermissionsSchema = z.object({ outbound: z.array(z.string()).optional() }).strict();\nconst filesystemPermissionsSchema = z.object({\n\tread: z.array(z.string()).optional(),\n\twrite: z.array(z.string()).optional()\n}).strict();\nconst permissionsSchema = z.object({\n\tnetwork: networkPermissionsSchema.optional(),\n\tfilesystem: filesystemPermissionsSchema.optional(),\n\tsubprocess: z.boolean().optional()\n}).strict();\nconst userRoleSchema = z.enum([\"user\", \"admin\"]);\nconst userStatusSchema = z.enum([\n\t\"active\",\n\t\"suspended\",\n\t\"banned\"\n]);\nconst skillStatusSchema = z.enum([\n\t\"active\",\n\t\"deprecated\",\n\t\"quarantined\",\n\t\"removed\"\n]);\nconst adminActionSchema = z.enum([\n\t\"user.ban\",\n\t\"user.suspend\",\n\t\"user.unban\",\n\t\"user.promote\",\n\t\"user.demote\",\n\t\"skill.quarantine\",\n\t\"skill.remove\",\n\t\"skill.deprecate\",\n\t\"skill.restore\",\n\t\"skill.feature\",\n\t\"skill.unfeature\",\n\t\"org.suspend\",\n\t\"org.member.remove\",\n\t\"org.delete\"\n]);\nfunction isAdmin(role) {\n\treturn role === \"admin\";\n}\n//#endregion\n//#region src/schemas/atoms/prompt.ts\nconst promptIRSchema = z.object({\n\tkind: z.literal(\"prompt\"),\n\tname: z.string().min(1, \"Prompt name must not be empty\"),\n\tdescription: z.string().optional(),\n\ttemplate: z.string().min(1, \"Prompt template path must not be empty\"),\n\targuments: z.array(z.object({\n\t\tname: z.string(),\n\t\tdescription: z.string().optional(),\n\t\trequired: z.boolean().optional()\n\t}).strict()).optional(),\n\textensions: extensionBagSchema\n}).strict();\n//#endregion\n//#region src/schemas/atoms/resource.ts\nconst resourceIRSchema = z.object({\n\tkind: z.literal(\"resource\"),\n\tname: z.string().optional(),\n\turi: z.string().min(1, \"Resource URI must not be empty\"),\n\tdescription: z.string().optional(),\n\tmimeType: z.string().optional(),\n\textensions: extensionBagSchema\n}).strict();\n//#endregion\n//#region src/schemas/atoms/rule.ts\nconst ruleIRSchema = z.object({\n\tkind: z.literal(\"rule\"),\n\tname: z.string().optional(),\n\tevent: hookEventSchema,\n\tmatch: canonicalToolNameSchema.or(z.string().min(1)).optional(),\n\tpolicy: z.enum([\n\t\t\"block\",\n\t\t\"allow\",\n\t\t\"warn\"\n\t]),\n\treason: z.string().optional(),\n\textensions: extensionBagSchema\n}).strict();\n//#endregion\n//#region src/schemas/atoms/tool.ts\nconst mcpServerConfigSchema = z.object({\n\tcommand: z.string().min(1).optional(),\n\targs: z.array(z.string()).optional(),\n\tenv: z.record(z.string(), z.string()).optional(),\n\truntime: z.string().min(1).optional(),\n\tentry: z.string().min(1).optional()\n}).strict().refine((data) => data.command || data.runtime && data.entry, \"MCP config must have either \\\"command\\\" or both \\\"runtime\\\" and \\\"entry\\\"\");\nconst toolIRSchema = z.object({\n\tkind: z.literal(\"tool\"),\n\tname: z.string().min(1, \"Tool name must not be empty\"),\n\tdescription: z.string().optional(),\n\tmcp: mcpServerConfigSchema.optional(),\n\textensions: extensionBagSchema\n}).strict();\n//#endregion\n//#region src/schemas/atoms/package.ts\nconst NAME_PATTERN = /^@[a-z0-9-]+\\/[a-z0-9][a-z0-9-]*$/;\nconst SEMVER_PATTERN = /^\\d+\\.\\d+\\.\\d+(-[a-zA-Z0-9.-]+)?(\\+[a-zA-Z0-9.-]+)?$/;\nconst atomIRSchema = z.discriminatedUnion(\"kind\", [\n\tinstructionIRSchema,\n\thookIRSchema,\n\ttoolIRSchema,\n\tagentIRSchema,\n\truleIRSchema,\n\tresourceIRSchema,\n\tpromptIRSchema\n]);\nconst packageIRSchema = z.object({\n\tname: z.string().min(1, \"Name must not be empty\").max(214, `Name must be 214 characters or fewer`).regex(NAME_PATTERN, \"Name must be scoped (@org/name), lowercase alphanumeric and hyphens\"),\n\tversion: z.string().regex(SEMVER_PATTERN, \"Version must be valid semver\"),\n\tdescription: z.string().max(500).optional(),\n\tatoms: z.array(atomIRSchema),\n\tincludes: z.array(z.string()).optional(),\n\tskills: z.record(z.string(), z.string()).optional(),\n\tpermissions: permissionsSchema.optional(),\n\trepository: z.string().url(\"Repository must be a valid URL\").optional(),\n\tvisibility: z.enum([\"public\", \"private\"]).optional(),\n\taudit: z.object({ min_score: z.number().min(0).max(10) }).strict().optional()\n}).strict();\n//#endregion\n//#region src/schemas/mcp-server.ts\nconst commandSchema = z.string().min(1, \"command must not be empty\");\nconst argSchema = z.array(z.string()).default([]);\nconst envSchema = z.record(z.string(), z.string()).optional();\nconst remoteUrlSchema = z.string().url(\"remote must be a valid URL\");\nconst localMcpServerSchema = z.object({\n\tcommand: commandSchema,\n\targs: argSchema,\n\tenv: envSchema,\n\trequires_auth: z.literal(false).optional()\n}).strict();\nconst remoteMcpServerSchema = z.object({\n\tremote: remoteUrlSchema,\n\trequires_auth: z.boolean().default(false),\n\tenv: envSchema\n}).strict();\nconst mcpServerSchema = z.union([localMcpServerSchema, remoteMcpServerSchema]);\nfunction isRemoteMcpServer(server) {\n\treturn \"remote\" in server;\n}\n//#endregion\n//#region src/schemas/proxy-policy.ts\nconst perToolOverrideSchema = z.object({\n\tscan: z.boolean().optional(),\n\tblockOnMatch: z.boolean().optional()\n}).strict();\nconst proxyPolicySchema = z.object({\n\tperfBudgetMs: z.number().positive().optional(),\n\tblockOnMatch: z.boolean().optional(),\n\tresetPinsOnMismatch: z.boolean().optional(),\n\tperTool: z.record(z.string(), perToolOverrideSchema).optional()\n}).strict();\n//#endregion\n//#region src/schemas/skills-json.ts\nconst baseManifestFields = {\n\tname: z.string().min(1, \"Name must not be empty\").max(214, `Name must be 214 characters or fewer`).regex(/^@[a-z0-9-]+\\/[a-z0-9][a-z0-9-]*$/, \"Name must be scoped (@org/name), lowercase alphanumeric and hyphens\"),\n\tversion: z.string().regex(/^\\d+\\.\\d+\\.\\d+(-[a-zA-Z0-9.-]+)?(\\+[a-zA-Z0-9.-]+)?$/, \"Version must be valid semver\"),\n\tdescription: z.string().max(500, `Description must be 500 characters or fewer`).optional(),\n\tskills: z.record(z.string(), z.string()).optional(),\n\tpermissions: permissionsSchema.optional(),\n\trepository: z.string().url(\"Repository must be a valid URL\").optional(),\n\tvisibility: z.enum([\"public\", \"private\"]).optional(),\n\taudit: z.object({ min_score: z.number().min(0).max(10) }).strict().optional(),\n\tmcp_server: mcpServerSchema.optional()\n};\n/** Legacy skills.json schema — strict, no atoms. Used for backward-compatible consumers. */\nconst skillsJsonSchema = z.object(baseManifestFields).strict();\n/**\n* Publish manifest schema — accepts both legacy skills.json AND atom-enriched tank.json.\n* The `atoms` and `includes` fields are passed through as opaque JSON arrays,\n* validated only at surface level. Full atom IR validation happens at build time.\n*/\nconst publishManifestSchema = z.object({\n\t...baseManifestFields,\n\tatoms: z.array(z.record(z.string(), z.unknown())).optional(),\n\tincludes: z.array(z.string()).optional()\n}).strict();\n//#endregion\n//#region src/schemas/skills-lock.ts\nconst SKILL_SOURCES = [\n\t\"registry\",\n\t\"github\",\n\t\"clawhub\",\n\t\"skills_sh\",\n\t\"agentskills_il\",\n\t\"npm\",\n\t\"local\"\n];\nconst SCAN_VERDICTS = [\n\t\"pass\",\n\t\"pass_with_notes\",\n\t\"flagged\",\n\t\"fail\",\n\t\"error\"\n];\nconst lockedSkillV1Schema = z.object({\n\tresolved: z.string().url(),\n\tintegrity: z.string().regex(/^sha512-/, \"Integrity must start with sha512-\"),\n\tpermissions: permissionsSchema,\n\taudit_score: z.number().min(0).max(10).nullable()\n});\nconst skillsLockV1Schema = z.object({\n\tlockfileVersion: z.literal(1),\n\tskills: z.record(z.string(), lockedSkillV1Schema)\n});\nconst lockedSkillSchema = z.object({\n\tresolved: z.string().url(),\n\tintegrity: z.string().regex(/^sha512-/, \"Integrity must start with sha512-\"),\n\tpermissions: permissionsSchema,\n\taudit_score: z.number().min(0).max(10).nullable(),\n\tdependencies: z.record(z.string(), z.string()).optional(),\n\tsource: z.enum(SKILL_SOURCES).optional(),\n\tscan_verdict: z.enum(SCAN_VERDICTS).optional(),\n\tscanned_at: z.string().optional()\n});\nconst skillsLockSchema = z.object({\n\tlockfileVersion: z.union([z.literal(1), z.literal(2)]),\n\tskills: z.record(z.string(), lockedSkillSchema)\n});\n//#endregion\nexport { CANONICAL_TOOL_NAMES, DEFAULT_PERMISSIONS, HOOK_EVENTS, LEGACY_LOCKFILE_FILENAME, LEGACY_MANIFEST_FILENAME, LOCKFILE_FILENAME, LOCKFILE_VERSION, MANIFEST_FILENAME, MAX_DESCRIPTION_LENGTH, MAX_FILE_COUNT, MAX_NAME_LENGTH, MAX_PACKAGE_SIZE, MODEL_TIERS, PERMISSION_CATEGORIES, REGISTRY_API_VERSION, REGISTRY_URL, SCAN_VERDICTS, SKILL_SOURCES, adapterCapabilitiesSchema, adminActionSchema, agentIRSchema, atomIRSchema, atomKindSchema, canonicalToolNameSchema, compilationWarningSchema, extensionBagSchema, fileWriteSchema, filesystemPermissionsSchema, hookActionIRSchema, hookDslHandlerSchema, hookEventSchema, hookHandlerIRSchema, hookIRSchema, hookJsHandlerSchema, instructionIRSchema, isAdmin, isRemoteMcpServer, lockedSkillSchema, lockedSkillV1Schema, mcpServerConfigSchema, mcpServerSchema, modelTierSchema, networkPermissionsSchema, packageIRSchema, perToolOverrideSchema, permissionsSchema, platformAdapterMetaSchema, platformOutputSchema, promptIRSchema, proxyPolicySchema, publishManifestSchema, resourceIRSchema, ruleIRSchema, skillStatusSchema, skillsJsonSchema, skillsLockSchema, skillsLockV1Schema, supportLevelSchema, toolIRSchema, userRoleSchema, userStatusSchema };\n\n//# sourceMappingURL=index.js.map","import { createRequire } from \"node:module\";\nimport fs from \"node:fs\";\nimport os from \"node:os\";\nimport path from \"node:path\";\nimport crypto$1 from \"node:crypto\";\nimport { extract } from \"tar\";\n//#region \\0rolldown/runtime.js\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {\n\t\tkey = keys[i];\n\t\tif (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {\n\t\t\tget: ((k) => from[k]).bind(null, key),\n\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t});\n\t}\n\treturn to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", {\n\tvalue: mod,\n\tenumerable: true\n}) : target, mod));\nObject.freeze({ status: \"aborted\" });\nfunction $constructor(name, initializer, params) {\n\tfunction init(inst, def) {\n\t\tif (!inst._zod) Object.defineProperty(inst, \"_zod\", {\n\t\t\tvalue: {\n\t\t\t\tdef,\n\t\t\t\tconstr: _,\n\t\t\t\ttraits: /* @__PURE__ */ new Set()\n\t\t\t},\n\t\t\tenumerable: false\n\t\t});\n\t\tif (inst._zod.traits.has(name)) return;\n\t\tinst._zod.traits.add(name);\n\t\tinitializer(inst, def);\n\t\tconst proto = _.prototype;\n\t\tconst keys = Object.keys(proto);\n\t\tfor (let i = 0; i < keys.length; i++) {\n\t\t\tconst k = keys[i];\n\t\t\tif (!(k in inst)) inst[k] = proto[k].bind(inst);\n\t\t}\n\t}\n\tconst Parent = params?.Parent ?? Object;\n\tclass Definition extends Parent {}\n\tObject.defineProperty(Definition, \"name\", { value: name });\n\tfunction _(def) {\n\t\tvar _a;\n\t\tconst inst = params?.Parent ? new Definition() : this;\n\t\tinit(inst, def);\n\t\t(_a = inst._zod).deferred ?? (_a.deferred = []);\n\t\tfor (const fn of inst._zod.deferred) fn();\n\t\treturn inst;\n\t}\n\tObject.defineProperty(_, \"init\", { value: init });\n\tObject.defineProperty(_, Symbol.hasInstance, { value: (inst) => {\n\t\tif (params?.Parent && inst instanceof params.Parent) return true;\n\t\treturn inst?._zod?.traits?.has(name);\n\t} });\n\tObject.defineProperty(_, \"name\", { value: name });\n\treturn _;\n}\nvar $ZodAsyncError = class extends Error {\n\tconstructor() {\n\t\tsuper(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);\n\t}\n};\nvar $ZodEncodeError = class extends Error {\n\tconstructor(name) {\n\t\tsuper(`Encountered unidirectional transform during encode: ${name}`);\n\t\tthis.name = \"ZodEncodeError\";\n\t}\n};\nconst globalConfig = {};\nfunction config(newConfig) {\n\tif (newConfig) Object.assign(globalConfig, newConfig);\n\treturn globalConfig;\n}\n//#endregion\n//#region ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/util.js\nfunction getEnumValues(entries) {\n\tconst numericValues = Object.values(entries).filter((v) => typeof v === \"number\");\n\treturn Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);\n}\nfunction jsonStringifyReplacer(_, value) {\n\tif (typeof value === \"bigint\") return value.toString();\n\treturn value;\n}\nfunction cached(getter) {\n\treturn { get value() {\n\t\t{\n\t\t\tconst value = getter();\n\t\t\tObject.defineProperty(this, \"value\", { value });\n\t\t\treturn value;\n\t\t}\n\t\tthrow new Error(\"cached value already set\");\n\t} };\n}\nfunction nullish(input) {\n\treturn input === null || input === void 0;\n}\nfunction cleanRegex(source) {\n\tconst start = source.startsWith(\"^\") ? 1 : 0;\n\tconst end = source.endsWith(\"$\") ? source.length - 1 : source.length;\n\treturn source.slice(start, end);\n}\nfunction floatSafeRemainder(val, step) {\n\tconst valDecCount = (val.toString().split(\".\")[1] || \"\").length;\n\tconst stepString = step.toString();\n\tlet stepDecCount = (stepString.split(\".\")[1] || \"\").length;\n\tif (stepDecCount === 0 && /\\d?e-\\d?/.test(stepString)) {\n\t\tconst match = stepString.match(/\\d?e-(\\d?)/);\n\t\tif (match?.[1]) stepDecCount = Number.parseInt(match[1]);\n\t}\n\tconst decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;\n\treturn Number.parseInt(val.toFixed(decCount).replace(\".\", \"\")) % Number.parseInt(step.toFixed(decCount).replace(\".\", \"\")) / 10 ** decCount;\n}\nconst EVALUATING = Symbol(\"evaluating\");\nfunction defineLazy(object, key, getter) {\n\tlet value = void 0;\n\tObject.defineProperty(object, key, {\n\t\tget() {\n\t\t\tif (value === EVALUATING) return;\n\t\t\tif (value === void 0) {\n\t\t\t\tvalue = EVALUATING;\n\t\t\t\tvalue = getter();\n\t\t\t}\n\t\t\treturn value;\n\t\t},\n\t\tset(v) {\n\t\t\tObject.defineProperty(object, key, { value: v });\n\t\t},\n\t\tconfigurable: true\n\t});\n}\nfunction assignProp(target, prop, value) {\n\tObject.defineProperty(target, prop, {\n\t\tvalue,\n\t\twritable: true,\n\t\tenumerable: true,\n\t\tconfigurable: true\n\t});\n}\nfunction mergeDefs(...defs) {\n\tconst mergedDescriptors = {};\n\tfor (const def of defs) Object.assign(mergedDescriptors, Object.getOwnPropertyDescriptors(def));\n\treturn Object.defineProperties({}, mergedDescriptors);\n}\nfunction esc(str) {\n\treturn JSON.stringify(str);\n}\nfunction slugify(input) {\n\treturn input.toLowerCase().trim().replace(/[^\\w\\s-]/g, \"\").replace(/[\\s_-]+/g, \"-\").replace(/^-+|-+$/g, \"\");\n}\nconst captureStackTrace = \"captureStackTrace\" in Error ? Error.captureStackTrace : (..._args) => {};\nfunction isObject(data) {\n\treturn typeof data === \"object\" && data !== null && !Array.isArray(data);\n}\nconst allowsEval = cached(() => {\n\tif (typeof navigator !== \"undefined\" && navigator?.userAgent?.includes(\"Cloudflare\")) return false;\n\ttry {\n\t\tnew Function(\"\");\n\t\treturn true;\n\t} catch (_) {\n\t\treturn false;\n\t}\n});\nfunction isPlainObject(o) {\n\tif (isObject(o) === false) return false;\n\tconst ctor = o.constructor;\n\tif (ctor === void 0) return true;\n\tif (typeof ctor !== \"function\") return true;\n\tconst prot = ctor.prototype;\n\tif (isObject(prot) === false) return false;\n\tif (Object.prototype.hasOwnProperty.call(prot, \"isPrototypeOf\") === false) return false;\n\treturn true;\n}\nfunction shallowClone(o) {\n\tif (isPlainObject(o)) return { ...o };\n\tif (Array.isArray(o)) return [...o];\n\treturn o;\n}\nconst propertyKeyTypes = new Set([\n\t\"string\",\n\t\"number\",\n\t\"symbol\"\n]);\nfunction escapeRegex(str) {\n\treturn str.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n}\nfunction clone(inst, def, params) {\n\tconst cl = new inst._zod.constr(def ?? inst._zod.def);\n\tif (!def || params?.parent) cl._zod.parent = inst;\n\treturn cl;\n}\nfunction normalizeParams(_params) {\n\tconst params = _params;\n\tif (!params) return {};\n\tif (typeof params === \"string\") return { error: () => params };\n\tif (params?.message !== void 0) {\n\t\tif (params?.error !== void 0) throw new Error(\"Cannot specify both `message` and `error` params\");\n\t\tparams.error = params.message;\n\t}\n\tdelete params.message;\n\tif (typeof params.error === \"string\") return {\n\t\t...params,\n\t\terror: () => params.error\n\t};\n\treturn params;\n}\nfunction optionalKeys(shape) {\n\treturn Object.keys(shape).filter((k) => {\n\t\treturn shape[k]._zod.optin === \"optional\" && shape[k]._zod.optout === \"optional\";\n\t});\n}\nconst NUMBER_FORMAT_RANGES = {\n\tsafeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],\n\tint32: [-2147483648, 2147483647],\n\tuint32: [0, 4294967295],\n\tfloat32: [-34028234663852886e22, 34028234663852886e22],\n\tfloat64: [-Number.MAX_VALUE, Number.MAX_VALUE]\n};\nfunction pick(schema, mask) {\n\tconst currDef = schema._zod.def;\n\tconst checks = currDef.checks;\n\tif (checks && checks.length > 0) throw new Error(\".pick() cannot be used on object schemas containing refinements\");\n\treturn clone(schema, mergeDefs(schema._zod.def, {\n\t\tget shape() {\n\t\t\tconst newShape = {};\n\t\t\tfor (const key in mask) {\n\t\t\t\tif (!(key in currDef.shape)) throw new Error(`Unrecognized key: \"${key}\"`);\n\t\t\t\tif (!mask[key]) continue;\n\t\t\t\tnewShape[key] = currDef.shape[key];\n\t\t\t}\n\t\t\tassignProp(this, \"shape\", newShape);\n\t\t\treturn newShape;\n\t\t},\n\t\tchecks: []\n\t}));\n}\nfunction omit(schema, mask) {\n\tconst currDef = schema._zod.def;\n\tconst checks = currDef.checks;\n\tif (checks && checks.length > 0) throw new Error(\".omit() cannot be used on object schemas containing refinements\");\n\treturn clone(schema, mergeDefs(schema._zod.def, {\n\t\tget shape() {\n\t\t\tconst newShape = { ...schema._zod.def.shape };\n\t\t\tfor (const key in mask) {\n\t\t\t\tif (!(key in currDef.shape)) throw new Error(`Unrecognized key: \"${key}\"`);\n\t\t\t\tif (!mask[key]) continue;\n\t\t\t\tdelete newShape[key];\n\t\t\t}\n\t\t\tassignProp(this, \"shape\", newShape);\n\t\t\treturn newShape;\n\t\t},\n\t\tchecks: []\n\t}));\n}\nfunction extend(schema, shape) {\n\tif (!isPlainObject(shape)) throw new Error(\"Invalid input to extend: expected a plain object\");\n\tconst checks = schema._zod.def.checks;\n\tif (checks && checks.length > 0) {\n\t\tconst existingShape = schema._zod.def.shape;\n\t\tfor (const key in shape) if (Object.getOwnPropertyDescriptor(existingShape, key) !== void 0) throw new Error(\"Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.\");\n\t}\n\treturn clone(schema, mergeDefs(schema._zod.def, { get shape() {\n\t\tconst _shape = {\n\t\t\t...schema._zod.def.shape,\n\t\t\t...shape\n\t\t};\n\t\tassignProp(this, \"shape\", _shape);\n\t\treturn _shape;\n\t} }));\n}\nfunction safeExtend(schema, shape) {\n\tif (!isPlainObject(shape)) throw new Error(\"Invalid input to safeExtend: expected a plain object\");\n\treturn clone(schema, mergeDefs(schema._zod.def, { get shape() {\n\t\tconst _shape = {\n\t\t\t...schema._zod.def.shape,\n\t\t\t...shape\n\t\t};\n\t\tassignProp(this, \"shape\", _shape);\n\t\treturn _shape;\n\t} }));\n}\nfunction merge(a, b) {\n\treturn clone(a, mergeDefs(a._zod.def, {\n\t\tget shape() {\n\t\t\tconst _shape = {\n\t\t\t\t...a._zod.def.shape,\n\t\t\t\t...b._zod.def.shape\n\t\t\t};\n\t\t\tassignProp(this, \"shape\", _shape);\n\t\t\treturn _shape;\n\t\t},\n\t\tget catchall() {\n\t\t\treturn b._zod.def.catchall;\n\t\t},\n\t\tchecks: []\n\t}));\n}\nfunction partial(Class, schema, mask) {\n\tconst checks = schema._zod.def.checks;\n\tif (checks && checks.length > 0) throw new Error(\".partial() cannot be used on object schemas containing refinements\");\n\treturn clone(schema, mergeDefs(schema._zod.def, {\n\t\tget shape() {\n\t\t\tconst oldShape = schema._zod.def.shape;\n\t\t\tconst shape = { ...oldShape };\n\t\t\tif (mask) for (const key in mask) {\n\t\t\t\tif (!(key in oldShape)) throw new Error(`Unrecognized key: \"${key}\"`);\n\t\t\t\tif (!mask[key]) continue;\n\t\t\t\tshape[key] = Class ? new Class({\n\t\t\t\t\ttype: \"optional\",\n\t\t\t\t\tinnerType: oldShape[key]\n\t\t\t\t}) : oldShape[key];\n\t\t\t}\n\t\t\telse for (const key in oldShape) shape[key] = Class ? new Class({\n\t\t\t\ttype: \"optional\",\n\t\t\t\tinnerType: oldShape[key]\n\t\t\t}) : oldShape[key];\n\t\t\tassignProp(this, \"shape\", shape);\n\t\t\treturn shape;\n\t\t},\n\t\tchecks: []\n\t}));\n}\nfunction required(Class, schema, mask) {\n\treturn clone(schema, mergeDefs(schema._zod.def, { get shape() {\n\t\tconst oldShape = schema._zod.def.shape;\n\t\tconst shape = { ...oldShape };\n\t\tif (mask) for (const key in mask) {\n\t\t\tif (!(key in shape)) throw new Error(`Unrecognized key: \"${key}\"`);\n\t\t\tif (!mask[key]) continue;\n\t\t\tshape[key] = new Class({\n\t\t\t\ttype: \"nonoptional\",\n\t\t\t\tinnerType: oldShape[key]\n\t\t\t});\n\t\t}\n\t\telse for (const key in oldShape) shape[key] = new Class({\n\t\t\ttype: \"nonoptional\",\n\t\t\tinnerType: oldShape[key]\n\t\t});\n\t\tassignProp(this, \"shape\", shape);\n\t\treturn shape;\n\t} }));\n}\nfunction aborted(x, startIndex = 0) {\n\tif (x.aborted === true) return true;\n\tfor (let i = startIndex; i < x.issues.length; i++) if (x.issues[i]?.continue !== true) return true;\n\treturn false;\n}\nfunction prefixIssues(path, issues) {\n\treturn issues.map((iss) => {\n\t\tvar _a;\n\t\t(_a = iss).path ?? (_a.path = []);\n\t\tiss.path.unshift(path);\n\t\treturn iss;\n\t});\n}\nfunction unwrapMessage(message) {\n\treturn typeof message === \"string\" ? message : message?.message;\n}\nfunction finalizeIssue(iss, ctx, config) {\n\tconst full = {\n\t\t...iss,\n\t\tpath: iss.path ?? []\n\t};\n\tif (!iss.message) full.message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config.customError?.(iss)) ?? unwrapMessage(config.localeError?.(iss)) ?? \"Invalid input\";\n\tdelete full.inst;\n\tdelete full.continue;\n\tif (!ctx?.reportInput) delete full.input;\n\treturn full;\n}\nfunction getLengthableOrigin(input) {\n\tif (Array.isArray(input)) return \"array\";\n\tif (typeof input === \"string\") return \"string\";\n\treturn \"unknown\";\n}\nfunction issue(...args) {\n\tconst [iss, input, inst] = args;\n\tif (typeof iss === \"string\") return {\n\t\tmessage: iss,\n\t\tcode: \"custom\",\n\t\tinput,\n\t\tinst\n\t};\n\treturn { ...iss };\n}\n//#endregion\n//#region ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/errors.js\nconst initializer$1 = (inst, def) => {\n\tinst.name = \"$ZodError\";\n\tObject.defineProperty(inst, \"_zod\", {\n\t\tvalue: inst._zod,\n\t\tenumerable: false\n\t});\n\tObject.defineProperty(inst, \"issues\", {\n\t\tvalue: def,\n\t\tenumerable: false\n\t});\n\tinst.message = JSON.stringify(def, jsonStringifyReplacer, 2);\n\tObject.defineProperty(inst, \"toString\", {\n\t\tvalue: () => inst.message,\n\t\tenumerable: false\n\t});\n};\nconst $ZodError = $constructor(\"$ZodError\", initializer$1);\nconst $ZodRealError = $constructor(\"$ZodError\", initializer$1, { Parent: Error });\nfunction flattenError(error, mapper = (issue) => issue.message) {\n\tconst fieldErrors = {};\n\tconst formErrors = [];\n\tfor (const sub of error.issues) if (sub.path.length > 0) {\n\t\tfieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];\n\t\tfieldErrors[sub.path[0]].push(mapper(sub));\n\t} else formErrors.push(mapper(sub));\n\treturn {\n\t\tformErrors,\n\t\tfieldErrors\n\t};\n}\nfunction formatError(error, mapper = (issue) => issue.message) {\n\tconst fieldErrors = { _errors: [] };\n\tconst processError = (error) => {\n\t\tfor (const issue of error.issues) if (issue.code === \"invalid_union\" && issue.errors.length) issue.errors.map((issues) => processError({ issues }));\n\t\telse if (issue.code === \"invalid_key\") processError({ issues: issue.issues });\n\t\telse if (issue.code === \"invalid_element\") processError({ issues: issue.issues });\n\t\telse if (issue.path.length === 0) fieldErrors._errors.push(mapper(issue));\n\t\telse {\n\t\t\tlet curr = fieldErrors;\n\t\t\tlet i = 0;\n\t\t\twhile (i < issue.path.length) {\n\t\t\t\tconst el = issue.path[i];\n\t\t\t\tif (!(i === issue.path.length - 1)) curr[el] = curr[el] || { _errors: [] };\n\t\t\t\telse {\n\t\t\t\t\tcurr[el] = curr[el] || { _errors: [] };\n\t\t\t\t\tcurr[el]._errors.push(mapper(issue));\n\t\t\t\t}\n\t\t\t\tcurr = curr[el];\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t};\n\tprocessError(error);\n\treturn fieldErrors;\n}\n//#endregion\n//#region ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/parse.js\nconst _parse = (_Err) => (schema, value, _ctx, _params) => {\n\tconst ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };\n\tconst result = schema._zod.run({\n\t\tvalue,\n\t\tissues: []\n\t}, ctx);\n\tif (result instanceof Promise) throw new $ZodAsyncError();\n\tif (result.issues.length) {\n\t\tconst e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));\n\t\tcaptureStackTrace(e, _params?.callee);\n\t\tthrow e;\n\t}\n\treturn result.value;\n};\nconst _parseAsync = (_Err) => async (schema, value, _ctx, params) => {\n\tconst ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };\n\tlet result = schema._zod.run({\n\t\tvalue,\n\t\tissues: []\n\t}, ctx);\n\tif (result instanceof Promise) result = await result;\n\tif (result.issues.length) {\n\t\tconst e = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));\n\t\tcaptureStackTrace(e, params?.callee);\n\t\tthrow e;\n\t}\n\treturn result.value;\n};\nconst _safeParse = (_Err) => (schema, value, _ctx) => {\n\tconst ctx = _ctx ? {\n\t\t..._ctx,\n\t\tasync: false\n\t} : { async: false };\n\tconst result = schema._zod.run({\n\t\tvalue,\n\t\tissues: []\n\t}, ctx);\n\tif (result instanceof Promise) throw new $ZodAsyncError();\n\treturn result.issues.length ? {\n\t\tsuccess: false,\n\t\terror: new (_Err ?? $ZodError)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())))\n\t} : {\n\t\tsuccess: true,\n\t\tdata: result.value\n\t};\n};\nconst safeParse$1 = /* @__PURE__ */ _safeParse($ZodRealError);\nconst _safeParseAsync = (_Err) => async (schema, value, _ctx) => {\n\tconst ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };\n\tlet result = schema._zod.run({\n\t\tvalue,\n\t\tissues: []\n\t}, ctx);\n\tif (result instanceof Promise) result = await result;\n\treturn result.issues.length ? {\n\t\tsuccess: false,\n\t\terror: new _Err(result.issues.map((iss) => finalizeIssue(iss, ctx, config())))\n\t} : {\n\t\tsuccess: true,\n\t\tdata: result.value\n\t};\n};\nconst safeParseAsync$1 = /* @__PURE__ */ _safeParseAsync($ZodRealError);\nconst _encode = (_Err) => (schema, value, _ctx) => {\n\tconst ctx = _ctx ? Object.assign(_ctx, { direction: \"backward\" }) : { direction: \"backward\" };\n\treturn _parse(_Err)(schema, value, ctx);\n};\nconst _decode = (_Err) => (schema, value, _ctx) => {\n\treturn _parse(_Err)(schema, value, _ctx);\n};\nconst _encodeAsync = (_Err) => async (schema, value, _ctx) => {\n\tconst ctx = _ctx ? Object.assign(_ctx, { direction: \"backward\" }) : { direction: \"backward\" };\n\treturn _parseAsync(_Err)(schema, value, ctx);\n};\nconst _decodeAsync = (_Err) => async (schema, value, _ctx) => {\n\treturn _parseAsync(_Err)(schema, value, _ctx);\n};\nconst _safeEncode = (_Err) => (schema, value, _ctx) => {\n\tconst ctx = _ctx ? Object.assign(_ctx, { direction: \"backward\" }) : { direction: \"backward\" };\n\treturn _safeParse(_Err)(schema, value, ctx);\n};\nconst _safeDecode = (_Err) => (schema, value, _ctx) => {\n\treturn _safeParse(_Err)(schema, value, _ctx);\n};\nconst _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {\n\tconst ctx = _ctx ? Object.assign(_ctx, { direction: \"backward\" }) : { direction: \"backward\" };\n\treturn _safeParseAsync(_Err)(schema, value, ctx);\n};\nconst _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {\n\treturn _safeParseAsync(_Err)(schema, value, _ctx);\n};\n//#endregion\n//#region ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/regexes.js\nconst cuid = /^[cC][^\\s-]{8,}$/;\nconst cuid2 = /^[0-9a-z]+$/;\nconst ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;\nconst xid = /^[0-9a-vA-V]{20}$/;\nconst ksuid = /^[A-Za-z0-9]{27}$/;\nconst 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. */\nconst duration$1 = /^P(?:(\\d+W)|(?!.*W)(?=\\d|T\\d)(\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+([.,]\\d+)?S)?)?)$/;\n/** A regex for any UUID-like identifier: 8-4-4-4-12 hex pattern */\nconst 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. */\nconst uuid = (version) => {\n\tif (!version) 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\treturn 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};\n/** Practical email validation */\nconst email = /^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$/;\nconst _emoji$1 = `^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$`;\nfunction emoji() {\n\treturn new RegExp(_emoji$1, \"u\");\n}\nconst 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])$/;\nconst 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}|:))$/;\nconst 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])$/;\nconst 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])$/;\nconst base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;\nconst base64url = /^[A-Za-z0-9_-]*$/;\nconst e164 = /^\\+[1-9]\\d{6,14}$/;\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])))`;\nconst date$1 = /* @__PURE__ */ new RegExp(`^${dateSource}$`);\nfunction timeSource(args) {\n\tconst hhmm = `(?:[01]\\\\d|2[0-3]):[0-5]\\\\d`;\n\treturn typeof args.precision === \"number\" ? args.precision === -1 ? `${hhmm}` : args.precision === 0 ? `${hhmm}:[0-5]\\\\d` : `${hhmm}:[0-5]\\\\d\\\\.\\\\d{${args.precision}}` : `${hhmm}(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?`;\n}\nfunction time$1(args) {\n\treturn new RegExp(`^${timeSource(args)}$`);\n}\nfunction datetime$1(args) {\n\tconst time = timeSource({ precision: args.precision });\n\tconst opts = [\"Z\"];\n\tif (args.local) opts.push(\"\");\n\tif (args.offset) opts.push(`([+-](?:[01]\\\\d|2[0-3]):[0-5]\\\\d)`);\n\tconst timeRegex = `${time}(?:${opts.join(\"|\")})`;\n\treturn new RegExp(`^${dateSource}T(?:${timeRegex})$`);\n}\nconst string$1 = (params) => {\n\tconst regex = params ? `[\\\\s\\\\S]{${params?.minimum ?? 0},${params?.maximum ?? \"\"}}` : `[\\\\s\\\\S]*`;\n\treturn new RegExp(`^${regex}$`);\n};\nconst integer = /^-?\\d+$/;\nconst number$1 = /^-?\\d+(?:\\.\\d+)?$/;\nconst boolean$1 = /^(?:true|false)$/i;\nconst lowercase = /^[^A-Z]*$/;\nconst uppercase = /^[^a-z]*$/;\n//#endregion\n//#region ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/checks.js\nconst $ZodCheck = /* @__PURE__ */ $constructor(\"$ZodCheck\", (inst, def) => {\n\tvar _a;\n\tinst._zod ?? (inst._zod = {});\n\tinst._zod.def = def;\n\t(_a = inst._zod).onattach ?? (_a.onattach = []);\n});\nconst numericOriginMap = {\n\tnumber: \"number\",\n\tbigint: \"bigint\",\n\tobject: \"date\"\n};\nconst $ZodCheckLessThan = /* @__PURE__ */ $constructor(\"$ZodCheckLessThan\", (inst, def) => {\n\t$ZodCheck.init(inst, def);\n\tconst origin = numericOriginMap[typeof def.value];\n\tinst._zod.onattach.push((inst) => {\n\t\tconst bag = inst._zod.bag;\n\t\tconst curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;\n\t\tif (def.value < curr) if (def.inclusive) bag.maximum = def.value;\n\t\telse bag.exclusiveMaximum = def.value;\n\t});\n\tinst._zod.check = (payload) => {\n\t\tif (def.inclusive ? payload.value <= def.value : payload.value < def.value) return;\n\t\tpayload.issues.push({\n\t\t\torigin,\n\t\t\tcode: \"too_big\",\n\t\t\tmaximum: typeof def.value === \"object\" ? def.value.getTime() : def.value,\n\t\t\tinput: payload.value,\n\t\t\tinclusive: def.inclusive,\n\t\t\tinst,\n\t\t\tcontinue: !def.abort\n\t\t});\n\t};\n});\nconst $ZodCheckGreaterThan = /* @__PURE__ */ $constructor(\"$ZodCheckGreaterThan\", (inst, def) => {\n\t$ZodCheck.init(inst, def);\n\tconst origin = numericOriginMap[typeof def.value];\n\tinst._zod.onattach.push((inst) => {\n\t\tconst bag = inst._zod.bag;\n\t\tconst curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;\n\t\tif (def.value > curr) if (def.inclusive) bag.minimum = def.value;\n\t\telse bag.exclusiveMinimum = def.value;\n\t});\n\tinst._zod.check = (payload) => {\n\t\tif (def.inclusive ? payload.value >= def.value : payload.value > def.value) return;\n\t\tpayload.issues.push({\n\t\t\torigin,\n\t\t\tcode: \"too_small\",\n\t\t\tminimum: typeof def.value === \"object\" ? def.value.getTime() : def.value,\n\t\t\tinput: payload.value,\n\t\t\tinclusive: def.inclusive,\n\t\t\tinst,\n\t\t\tcontinue: !def.abort\n\t\t});\n\t};\n});\nconst $ZodCheckMultipleOf = /* @__PURE__ */ $constructor(\"$ZodCheckMultipleOf\", (inst, def) => {\n\t$ZodCheck.init(inst, def);\n\tinst._zod.onattach.push((inst) => {\n\t\tvar _a;\n\t\t(_a = inst._zod.bag).multipleOf ?? (_a.multipleOf = def.value);\n\t});\n\tinst._zod.check = (payload) => {\n\t\tif (typeof payload.value !== typeof def.value) throw new Error(\"Cannot mix number and bigint in multiple_of check.\");\n\t\tif (typeof payload.value === \"bigint\" ? payload.value % def.value === BigInt(0) : floatSafeRemainder(payload.value, def.value) === 0) return;\n\t\tpayload.issues.push({\n\t\t\torigin: typeof payload.value,\n\t\t\tcode: \"not_multiple_of\",\n\t\t\tdivisor: def.value,\n\t\t\tinput: payload.value,\n\t\t\tinst,\n\t\t\tcontinue: !def.abort\n\t\t});\n\t};\n});\nconst $ZodCheckNumberFormat = /* @__PURE__ */ $constructor(\"$ZodCheckNumberFormat\", (inst, def) => {\n\t$ZodCheck.init(inst, def);\n\tdef.format = def.format || \"float64\";\n\tconst isInt = def.format?.includes(\"int\");\n\tconst origin = isInt ? \"int\" : \"number\";\n\tconst [minimum, maximum] = NUMBER_FORMAT_RANGES[def.format];\n\tinst._zod.onattach.push((inst) => {\n\t\tconst bag = inst._zod.bag;\n\t\tbag.format = def.format;\n\t\tbag.minimum = minimum;\n\t\tbag.maximum = maximum;\n\t\tif (isInt) bag.pattern = integer;\n\t});\n\tinst._zod.check = (payload) => {\n\t\tconst input = payload.value;\n\t\tif (isInt) {\n\t\t\tif (!Number.isInteger(input)) {\n\t\t\t\tpayload.issues.push({\n\t\t\t\t\texpected: origin,\n\t\t\t\t\tformat: def.format,\n\t\t\t\t\tcode: \"invalid_type\",\n\t\t\t\t\tcontinue: false,\n\t\t\t\t\tinput,\n\t\t\t\t\tinst\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!Number.isSafeInteger(input)) {\n\t\t\t\tif (input > 0) payload.issues.push({\n\t\t\t\t\tinput,\n\t\t\t\t\tcode: \"too_big\",\n\t\t\t\t\tmaximum: Number.MAX_SAFE_INTEGER,\n\t\t\t\t\tnote: \"Integers must be within the safe integer range.\",\n\t\t\t\t\tinst,\n\t\t\t\t\torigin,\n\t\t\t\t\tinclusive: true,\n\t\t\t\t\tcontinue: !def.abort\n\t\t\t\t});\n\t\t\t\telse payload.issues.push({\n\t\t\t\t\tinput,\n\t\t\t\t\tcode: \"too_small\",\n\t\t\t\t\tminimum: Number.MIN_SAFE_INTEGER,\n\t\t\t\t\tnote: \"Integers must be within the safe integer range.\",\n\t\t\t\t\tinst,\n\t\t\t\t\torigin,\n\t\t\t\t\tinclusive: true,\n\t\t\t\t\tcontinue: !def.abort\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif (input < minimum) payload.issues.push({\n\t\t\torigin: \"number\",\n\t\t\tinput,\n\t\t\tcode: \"too_small\",\n\t\t\tminimum,\n\t\t\tinclusive: true,\n\t\t\tinst,\n\t\t\tcontinue: !def.abort\n\t\t});\n\t\tif (input > maximum) payload.issues.push({\n\t\t\torigin: \"number\",\n\t\t\tinput,\n\t\t\tcode: \"too_big\",\n\t\t\tmaximum,\n\t\t\tinclusive: true,\n\t\t\tinst,\n\t\t\tcontinue: !def.abort\n\t\t});\n\t};\n});\nconst $ZodCheckMaxLength = /* @__PURE__ */ $constructor(\"$ZodCheckMaxLength\", (inst, def) => {\n\tvar _a;\n\t$ZodCheck.init(inst, def);\n\t(_a = inst._zod.def).when ?? (_a.when = (payload) => {\n\t\tconst val = payload.value;\n\t\treturn !nullish(val) && val.length !== void 0;\n\t});\n\tinst._zod.onattach.push((inst) => {\n\t\tconst curr = inst._zod.bag.maximum ?? Number.POSITIVE_INFINITY;\n\t\tif (def.maximum < curr) inst._zod.bag.maximum = def.maximum;\n\t});\n\tinst._zod.check = (payload) => {\n\t\tconst input = payload.value;\n\t\tif (input.length <= def.maximum) return;\n\t\tconst origin = getLengthableOrigin(input);\n\t\tpayload.issues.push({\n\t\t\torigin,\n\t\t\tcode: \"too_big\",\n\t\t\tmaximum: def.maximum,\n\t\t\tinclusive: true,\n\t\t\tinput,\n\t\t\tinst,\n\t\t\tcontinue: !def.abort\n\t\t});\n\t};\n});\nconst $ZodCheckMinLength = /* @__PURE__ */ $constructor(\"$ZodCheckMinLength\", (inst, def) => {\n\tvar _a;\n\t$ZodCheck.init(inst, def);\n\t(_a = inst._zod.def).when ?? (_a.when = (payload) => {\n\t\tconst val = payload.value;\n\t\treturn !nullish(val) && val.length !== void 0;\n\t});\n\tinst._zod.onattach.push((inst) => {\n\t\tconst curr = inst._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;\n\t\tif (def.minimum > curr) inst._zod.bag.minimum = def.minimum;\n\t});\n\tinst._zod.check = (payload) => {\n\t\tconst input = payload.value;\n\t\tif (input.length >= def.minimum) return;\n\t\tconst origin = getLengthableOrigin(input);\n\t\tpayload.issues.push({\n\t\t\torigin,\n\t\t\tcode: \"too_small\",\n\t\t\tminimum: def.minimum,\n\t\t\tinclusive: true,\n\t\t\tinput,\n\t\t\tinst,\n\t\t\tcontinue: !def.abort\n\t\t});\n\t};\n});\nconst $ZodCheckLengthEquals = /* @__PURE__ */ $constructor(\"$ZodCheckLengthEquals\", (inst, def) => {\n\tvar _a;\n\t$ZodCheck.init(inst, def);\n\t(_a = inst._zod.def).when ?? (_a.when = (payload) => {\n\t\tconst val = payload.value;\n\t\treturn !nullish(val) && val.length !== void 0;\n\t});\n\tinst._zod.onattach.push((inst) => {\n\t\tconst bag = inst._zod.bag;\n\t\tbag.minimum = def.length;\n\t\tbag.maximum = def.length;\n\t\tbag.length = def.length;\n\t});\n\tinst._zod.check = (payload) => {\n\t\tconst input = payload.value;\n\t\tconst length = input.length;\n\t\tif (length === def.length) return;\n\t\tconst origin = getLengthableOrigin(input);\n\t\tconst tooBig = length > def.length;\n\t\tpayload.issues.push({\n\t\t\torigin,\n\t\t\t...tooBig ? {\n\t\t\t\tcode: \"too_big\",\n\t\t\t\tmaximum: def.length\n\t\t\t} : {\n\t\t\t\tcode: \"too_small\",\n\t\t\t\tminimum: def.length\n\t\t\t},\n\t\t\tinclusive: true,\n\t\t\texact: true,\n\t\t\tinput: payload.value,\n\t\t\tinst,\n\t\t\tcontinue: !def.abort\n\t\t});\n\t};\n});\nconst $ZodCheckStringFormat = /* @__PURE__ */ $constructor(\"$ZodCheckStringFormat\", (inst, def) => {\n\tvar _a, _b;\n\t$ZodCheck.init(inst, def);\n\tinst._zod.onattach.push((inst) => {\n\t\tconst bag = inst._zod.bag;\n\t\tbag.format = def.format;\n\t\tif (def.pattern) {\n\t\t\tbag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());\n\t\t\tbag.patterns.add(def.pattern);\n\t\t}\n\t});\n\tif (def.pattern) (_a = inst._zod).check ?? (_a.check = (payload) => {\n\t\tdef.pattern.lastIndex = 0;\n\t\tif (def.pattern.test(payload.value)) return;\n\t\tpayload.issues.push({\n\t\t\torigin: \"string\",\n\t\t\tcode: \"invalid_format\",\n\t\t\tformat: def.format,\n\t\t\tinput: payload.value,\n\t\t\t...def.pattern ? { pattern: def.pattern.toString() } : {},\n\t\t\tinst,\n\t\t\tcontinue: !def.abort\n\t\t});\n\t});\n\telse (_b = inst._zod).check ?? (_b.check = () => {});\n});\nconst $ZodCheckRegex = /* @__PURE__ */ $constructor(\"$ZodCheckRegex\", (inst, def) => {\n\t$ZodCheckStringFormat.init(inst, def);\n\tinst._zod.check = (payload) => {\n\t\tdef.pattern.lastIndex = 0;\n\t\tif (def.pattern.test(payload.value)) return;\n\t\tpayload.issues.push({\n\t\t\torigin: \"string\",\n\t\t\tcode: \"invalid_format\",\n\t\t\tformat: \"regex\",\n\t\t\tinput: payload.value,\n\t\t\tpattern: def.pattern.toString(),\n\t\t\tinst,\n\t\t\tcontinue: !def.abort\n\t\t});\n\t};\n});\nconst $ZodCheckLowerCase = /* @__PURE__ */ $constructor(\"$ZodCheckLowerCase\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = lowercase);\n\t$ZodCheckStringFormat.init(inst, def);\n});\nconst $ZodCheckUpperCase = /* @__PURE__ */ $constructor(\"$ZodCheckUpperCase\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = uppercase);\n\t$ZodCheckStringFormat.init(inst, def);\n});\nconst $ZodCheckIncludes = /* @__PURE__ */ $constructor(\"$ZodCheckIncludes\", (inst, def) => {\n\t$ZodCheck.init(inst, def);\n\tconst escapedRegex = escapeRegex(def.includes);\n\tconst pattern = new RegExp(typeof def.position === \"number\" ? `^.{${def.position}}${escapedRegex}` : escapedRegex);\n\tdef.pattern = pattern;\n\tinst._zod.onattach.push((inst) => {\n\t\tconst bag = inst._zod.bag;\n\t\tbag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());\n\t\tbag.patterns.add(pattern);\n\t});\n\tinst._zod.check = (payload) => {\n\t\tif (payload.value.includes(def.includes, def.position)) return;\n\t\tpayload.issues.push({\n\t\t\torigin: \"string\",\n\t\t\tcode: \"invalid_format\",\n\t\t\tformat: \"includes\",\n\t\t\tincludes: def.includes,\n\t\t\tinput: payload.value,\n\t\t\tinst,\n\t\t\tcontinue: !def.abort\n\t\t});\n\t};\n});\nconst $ZodCheckStartsWith = /* @__PURE__ */ $constructor(\"$ZodCheckStartsWith\", (inst, def) => {\n\t$ZodCheck.init(inst, def);\n\tconst pattern = new RegExp(`^${escapeRegex(def.prefix)}.*`);\n\tdef.pattern ?? (def.pattern = pattern);\n\tinst._zod.onattach.push((inst) => {\n\t\tconst bag = inst._zod.bag;\n\t\tbag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());\n\t\tbag.patterns.add(pattern);\n\t});\n\tinst._zod.check = (payload) => {\n\t\tif (payload.value.startsWith(def.prefix)) return;\n\t\tpayload.issues.push({\n\t\t\torigin: \"string\",\n\t\t\tcode: \"invalid_format\",\n\t\t\tformat: \"starts_with\",\n\t\t\tprefix: def.prefix,\n\t\t\tinput: payload.value,\n\t\t\tinst,\n\t\t\tcontinue: !def.abort\n\t\t});\n\t};\n});\nconst $ZodCheckEndsWith = /* @__PURE__ */ $constructor(\"$ZodCheckEndsWith\", (inst, def) => {\n\t$ZodCheck.init(inst, def);\n\tconst pattern = new RegExp(`.*${escapeRegex(def.suffix)}$`);\n\tdef.pattern ?? (def.pattern = pattern);\n\tinst._zod.onattach.push((inst) => {\n\t\tconst bag = inst._zod.bag;\n\t\tbag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());\n\t\tbag.patterns.add(pattern);\n\t});\n\tinst._zod.check = (payload) => {\n\t\tif (payload.value.endsWith(def.suffix)) return;\n\t\tpayload.issues.push({\n\t\t\torigin: \"string\",\n\t\t\tcode: \"invalid_format\",\n\t\t\tformat: \"ends_with\",\n\t\t\tsuffix: def.suffix,\n\t\t\tinput: payload.value,\n\t\t\tinst,\n\t\t\tcontinue: !def.abort\n\t\t});\n\t};\n});\nconst $ZodCheckOverwrite = /* @__PURE__ */ $constructor(\"$ZodCheckOverwrite\", (inst, def) => {\n\t$ZodCheck.init(inst, def);\n\tinst._zod.check = (payload) => {\n\t\tpayload.value = def.tx(payload.value);\n\t};\n});\n//#endregion\n//#region ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/doc.js\nvar Doc = class {\n\tconstructor(args = []) {\n\t\tthis.content = [];\n\t\tthis.indent = 0;\n\t\tif (this) this.args = args;\n\t}\n\tindented(fn) {\n\t\tthis.indent += 1;\n\t\tfn(this);\n\t\tthis.indent -= 1;\n\t}\n\twrite(arg) {\n\t\tif (typeof arg === \"function\") {\n\t\t\targ(this, { execution: \"sync\" });\n\t\t\targ(this, { execution: \"async\" });\n\t\t\treturn;\n\t\t}\n\t\tconst lines = arg.split(\"\\n\").filter((x) => x);\n\t\tconst minIndent = Math.min(...lines.map((x) => x.length - x.trimStart().length));\n\t\tconst dedented = lines.map((x) => x.slice(minIndent)).map((x) => \" \".repeat(this.indent * 2) + x);\n\t\tfor (const line of dedented) this.content.push(line);\n\t}\n\tcompile() {\n\t\tconst F = Function;\n\t\tconst args = this?.args;\n\t\tconst lines = [...(this?.content ?? [``]).map((x) => ` ${x}`)];\n\t\treturn new F(...args, lines.join(\"\\n\"));\n\t}\n};\n//#endregion\n//#region ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/versions.js\nconst version = {\n\tmajor: 4,\n\tminor: 3,\n\tpatch: 6\n};\n//#endregion\n//#region ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/schemas.js\nconst $ZodType = /* @__PURE__ */ $constructor(\"$ZodType\", (inst, def) => {\n\tvar _a;\n\tinst ?? (inst = {});\n\tinst._zod.def = def;\n\tinst._zod.bag = inst._zod.bag || {};\n\tinst._zod.version = version;\n\tconst checks = [...inst._zod.def.checks ?? []];\n\tif (inst._zod.traits.has(\"$ZodCheck\")) checks.unshift(inst);\n\tfor (const ch of checks) for (const fn of ch._zod.onattach) fn(inst);\n\tif (checks.length === 0) {\n\t\t(_a = inst._zod).deferred ?? (_a.deferred = []);\n\t\tinst._zod.deferred?.push(() => {\n\t\t\tinst._zod.run = inst._zod.parse;\n\t\t});\n\t} else {\n\t\tconst runChecks = (payload, checks, ctx) => {\n\t\t\tlet isAborted = aborted(payload);\n\t\t\tlet asyncResult;\n\t\t\tfor (const ch of checks) {\n\t\t\t\tif (ch._zod.def.when) {\n\t\t\t\t\tif (!ch._zod.def.when(payload)) continue;\n\t\t\t\t} else if (isAborted) continue;\n\t\t\t\tconst currLen = payload.issues.length;\n\t\t\t\tconst _ = ch._zod.check(payload);\n\t\t\t\tif (_ instanceof Promise && ctx?.async === false) throw new $ZodAsyncError();\n\t\t\t\tif (asyncResult || _ instanceof Promise) asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {\n\t\t\t\t\tawait _;\n\t\t\t\t\tif (payload.issues.length === currLen) return;\n\t\t\t\t\tif (!isAborted) isAborted = aborted(payload, currLen);\n\t\t\t\t});\n\t\t\t\telse {\n\t\t\t\t\tif (payload.issues.length === currLen) continue;\n\t\t\t\t\tif (!isAborted) isAborted = aborted(payload, currLen);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (asyncResult) return asyncResult.then(() => {\n\t\t\t\treturn payload;\n\t\t\t});\n\t\t\treturn payload;\n\t\t};\n\t\tconst handleCanaryResult = (canary, payload, ctx) => {\n\t\t\tif (aborted(canary)) {\n\t\t\t\tcanary.aborted = true;\n\t\t\t\treturn canary;\n\t\t\t}\n\t\t\tconst checkResult = runChecks(payload, checks, ctx);\n\t\t\tif (checkResult instanceof Promise) {\n\t\t\t\tif (ctx.async === false) throw new $ZodAsyncError();\n\t\t\t\treturn checkResult.then((checkResult) => inst._zod.parse(checkResult, ctx));\n\t\t\t}\n\t\t\treturn inst._zod.parse(checkResult, ctx);\n\t\t};\n\t\tinst._zod.run = (payload, ctx) => {\n\t\t\tif (ctx.skipChecks) return inst._zod.parse(payload, ctx);\n\t\t\tif (ctx.direction === \"backward\") {\n\t\t\t\tconst canary = inst._zod.parse({\n\t\t\t\t\tvalue: payload.value,\n\t\t\t\t\tissues: []\n\t\t\t\t}, {\n\t\t\t\t\t...ctx,\n\t\t\t\t\tskipChecks: true\n\t\t\t\t});\n\t\t\t\tif (canary instanceof Promise) return canary.then((canary) => {\n\t\t\t\t\treturn handleCanaryResult(canary, payload, ctx);\n\t\t\t\t});\n\t\t\t\treturn handleCanaryResult(canary, payload, ctx);\n\t\t\t}\n\t\t\tconst result = inst._zod.parse(payload, ctx);\n\t\t\tif (result instanceof Promise) {\n\t\t\t\tif (ctx.async === false) throw new $ZodAsyncError();\n\t\t\t\treturn result.then((result) => runChecks(result, checks, ctx));\n\t\t\t}\n\t\t\treturn runChecks(result, checks, ctx);\n\t\t};\n\t}\n\tdefineLazy(inst, \"~standard\", () => ({\n\t\tvalidate: (value) => {\n\t\t\ttry {\n\t\t\t\tconst r = safeParse$1(inst, value);\n\t\t\t\treturn r.success ? { value: r.data } : { issues: r.error?.issues };\n\t\t\t} catch (_) {\n\t\t\t\treturn safeParseAsync$1(inst, value).then((r) => r.success ? { value: r.data } : { issues: r.error?.issues });\n\t\t\t}\n\t\t},\n\t\tvendor: \"zod\",\n\t\tversion: 1\n\t}));\n});\nconst $ZodString = /* @__PURE__ */ $constructor(\"$ZodString\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tinst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string$1(inst._zod.bag);\n\tinst._zod.parse = (payload, _) => {\n\t\tif (def.coerce) try {\n\t\t\tpayload.value = String(payload.value);\n\t\t} catch (_) {}\n\t\tif (typeof payload.value === \"string\") return payload;\n\t\tpayload.issues.push({\n\t\t\texpected: \"string\",\n\t\t\tcode: \"invalid_type\",\n\t\t\tinput: payload.value,\n\t\t\tinst\n\t\t});\n\t\treturn payload;\n\t};\n});\nconst $ZodStringFormat = /* @__PURE__ */ $constructor(\"$ZodStringFormat\", (inst, def) => {\n\t$ZodCheckStringFormat.init(inst, def);\n\t$ZodString.init(inst, def);\n});\nconst $ZodGUID = /* @__PURE__ */ $constructor(\"$ZodGUID\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = guid);\n\t$ZodStringFormat.init(inst, def);\n});\nconst $ZodUUID = /* @__PURE__ */ $constructor(\"$ZodUUID\", (inst, def) => {\n\tif (def.version) {\n\t\tconst v = {\n\t\t\tv1: 1,\n\t\t\tv2: 2,\n\t\t\tv3: 3,\n\t\t\tv4: 4,\n\t\t\tv5: 5,\n\t\t\tv6: 6,\n\t\t\tv7: 7,\n\t\t\tv8: 8\n\t\t}[def.version];\n\t\tif (v === void 0) throw new Error(`Invalid UUID version: \"${def.version}\"`);\n\t\tdef.pattern ?? (def.pattern = uuid(v));\n\t} else def.pattern ?? (def.pattern = uuid());\n\t$ZodStringFormat.init(inst, def);\n});\nconst $ZodEmail = /* @__PURE__ */ $constructor(\"$ZodEmail\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = email);\n\t$ZodStringFormat.init(inst, def);\n});\nconst $ZodURL = /* @__PURE__ */ $constructor(\"$ZodURL\", (inst, def) => {\n\t$ZodStringFormat.init(inst, def);\n\tinst._zod.check = (payload) => {\n\t\ttry {\n\t\t\tconst trimmed = payload.value.trim();\n\t\t\tconst url = new URL(trimmed);\n\t\t\tif (def.hostname) {\n\t\t\t\tdef.hostname.lastIndex = 0;\n\t\t\t\tif (!def.hostname.test(url.hostname)) payload.issues.push({\n\t\t\t\t\tcode: \"invalid_format\",\n\t\t\t\t\tformat: \"url\",\n\t\t\t\t\tnote: \"Invalid hostname\",\n\t\t\t\t\tpattern: def.hostname.source,\n\t\t\t\t\tinput: payload.value,\n\t\t\t\t\tinst,\n\t\t\t\t\tcontinue: !def.abort\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (def.protocol) {\n\t\t\t\tdef.protocol.lastIndex = 0;\n\t\t\t\tif (!def.protocol.test(url.protocol.endsWith(\":\") ? url.protocol.slice(0, -1) : url.protocol)) payload.issues.push({\n\t\t\t\t\tcode: \"invalid_format\",\n\t\t\t\t\tformat: \"url\",\n\t\t\t\t\tnote: \"Invalid protocol\",\n\t\t\t\t\tpattern: def.protocol.source,\n\t\t\t\t\tinput: payload.value,\n\t\t\t\t\tinst,\n\t\t\t\t\tcontinue: !def.abort\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (def.normalize) payload.value = url.href;\n\t\t\telse payload.value = trimmed;\n\t\t\treturn;\n\t\t} catch (_) {\n\t\t\tpayload.issues.push({\n\t\t\t\tcode: \"invalid_format\",\n\t\t\t\tformat: \"url\",\n\t\t\t\tinput: payload.value,\n\t\t\t\tinst,\n\t\t\t\tcontinue: !def.abort\n\t\t\t});\n\t\t}\n\t};\n});\nconst $ZodEmoji = /* @__PURE__ */ $constructor(\"$ZodEmoji\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = emoji());\n\t$ZodStringFormat.init(inst, def);\n});\nconst $ZodNanoID = /* @__PURE__ */ $constructor(\"$ZodNanoID\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = nanoid);\n\t$ZodStringFormat.init(inst, def);\n});\nconst $ZodCUID = /* @__PURE__ */ $constructor(\"$ZodCUID\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = cuid);\n\t$ZodStringFormat.init(inst, def);\n});\nconst $ZodCUID2 = /* @__PURE__ */ $constructor(\"$ZodCUID2\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = cuid2);\n\t$ZodStringFormat.init(inst, def);\n});\nconst $ZodULID = /* @__PURE__ */ $constructor(\"$ZodULID\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = ulid);\n\t$ZodStringFormat.init(inst, def);\n});\nconst $ZodXID = /* @__PURE__ */ $constructor(\"$ZodXID\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = xid);\n\t$ZodStringFormat.init(inst, def);\n});\nconst $ZodKSUID = /* @__PURE__ */ $constructor(\"$ZodKSUID\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = ksuid);\n\t$ZodStringFormat.init(inst, def);\n});\nconst $ZodISODateTime = /* @__PURE__ */ $constructor(\"$ZodISODateTime\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = datetime$1(def));\n\t$ZodStringFormat.init(inst, def);\n});\nconst $ZodISODate = /* @__PURE__ */ $constructor(\"$ZodISODate\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = date$1);\n\t$ZodStringFormat.init(inst, def);\n});\nconst $ZodISOTime = /* @__PURE__ */ $constructor(\"$ZodISOTime\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = time$1(def));\n\t$ZodStringFormat.init(inst, def);\n});\nconst $ZodISODuration = /* @__PURE__ */ $constructor(\"$ZodISODuration\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = duration$1);\n\t$ZodStringFormat.init(inst, def);\n});\nconst $ZodIPv4 = /* @__PURE__ */ $constructor(\"$ZodIPv4\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = ipv4);\n\t$ZodStringFormat.init(inst, def);\n\tinst._zod.bag.format = `ipv4`;\n});\nconst $ZodIPv6 = /* @__PURE__ */ $constructor(\"$ZodIPv6\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = ipv6);\n\t$ZodStringFormat.init(inst, def);\n\tinst._zod.bag.format = `ipv6`;\n\tinst._zod.check = (payload) => {\n\t\ttry {\n\t\t\tnew URL(`http://[${payload.value}]`);\n\t\t} catch {\n\t\t\tpayload.issues.push({\n\t\t\t\tcode: \"invalid_format\",\n\t\t\t\tformat: \"ipv6\",\n\t\t\t\tinput: payload.value,\n\t\t\t\tinst,\n\t\t\t\tcontinue: !def.abort\n\t\t\t});\n\t\t}\n\t};\n});\nconst $ZodCIDRv4 = /* @__PURE__ */ $constructor(\"$ZodCIDRv4\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = cidrv4);\n\t$ZodStringFormat.init(inst, def);\n});\nconst $ZodCIDRv6 = /* @__PURE__ */ $constructor(\"$ZodCIDRv6\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = cidrv6);\n\t$ZodStringFormat.init(inst, def);\n\tinst._zod.check = (payload) => {\n\t\tconst parts = payload.value.split(\"/\");\n\t\ttry {\n\t\t\tif (parts.length !== 2) throw new Error();\n\t\t\tconst [address, prefix] = parts;\n\t\t\tif (!prefix) throw new Error();\n\t\t\tconst prefixNum = Number(prefix);\n\t\t\tif (`${prefixNum}` !== prefix) throw new Error();\n\t\t\tif (prefixNum < 0 || prefixNum > 128) throw new Error();\n\t\t\tnew URL(`http://[${address}]`);\n\t\t} catch {\n\t\t\tpayload.issues.push({\n\t\t\t\tcode: \"invalid_format\",\n\t\t\t\tformat: \"cidrv6\",\n\t\t\t\tinput: payload.value,\n\t\t\t\tinst,\n\t\t\t\tcontinue: !def.abort\n\t\t\t});\n\t\t}\n\t};\n});\nfunction isValidBase64(data) {\n\tif (data === \"\") return true;\n\tif (data.length % 4 !== 0) return false;\n\ttry {\n\t\tatob(data);\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\nconst $ZodBase64 = /* @__PURE__ */ $constructor(\"$ZodBase64\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = base64);\n\t$ZodStringFormat.init(inst, def);\n\tinst._zod.bag.contentEncoding = \"base64\";\n\tinst._zod.check = (payload) => {\n\t\tif (isValidBase64(payload.value)) return;\n\t\tpayload.issues.push({\n\t\t\tcode: \"invalid_format\",\n\t\t\tformat: \"base64\",\n\t\t\tinput: payload.value,\n\t\t\tinst,\n\t\t\tcontinue: !def.abort\n\t\t});\n\t};\n});\nfunction isValidBase64URL(data) {\n\tif (!base64url.test(data)) return false;\n\tconst base64 = data.replace(/[-_]/g, (c) => c === \"-\" ? \"+\" : \"/\");\n\treturn isValidBase64(base64.padEnd(Math.ceil(base64.length / 4) * 4, \"=\"));\n}\nconst $ZodBase64URL = /* @__PURE__ */ $constructor(\"$ZodBase64URL\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = base64url);\n\t$ZodStringFormat.init(inst, def);\n\tinst._zod.bag.contentEncoding = \"base64url\";\n\tinst._zod.check = (payload) => {\n\t\tif (isValidBase64URL(payload.value)) return;\n\t\tpayload.issues.push({\n\t\t\tcode: \"invalid_format\",\n\t\t\tformat: \"base64url\",\n\t\t\tinput: payload.value,\n\t\t\tinst,\n\t\t\tcontinue: !def.abort\n\t\t});\n\t};\n});\nconst $ZodE164 = /* @__PURE__ */ $constructor(\"$ZodE164\", (inst, def) => {\n\tdef.pattern ?? (def.pattern = e164);\n\t$ZodStringFormat.init(inst, def);\n});\nfunction isValidJWT(token, algorithm = null) {\n\ttry {\n\t\tconst tokensParts = token.split(\".\");\n\t\tif (tokensParts.length !== 3) return false;\n\t\tconst [header] = tokensParts;\n\t\tif (!header) return false;\n\t\tconst parsedHeader = JSON.parse(atob(header));\n\t\tif (\"typ\" in parsedHeader && parsedHeader?.typ !== \"JWT\") return false;\n\t\tif (!parsedHeader.alg) return false;\n\t\tif (algorithm && (!(\"alg\" in parsedHeader) || parsedHeader.alg !== algorithm)) return false;\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\nconst $ZodJWT = /* @__PURE__ */ $constructor(\"$ZodJWT\", (inst, def) => {\n\t$ZodStringFormat.init(inst, def);\n\tinst._zod.check = (payload) => {\n\t\tif (isValidJWT(payload.value, def.alg)) return;\n\t\tpayload.issues.push({\n\t\t\tcode: \"invalid_format\",\n\t\t\tformat: \"jwt\",\n\t\t\tinput: payload.value,\n\t\t\tinst,\n\t\t\tcontinue: !def.abort\n\t\t});\n\t};\n});\nconst $ZodNumber = /* @__PURE__ */ $constructor(\"$ZodNumber\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tinst._zod.pattern = inst._zod.bag.pattern ?? number$1;\n\tinst._zod.parse = (payload, _ctx) => {\n\t\tif (def.coerce) try {\n\t\t\tpayload.value = Number(payload.value);\n\t\t} catch (_) {}\n\t\tconst input = payload.value;\n\t\tif (typeof input === \"number\" && !Number.isNaN(input) && Number.isFinite(input)) return payload;\n\t\tconst received = typeof input === \"number\" ? Number.isNaN(input) ? \"NaN\" : !Number.isFinite(input) ? \"Infinity\" : void 0 : void 0;\n\t\tpayload.issues.push({\n\t\t\texpected: \"number\",\n\t\t\tcode: \"invalid_type\",\n\t\t\tinput,\n\t\t\tinst,\n\t\t\t...received ? { received } : {}\n\t\t});\n\t\treturn payload;\n\t};\n});\nconst $ZodNumberFormat = /* @__PURE__ */ $constructor(\"$ZodNumberFormat\", (inst, def) => {\n\t$ZodCheckNumberFormat.init(inst, def);\n\t$ZodNumber.init(inst, def);\n});\nconst $ZodBoolean = /* @__PURE__ */ $constructor(\"$ZodBoolean\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tinst._zod.pattern = boolean$1;\n\tinst._zod.parse = (payload, _ctx) => {\n\t\tif (def.coerce) try {\n\t\t\tpayload.value = Boolean(payload.value);\n\t\t} catch (_) {}\n\t\tconst input = payload.value;\n\t\tif (typeof input === \"boolean\") return payload;\n\t\tpayload.issues.push({\n\t\t\texpected: \"boolean\",\n\t\t\tcode: \"invalid_type\",\n\t\t\tinput,\n\t\t\tinst\n\t\t});\n\t\treturn payload;\n\t};\n});\nconst $ZodUnknown = /* @__PURE__ */ $constructor(\"$ZodUnknown\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tinst._zod.parse = (payload) => payload;\n});\nconst $ZodNever = /* @__PURE__ */ $constructor(\"$ZodNever\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tinst._zod.parse = (payload, _ctx) => {\n\t\tpayload.issues.push({\n\t\t\texpected: \"never\",\n\t\t\tcode: \"invalid_type\",\n\t\t\tinput: payload.value,\n\t\t\tinst\n\t\t});\n\t\treturn payload;\n\t};\n});\nfunction handleArrayResult(result, final, index) {\n\tif (result.issues.length) final.issues.push(...prefixIssues(index, result.issues));\n\tfinal.value[index] = result.value;\n}\nconst $ZodArray = /* @__PURE__ */ $constructor(\"$ZodArray\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tinst._zod.parse = (payload, ctx) => {\n\t\tconst input = payload.value;\n\t\tif (!Array.isArray(input)) {\n\t\t\tpayload.issues.push({\n\t\t\t\texpected: \"array\",\n\t\t\t\tcode: \"invalid_type\",\n\t\t\t\tinput,\n\t\t\t\tinst\n\t\t\t});\n\t\t\treturn payload;\n\t\t}\n\t\tpayload.value = Array(input.length);\n\t\tconst proms = [];\n\t\tfor (let i = 0; i < input.length; i++) {\n\t\t\tconst item = input[i];\n\t\t\tconst result = def.element._zod.run({\n\t\t\t\tvalue: item,\n\t\t\t\tissues: []\n\t\t\t}, ctx);\n\t\t\tif (result instanceof Promise) proms.push(result.then((result) => handleArrayResult(result, payload, i)));\n\t\t\telse handleArrayResult(result, payload, i);\n\t\t}\n\t\tif (proms.length) return Promise.all(proms).then(() => payload);\n\t\treturn payload;\n\t};\n});\nfunction handlePropertyResult(result, final, key, input, isOptionalOut) {\n\tif (result.issues.length) {\n\t\tif (isOptionalOut && !(key in input)) return;\n\t\tfinal.issues.push(...prefixIssues(key, result.issues));\n\t}\n\tif (result.value === void 0) {\n\t\tif (key in input) final.value[key] = void 0;\n\t} else final.value[key] = result.value;\n}\nfunction normalizeDef(def) {\n\tconst keys = Object.keys(def.shape);\n\tfor (const k of keys) if (!def.shape?.[k]?._zod?.traits?.has(\"$ZodType\")) throw new Error(`Invalid element at key \"${k}\": expected a Zod schema`);\n\tconst okeys = optionalKeys(def.shape);\n\treturn {\n\t\t...def,\n\t\tkeys,\n\t\tkeySet: new Set(keys),\n\t\tnumKeys: keys.length,\n\t\toptionalKeys: new Set(okeys)\n\t};\n}\nfunction handleCatchall(proms, input, payload, ctx, def, inst) {\n\tconst unrecognized = [];\n\tconst keySet = def.keySet;\n\tconst _catchall = def.catchall._zod;\n\tconst t = _catchall.def.type;\n\tconst isOptionalOut = _catchall.optout === \"optional\";\n\tfor (const key in input) {\n\t\tif (keySet.has(key)) continue;\n\t\tif (t === \"never\") {\n\t\t\tunrecognized.push(key);\n\t\t\tcontinue;\n\t\t}\n\t\tconst r = _catchall.run({\n\t\t\tvalue: input[key],\n\t\t\tissues: []\n\t\t}, ctx);\n\t\tif (r instanceof Promise) proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, isOptionalOut)));\n\t\telse handlePropertyResult(r, payload, key, input, isOptionalOut);\n\t}\n\tif (unrecognized.length) payload.issues.push({\n\t\tcode: \"unrecognized_keys\",\n\t\tkeys: unrecognized,\n\t\tinput,\n\t\tinst\n\t});\n\tif (!proms.length) return payload;\n\treturn Promise.all(proms).then(() => {\n\t\treturn payload;\n\t});\n}\nconst $ZodObject = /* @__PURE__ */ $constructor(\"$ZodObject\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tif (!Object.getOwnPropertyDescriptor(def, \"shape\")?.get) {\n\t\tconst sh = def.shape;\n\t\tObject.defineProperty(def, \"shape\", { get: () => {\n\t\t\tconst newSh = { ...sh };\n\t\t\tObject.defineProperty(def, \"shape\", { value: newSh });\n\t\t\treturn newSh;\n\t\t} });\n\t}\n\tconst _normalized = cached(() => normalizeDef(def));\n\tdefineLazy(inst._zod, \"propValues\", () => {\n\t\tconst shape = def.shape;\n\t\tconst propValues = {};\n\t\tfor (const key in shape) {\n\t\t\tconst field = shape[key]._zod;\n\t\t\tif (field.values) {\n\t\t\t\tpropValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set());\n\t\t\t\tfor (const v of field.values) propValues[key].add(v);\n\t\t\t}\n\t\t}\n\t\treturn propValues;\n\t});\n\tconst isObject$2 = isObject;\n\tconst catchall = def.catchall;\n\tlet value;\n\tinst._zod.parse = (payload, ctx) => {\n\t\tvalue ?? (value = _normalized.value);\n\t\tconst input = payload.value;\n\t\tif (!isObject$2(input)) {\n\t\t\tpayload.issues.push({\n\t\t\t\texpected: \"object\",\n\t\t\t\tcode: \"invalid_type\",\n\t\t\t\tinput,\n\t\t\t\tinst\n\t\t\t});\n\t\t\treturn payload;\n\t\t}\n\t\tpayload.value = {};\n\t\tconst proms = [];\n\t\tconst shape = value.shape;\n\t\tfor (const key of value.keys) {\n\t\t\tconst el = shape[key];\n\t\t\tconst isOptionalOut = el._zod.optout === \"optional\";\n\t\t\tconst r = el._zod.run({\n\t\t\t\tvalue: input[key],\n\t\t\t\tissues: []\n\t\t\t}, ctx);\n\t\t\tif (r instanceof Promise) proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, isOptionalOut)));\n\t\t\telse handlePropertyResult(r, payload, key, input, isOptionalOut);\n\t\t}\n\t\tif (!catchall) return proms.length ? Promise.all(proms).then(() => payload) : payload;\n\t\treturn handleCatchall(proms, input, payload, ctx, _normalized.value, inst);\n\t};\n});\nconst $ZodObjectJIT = /* @__PURE__ */ $constructor(\"$ZodObjectJIT\", (inst, def) => {\n\t$ZodObject.init(inst, def);\n\tconst superParse = inst._zod.parse;\n\tconst _normalized = cached(() => normalizeDef(def));\n\tconst generateFastpass = (shape) => {\n\t\tconst doc = new Doc([\n\t\t\t\"shape\",\n\t\t\t\"payload\",\n\t\t\t\"ctx\"\n\t\t]);\n\t\tconst normalized = _normalized.value;\n\t\tconst parseStr = (key) => {\n\t\t\tconst k = esc(key);\n\t\t\treturn `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;\n\t\t};\n\t\tdoc.write(`const input = payload.value;`);\n\t\tconst ids = Object.create(null);\n\t\tlet counter = 0;\n\t\tfor (const key of normalized.keys) ids[key] = `key_${counter++}`;\n\t\tdoc.write(`const newResult = {};`);\n\t\tfor (const key of normalized.keys) {\n\t\t\tconst id = ids[key];\n\t\t\tconst k = esc(key);\n\t\t\tconst isOptionalOut = shape[key]?._zod?.optout === \"optional\";\n\t\t\tdoc.write(`const ${id} = ${parseStr(key)};`);\n\t\t\tif (isOptionalOut) 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\t\t\telse 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\t\t}\n\t\tdoc.write(`payload.value = newResult;`);\n\t\tdoc.write(`return payload;`);\n\t\tconst fn = doc.compile();\n\t\treturn (payload, ctx) => fn(shape, payload, ctx);\n\t};\n\tlet fastpass;\n\tconst isObject$1 = isObject;\n\tconst jit = !globalConfig.jitless;\n\tconst fastEnabled = jit && allowsEval.value;\n\tconst catchall = def.catchall;\n\tlet value;\n\tinst._zod.parse = (payload, ctx) => {\n\t\tvalue ?? (value = _normalized.value);\n\t\tconst input = payload.value;\n\t\tif (!isObject$1(input)) {\n\t\t\tpayload.issues.push({\n\t\t\t\texpected: \"object\",\n\t\t\t\tcode: \"invalid_type\",\n\t\t\t\tinput,\n\t\t\t\tinst\n\t\t\t});\n\t\t\treturn payload;\n\t\t}\n\t\tif (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) {\n\t\t\tif (!fastpass) fastpass = generateFastpass(def.shape);\n\t\t\tpayload = fastpass(payload, ctx);\n\t\t\tif (!catchall) return payload;\n\t\t\treturn handleCatchall([], input, payload, ctx, value, inst);\n\t\t}\n\t\treturn superParse(payload, ctx);\n\t};\n});\nfunction handleUnionResults(results, final, inst, ctx) {\n\tfor (const result of results) if (result.issues.length === 0) {\n\t\tfinal.value = result.value;\n\t\treturn final;\n\t}\n\tconst nonaborted = results.filter((r) => !aborted(r));\n\tif (nonaborted.length === 1) {\n\t\tfinal.value = nonaborted[0].value;\n\t\treturn nonaborted[0];\n\t}\n\tfinal.issues.push({\n\t\tcode: \"invalid_union\",\n\t\tinput: final.value,\n\t\tinst,\n\t\terrors: results.map((result) => result.issues.map((iss) => finalizeIssue(iss, ctx, config())))\n\t});\n\treturn final;\n}\nconst $ZodUnion = /* @__PURE__ */ $constructor(\"$ZodUnion\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tdefineLazy(inst._zod, \"optin\", () => def.options.some((o) => o._zod.optin === \"optional\") ? \"optional\" : void 0);\n\tdefineLazy(inst._zod, \"optout\", () => def.options.some((o) => o._zod.optout === \"optional\") ? \"optional\" : void 0);\n\tdefineLazy(inst._zod, \"values\", () => {\n\t\tif (def.options.every((o) => o._zod.values)) return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));\n\t});\n\tdefineLazy(inst._zod, \"pattern\", () => {\n\t\tif (def.options.every((o) => o._zod.pattern)) {\n\t\t\tconst patterns = def.options.map((o) => o._zod.pattern);\n\t\t\treturn new RegExp(`^(${patterns.map((p) => cleanRegex(p.source)).join(\"|\")})$`);\n\t\t}\n\t});\n\tconst single = def.options.length === 1;\n\tconst first = def.options[0]._zod.run;\n\tinst._zod.parse = (payload, ctx) => {\n\t\tif (single) return first(payload, ctx);\n\t\tlet async = false;\n\t\tconst results = [];\n\t\tfor (const option of def.options) {\n\t\t\tconst result = option._zod.run({\n\t\t\t\tvalue: payload.value,\n\t\t\t\tissues: []\n\t\t\t}, ctx);\n\t\t\tif (result instanceof Promise) {\n\t\t\t\tresults.push(result);\n\t\t\t\tasync = true;\n\t\t\t} else {\n\t\t\t\tif (result.issues.length === 0) return result;\n\t\t\t\tresults.push(result);\n\t\t\t}\n\t\t}\n\t\tif (!async) return handleUnionResults(results, payload, inst, ctx);\n\t\treturn Promise.all(results).then((results) => {\n\t\t\treturn handleUnionResults(results, payload, inst, ctx);\n\t\t});\n\t};\n});\nconst $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor(\"$ZodDiscriminatedUnion\", (inst, def) => {\n\tdef.inclusive = false;\n\t$ZodUnion.init(inst, def);\n\tconst _super = inst._zod.parse;\n\tdefineLazy(inst._zod, \"propValues\", () => {\n\t\tconst propValues = {};\n\t\tfor (const option of def.options) {\n\t\t\tconst pv = option._zod.propValues;\n\t\t\tif (!pv || Object.keys(pv).length === 0) throw new Error(`Invalid discriminated union option at index \"${def.options.indexOf(option)}\"`);\n\t\t\tfor (const [k, v] of Object.entries(pv)) {\n\t\t\t\tif (!propValues[k]) propValues[k] = /* @__PURE__ */ new Set();\n\t\t\t\tfor (const val of v) propValues[k].add(val);\n\t\t\t}\n\t\t}\n\t\treturn propValues;\n\t});\n\tconst disc = cached(() => {\n\t\tconst opts = def.options;\n\t\tconst map = /* @__PURE__ */ new Map();\n\t\tfor (const o of opts) {\n\t\t\tconst values = o._zod.propValues?.[def.discriminator];\n\t\t\tif (!values || values.size === 0) throw new Error(`Invalid discriminated union option at index \"${def.options.indexOf(o)}\"`);\n\t\t\tfor (const v of values) {\n\t\t\t\tif (map.has(v)) throw new Error(`Duplicate discriminator value \"${String(v)}\"`);\n\t\t\t\tmap.set(v, o);\n\t\t\t}\n\t\t}\n\t\treturn map;\n\t});\n\tinst._zod.parse = (payload, ctx) => {\n\t\tconst input = payload.value;\n\t\tif (!isObject(input)) {\n\t\t\tpayload.issues.push({\n\t\t\t\tcode: \"invalid_type\",\n\t\t\t\texpected: \"object\",\n\t\t\t\tinput,\n\t\t\t\tinst\n\t\t\t});\n\t\t\treturn payload;\n\t\t}\n\t\tconst opt = disc.value.get(input?.[def.discriminator]);\n\t\tif (opt) return opt._zod.run(payload, ctx);\n\t\tif (def.unionFallback) return _super(payload, ctx);\n\t\tpayload.issues.push({\n\t\t\tcode: \"invalid_union\",\n\t\t\terrors: [],\n\t\t\tnote: \"No matching discriminator\",\n\t\t\tdiscriminator: def.discriminator,\n\t\t\tinput,\n\t\t\tpath: [def.discriminator],\n\t\t\tinst\n\t\t});\n\t\treturn payload;\n\t};\n});\nconst $ZodIntersection = /* @__PURE__ */ $constructor(\"$ZodIntersection\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tinst._zod.parse = (payload, ctx) => {\n\t\tconst input = payload.value;\n\t\tconst left = def.left._zod.run({\n\t\t\tvalue: input,\n\t\t\tissues: []\n\t\t}, ctx);\n\t\tconst right = def.right._zod.run({\n\t\t\tvalue: input,\n\t\t\tissues: []\n\t\t}, ctx);\n\t\tif (left instanceof Promise || right instanceof Promise) return Promise.all([left, right]).then(([left, right]) => {\n\t\t\treturn handleIntersectionResults(payload, left, right);\n\t\t});\n\t\treturn handleIntersectionResults(payload, left, right);\n\t};\n});\nfunction mergeValues(a, b) {\n\tif (a === b) return {\n\t\tvalid: true,\n\t\tdata: a\n\t};\n\tif (a instanceof Date && b instanceof Date && +a === +b) return {\n\t\tvalid: true,\n\t\tdata: a\n\t};\n\tif (isPlainObject(a) && isPlainObject(b)) {\n\t\tconst bKeys = Object.keys(b);\n\t\tconst sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);\n\t\tconst newObj = {\n\t\t\t...a,\n\t\t\t...b\n\t\t};\n\t\tfor (const key of sharedKeys) {\n\t\t\tconst sharedValue = mergeValues(a[key], b[key]);\n\t\t\tif (!sharedValue.valid) return {\n\t\t\t\tvalid: false,\n\t\t\t\tmergeErrorPath: [key, ...sharedValue.mergeErrorPath]\n\t\t\t};\n\t\t\tnewObj[key] = sharedValue.data;\n\t\t}\n\t\treturn {\n\t\t\tvalid: true,\n\t\t\tdata: newObj\n\t\t};\n\t}\n\tif (Array.isArray(a) && Array.isArray(b)) {\n\t\tif (a.length !== b.length) return {\n\t\t\tvalid: false,\n\t\t\tmergeErrorPath: []\n\t\t};\n\t\tconst newArray = [];\n\t\tfor (let index = 0; index < a.length; index++) {\n\t\t\tconst itemA = a[index];\n\t\t\tconst itemB = b[index];\n\t\t\tconst sharedValue = mergeValues(itemA, itemB);\n\t\t\tif (!sharedValue.valid) return {\n\t\t\t\tvalid: false,\n\t\t\t\tmergeErrorPath: [index, ...sharedValue.mergeErrorPath]\n\t\t\t};\n\t\t\tnewArray.push(sharedValue.data);\n\t\t}\n\t\treturn {\n\t\t\tvalid: true,\n\t\t\tdata: newArray\n\t\t};\n\t}\n\treturn {\n\t\tvalid: false,\n\t\tmergeErrorPath: []\n\t};\n}\nfunction handleIntersectionResults(result, left, right) {\n\tconst unrecKeys = /* @__PURE__ */ new Map();\n\tlet unrecIssue;\n\tfor (const iss of left.issues) if (iss.code === \"unrecognized_keys\") {\n\t\tunrecIssue ?? (unrecIssue = iss);\n\t\tfor (const k of iss.keys) {\n\t\t\tif (!unrecKeys.has(k)) unrecKeys.set(k, {});\n\t\t\tunrecKeys.get(k).l = true;\n\t\t}\n\t} else result.issues.push(iss);\n\tfor (const iss of right.issues) if (iss.code === \"unrecognized_keys\") for (const k of iss.keys) {\n\t\tif (!unrecKeys.has(k)) unrecKeys.set(k, {});\n\t\tunrecKeys.get(k).r = true;\n\t}\n\telse result.issues.push(iss);\n\tconst bothKeys = [...unrecKeys].filter(([, f]) => f.l && f.r).map(([k]) => k);\n\tif (bothKeys.length && unrecIssue) result.issues.push({\n\t\t...unrecIssue,\n\t\tkeys: bothKeys\n\t});\n\tif (aborted(result)) return result;\n\tconst merged = mergeValues(left.value, right.value);\n\tif (!merged.valid) throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(merged.mergeErrorPath)}`);\n\tresult.value = merged.data;\n\treturn result;\n}\nconst $ZodRecord = /* @__PURE__ */ $constructor(\"$ZodRecord\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tinst._zod.parse = (payload, ctx) => {\n\t\tconst input = payload.value;\n\t\tif (!isPlainObject(input)) {\n\t\t\tpayload.issues.push({\n\t\t\t\texpected: \"record\",\n\t\t\t\tcode: \"invalid_type\",\n\t\t\t\tinput,\n\t\t\t\tinst\n\t\t\t});\n\t\t\treturn payload;\n\t\t}\n\t\tconst proms = [];\n\t\tconst values = def.keyType._zod.values;\n\t\tif (values) {\n\t\t\tpayload.value = {};\n\t\t\tconst recordKeys = /* @__PURE__ */ new Set();\n\t\t\tfor (const key of values) if (typeof key === \"string\" || typeof key === \"number\" || typeof key === \"symbol\") {\n\t\t\t\trecordKeys.add(typeof key === \"number\" ? key.toString() : key);\n\t\t\t\tconst result = def.valueType._zod.run({\n\t\t\t\t\tvalue: input[key],\n\t\t\t\t\tissues: []\n\t\t\t\t}, ctx);\n\t\t\t\tif (result instanceof Promise) proms.push(result.then((result) => {\n\t\t\t\t\tif (result.issues.length) payload.issues.push(...prefixIssues(key, result.issues));\n\t\t\t\t\tpayload.value[key] = result.value;\n\t\t\t\t}));\n\t\t\t\telse {\n\t\t\t\t\tif (result.issues.length) payload.issues.push(...prefixIssues(key, result.issues));\n\t\t\t\t\tpayload.value[key] = result.value;\n\t\t\t\t}\n\t\t\t}\n\t\t\tlet unrecognized;\n\t\t\tfor (const key in input) if (!recordKeys.has(key)) {\n\t\t\t\tunrecognized = unrecognized ?? [];\n\t\t\t\tunrecognized.push(key);\n\t\t\t}\n\t\t\tif (unrecognized && unrecognized.length > 0) payload.issues.push({\n\t\t\t\tcode: \"unrecognized_keys\",\n\t\t\t\tinput,\n\t\t\t\tinst,\n\t\t\t\tkeys: unrecognized\n\t\t\t});\n\t\t} else {\n\t\t\tpayload.value = {};\n\t\t\tfor (const key of Reflect.ownKeys(input)) {\n\t\t\t\tif (key === \"__proto__\") continue;\n\t\t\t\tlet keyResult = def.keyType._zod.run({\n\t\t\t\t\tvalue: key,\n\t\t\t\t\tissues: []\n\t\t\t\t}, ctx);\n\t\t\t\tif (keyResult instanceof Promise) throw new Error(\"Async schemas not supported in object keys currently\");\n\t\t\t\tif (typeof key === \"string\" && number$1.test(key) && keyResult.issues.length) {\n\t\t\t\t\tconst retryResult = def.keyType._zod.run({\n\t\t\t\t\t\tvalue: Number(key),\n\t\t\t\t\t\tissues: []\n\t\t\t\t\t}, ctx);\n\t\t\t\t\tif (retryResult instanceof Promise) throw new Error(\"Async schemas not supported in object keys currently\");\n\t\t\t\t\tif (retryResult.issues.length === 0) keyResult = retryResult;\n\t\t\t\t}\n\t\t\t\tif (keyResult.issues.length) {\n\t\t\t\t\tif (def.mode === \"loose\") payload.value[key] = input[key];\n\t\t\t\t\telse payload.issues.push({\n\t\t\t\t\t\tcode: \"invalid_key\",\n\t\t\t\t\t\torigin: \"record\",\n\t\t\t\t\t\tissues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),\n\t\t\t\t\t\tinput: key,\n\t\t\t\t\t\tpath: [key],\n\t\t\t\t\t\tinst\n\t\t\t\t\t});\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconst result = def.valueType._zod.run({\n\t\t\t\t\tvalue: input[key],\n\t\t\t\t\tissues: []\n\t\t\t\t}, ctx);\n\t\t\t\tif (result instanceof Promise) proms.push(result.then((result) => {\n\t\t\t\t\tif (result.issues.length) payload.issues.push(...prefixIssues(key, result.issues));\n\t\t\t\t\tpayload.value[keyResult.value] = result.value;\n\t\t\t\t}));\n\t\t\t\telse {\n\t\t\t\t\tif (result.issues.length) payload.issues.push(...prefixIssues(key, result.issues));\n\t\t\t\t\tpayload.value[keyResult.value] = result.value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (proms.length) return Promise.all(proms).then(() => payload);\n\t\treturn payload;\n\t};\n});\nconst $ZodEnum = /* @__PURE__ */ $constructor(\"$ZodEnum\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tconst values = getEnumValues(def.entries);\n\tconst valuesSet = new Set(values);\n\tinst._zod.values = valuesSet;\n\tinst._zod.pattern = new RegExp(`^(${values.filter((k) => propertyKeyTypes.has(typeof k)).map((o) => typeof o === \"string\" ? escapeRegex(o) : o.toString()).join(\"|\")})$`);\n\tinst._zod.parse = (payload, _ctx) => {\n\t\tconst input = payload.value;\n\t\tif (valuesSet.has(input)) return payload;\n\t\tpayload.issues.push({\n\t\t\tcode: \"invalid_value\",\n\t\t\tvalues,\n\t\t\tinput,\n\t\t\tinst\n\t\t});\n\t\treturn payload;\n\t};\n});\nconst $ZodLiteral = /* @__PURE__ */ $constructor(\"$ZodLiteral\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tif (def.values.length === 0) throw new Error(\"Cannot create literal schema with no valid values\");\n\tconst values = new Set(def.values);\n\tinst._zod.values = values;\n\tinst._zod.pattern = new RegExp(`^(${def.values.map((o) => typeof o === \"string\" ? escapeRegex(o) : o ? escapeRegex(o.toString()) : String(o)).join(\"|\")})$`);\n\tinst._zod.parse = (payload, _ctx) => {\n\t\tconst input = payload.value;\n\t\tif (values.has(input)) return payload;\n\t\tpayload.issues.push({\n\t\t\tcode: \"invalid_value\",\n\t\t\tvalues: def.values,\n\t\t\tinput,\n\t\t\tinst\n\t\t});\n\t\treturn payload;\n\t};\n});\nconst $ZodTransform = /* @__PURE__ */ $constructor(\"$ZodTransform\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tinst._zod.parse = (payload, ctx) => {\n\t\tif (ctx.direction === \"backward\") throw new $ZodEncodeError(inst.constructor.name);\n\t\tconst _out = def.transform(payload.value, payload);\n\t\tif (ctx.async) return (_out instanceof Promise ? _out : Promise.resolve(_out)).then((output) => {\n\t\t\tpayload.value = output;\n\t\t\treturn payload;\n\t\t});\n\t\tif (_out instanceof Promise) throw new $ZodAsyncError();\n\t\tpayload.value = _out;\n\t\treturn payload;\n\t};\n});\nfunction handleOptionalResult(result, input) {\n\tif (result.issues.length && input === void 0) return {\n\t\tissues: [],\n\t\tvalue: void 0\n\t};\n\treturn result;\n}\nconst $ZodOptional = /* @__PURE__ */ $constructor(\"$ZodOptional\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tinst._zod.optin = \"optional\";\n\tinst._zod.optout = \"optional\";\n\tdefineLazy(inst._zod, \"values\", () => {\n\t\treturn def.innerType._zod.values ? new Set([...def.innerType._zod.values, void 0]) : void 0;\n\t});\n\tdefineLazy(inst._zod, \"pattern\", () => {\n\t\tconst pattern = def.innerType._zod.pattern;\n\t\treturn pattern ? new RegExp(`^(${cleanRegex(pattern.source)})?$`) : void 0;\n\t});\n\tinst._zod.parse = (payload, ctx) => {\n\t\tif (def.innerType._zod.optin === \"optional\") {\n\t\t\tconst result = def.innerType._zod.run(payload, ctx);\n\t\t\tif (result instanceof Promise) return result.then((r) => handleOptionalResult(r, payload.value));\n\t\t\treturn handleOptionalResult(result, payload.value);\n\t\t}\n\t\tif (payload.value === void 0) return payload;\n\t\treturn def.innerType._zod.run(payload, ctx);\n\t};\n});\nconst $ZodExactOptional = /* @__PURE__ */ $constructor(\"$ZodExactOptional\", (inst, def) => {\n\t$ZodOptional.init(inst, def);\n\tdefineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n\tdefineLazy(inst._zod, \"pattern\", () => def.innerType._zod.pattern);\n\tinst._zod.parse = (payload, ctx) => {\n\t\treturn def.innerType._zod.run(payload, ctx);\n\t};\n});\nconst $ZodNullable = /* @__PURE__ */ $constructor(\"$ZodNullable\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tdefineLazy(inst._zod, \"optin\", () => def.innerType._zod.optin);\n\tdefineLazy(inst._zod, \"optout\", () => def.innerType._zod.optout);\n\tdefineLazy(inst._zod, \"pattern\", () => {\n\t\tconst pattern = def.innerType._zod.pattern;\n\t\treturn pattern ? new RegExp(`^(${cleanRegex(pattern.source)}|null)$`) : void 0;\n\t});\n\tdefineLazy(inst._zod, \"values\", () => {\n\t\treturn def.innerType._zod.values ? new Set([...def.innerType._zod.values, null]) : void 0;\n\t});\n\tinst._zod.parse = (payload, ctx) => {\n\t\tif (payload.value === null) return payload;\n\t\treturn def.innerType._zod.run(payload, ctx);\n\t};\n});\nconst $ZodDefault = /* @__PURE__ */ $constructor(\"$ZodDefault\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tinst._zod.optin = \"optional\";\n\tdefineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n\tinst._zod.parse = (payload, ctx) => {\n\t\tif (ctx.direction === \"backward\") return def.innerType._zod.run(payload, ctx);\n\t\tif (payload.value === void 0) {\n\t\t\tpayload.value = def.defaultValue;\n\t\t\t/**\n\t\t\t* $ZodDefault returns the default value immediately in forward direction.\n\t\t\t* 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\t\t\treturn payload;\n\t\t}\n\t\tconst result = def.innerType._zod.run(payload, ctx);\n\t\tif (result instanceof Promise) return result.then((result) => handleDefaultResult(result, def));\n\t\treturn handleDefaultResult(result, def);\n\t};\n});\nfunction handleDefaultResult(payload, def) {\n\tif (payload.value === void 0) payload.value = def.defaultValue;\n\treturn payload;\n}\nconst $ZodPrefault = /* @__PURE__ */ $constructor(\"$ZodPrefault\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tinst._zod.optin = \"optional\";\n\tdefineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n\tinst._zod.parse = (payload, ctx) => {\n\t\tif (ctx.direction === \"backward\") return def.innerType._zod.run(payload, ctx);\n\t\tif (payload.value === void 0) payload.value = def.defaultValue;\n\t\treturn def.innerType._zod.run(payload, ctx);\n\t};\n});\nconst $ZodNonOptional = /* @__PURE__ */ $constructor(\"$ZodNonOptional\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tdefineLazy(inst._zod, \"values\", () => {\n\t\tconst v = def.innerType._zod.values;\n\t\treturn v ? new Set([...v].filter((x) => x !== void 0)) : void 0;\n\t});\n\tinst._zod.parse = (payload, ctx) => {\n\t\tconst result = def.innerType._zod.run(payload, ctx);\n\t\tif (result instanceof Promise) return result.then((result) => handleNonOptionalResult(result, inst));\n\t\treturn handleNonOptionalResult(result, inst);\n\t};\n});\nfunction handleNonOptionalResult(payload, inst) {\n\tif (!payload.issues.length && payload.value === void 0) payload.issues.push({\n\t\tcode: \"invalid_type\",\n\t\texpected: \"nonoptional\",\n\t\tinput: payload.value,\n\t\tinst\n\t});\n\treturn payload;\n}\nconst $ZodCatch = /* @__PURE__ */ $constructor(\"$ZodCatch\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tdefineLazy(inst._zod, \"optin\", () => def.innerType._zod.optin);\n\tdefineLazy(inst._zod, \"optout\", () => def.innerType._zod.optout);\n\tdefineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n\tinst._zod.parse = (payload, ctx) => {\n\t\tif (ctx.direction === \"backward\") return def.innerType._zod.run(payload, ctx);\n\t\tconst result = def.innerType._zod.run(payload, ctx);\n\t\tif (result instanceof Promise) return result.then((result) => {\n\t\t\tpayload.value = result.value;\n\t\t\tif (result.issues.length) {\n\t\t\t\tpayload.value = def.catchValue({\n\t\t\t\t\t...payload,\n\t\t\t\t\terror: { issues: result.issues.map((iss) => finalizeIssue(iss, ctx, config())) },\n\t\t\t\t\tinput: payload.value\n\t\t\t\t});\n\t\t\t\tpayload.issues = [];\n\t\t\t}\n\t\t\treturn payload;\n\t\t});\n\t\tpayload.value = result.value;\n\t\tif (result.issues.length) {\n\t\t\tpayload.value = def.catchValue({\n\t\t\t\t...payload,\n\t\t\t\terror: { issues: result.issues.map((iss) => finalizeIssue(iss, ctx, config())) },\n\t\t\t\tinput: payload.value\n\t\t\t});\n\t\t\tpayload.issues = [];\n\t\t}\n\t\treturn payload;\n\t};\n});\nconst $ZodPipe = /* @__PURE__ */ $constructor(\"$ZodPipe\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tdefineLazy(inst._zod, \"values\", () => def.in._zod.values);\n\tdefineLazy(inst._zod, \"optin\", () => def.in._zod.optin);\n\tdefineLazy(inst._zod, \"optout\", () => def.out._zod.optout);\n\tdefineLazy(inst._zod, \"propValues\", () => def.in._zod.propValues);\n\tinst._zod.parse = (payload, ctx) => {\n\t\tif (ctx.direction === \"backward\") {\n\t\t\tconst right = def.out._zod.run(payload, ctx);\n\t\t\tif (right instanceof Promise) return right.then((right) => handlePipeResult(right, def.in, ctx));\n\t\t\treturn handlePipeResult(right, def.in, ctx);\n\t\t}\n\t\tconst left = def.in._zod.run(payload, ctx);\n\t\tif (left instanceof Promise) return left.then((left) => handlePipeResult(left, def.out, ctx));\n\t\treturn handlePipeResult(left, def.out, ctx);\n\t};\n});\nfunction handlePipeResult(left, next, ctx) {\n\tif (left.issues.length) {\n\t\tleft.aborted = true;\n\t\treturn left;\n\t}\n\treturn next._zod.run({\n\t\tvalue: left.value,\n\t\tissues: left.issues\n\t}, ctx);\n}\nconst $ZodReadonly = /* @__PURE__ */ $constructor(\"$ZodReadonly\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tdefineLazy(inst._zod, \"propValues\", () => def.innerType._zod.propValues);\n\tdefineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n\tdefineLazy(inst._zod, \"optin\", () => def.innerType?._zod?.optin);\n\tdefineLazy(inst._zod, \"optout\", () => def.innerType?._zod?.optout);\n\tinst._zod.parse = (payload, ctx) => {\n\t\tif (ctx.direction === \"backward\") return def.innerType._zod.run(payload, ctx);\n\t\tconst result = def.innerType._zod.run(payload, ctx);\n\t\tif (result instanceof Promise) return result.then(handleReadonlyResult);\n\t\treturn handleReadonlyResult(result);\n\t};\n});\nfunction handleReadonlyResult(payload) {\n\tpayload.value = Object.freeze(payload.value);\n\treturn payload;\n}\nconst $ZodCustom = /* @__PURE__ */ $constructor(\"$ZodCustom\", (inst, def) => {\n\t$ZodCheck.init(inst, def);\n\t$ZodType.init(inst, def);\n\tinst._zod.parse = (payload, _) => {\n\t\treturn payload;\n\t};\n\tinst._zod.check = (payload) => {\n\t\tconst input = payload.value;\n\t\tconst r = def.fn(input);\n\t\tif (r instanceof Promise) return r.then((r) => handleRefineResult(r, payload, input, inst));\n\t\thandleRefineResult(r, payload, input, inst);\n\t};\n});\nfunction handleRefineResult(result, payload, input, inst) {\n\tif (!result) {\n\t\tconst _iss = {\n\t\t\tcode: \"custom\",\n\t\t\tinput,\n\t\t\tinst,\n\t\t\tpath: [...inst._zod.def.path ?? []],\n\t\t\tcontinue: !inst._zod.def.abort\n\t\t};\n\t\tif (inst._zod.def.params) _iss.params = inst._zod.def.params;\n\t\tpayload.issues.push(issue(_iss));\n\t}\n}\n//#endregion\n//#region ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/registries.js\nvar _a;\nvar $ZodRegistry = class {\n\tconstructor() {\n\t\tthis._map = /* @__PURE__ */ new WeakMap();\n\t\tthis._idmap = /* @__PURE__ */ new Map();\n\t}\n\tadd(schema, ..._meta) {\n\t\tconst meta = _meta[0];\n\t\tthis._map.set(schema, meta);\n\t\tif (meta && typeof meta === \"object\" && \"id\" in meta) this._idmap.set(meta.id, schema);\n\t\treturn this;\n\t}\n\tclear() {\n\t\tthis._map = /* @__PURE__ */ new WeakMap();\n\t\tthis._idmap = /* @__PURE__ */ new Map();\n\t\treturn this;\n\t}\n\tremove(schema) {\n\t\tconst meta = this._map.get(schema);\n\t\tif (meta && typeof meta === \"object\" && \"id\" in meta) this._idmap.delete(meta.id);\n\t\tthis._map.delete(schema);\n\t\treturn this;\n\t}\n\tget(schema) {\n\t\tconst p = schema._zod.parent;\n\t\tif (p) {\n\t\t\tconst pm = { ...this.get(p) ?? {} };\n\t\t\tdelete pm.id;\n\t\t\tconst f = {\n\t\t\t\t...pm,\n\t\t\t\t...this._map.get(schema)\n\t\t\t};\n\t\t\treturn Object.keys(f).length ? f : void 0;\n\t\t}\n\t\treturn this._map.get(schema);\n\t}\n\thas(schema) {\n\t\treturn this._map.has(schema);\n\t}\n};\nfunction registry() {\n\treturn new $ZodRegistry();\n}\n(_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());\nconst globalRegistry = globalThis.__zod_globalRegistry;\n//#endregion\n//#region ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/api.js\n/* @__NO_SIDE_EFFECTS__ */\nfunction _string(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _email(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"email\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _guid(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"guid\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _uuid(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"uuid\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _uuidv4(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"uuid\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\tversion: \"v4\",\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _uuidv6(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"uuid\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\tversion: \"v6\",\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _uuidv7(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"uuid\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\tversion: \"v7\",\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _url(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"url\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _emoji(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"emoji\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _nanoid(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"nanoid\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _cuid(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"cuid\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _cuid2(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"cuid2\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _ulid(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"ulid\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _xid(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"xid\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _ksuid(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"ksuid\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _ipv4(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"ipv4\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _ipv6(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"ipv6\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _cidrv4(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"cidrv4\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _cidrv6(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"cidrv6\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _base64(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"base64\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _base64url(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"base64url\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _e164(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"e164\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _jwt(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"jwt\",\n\t\tcheck: \"string_format\",\n\t\tabort: false,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _isoDateTime(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"datetime\",\n\t\tcheck: \"string_format\",\n\t\toffset: false,\n\t\tlocal: false,\n\t\tprecision: null,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _isoDate(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"date\",\n\t\tcheck: \"string_format\",\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _isoTime(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"time\",\n\t\tcheck: \"string_format\",\n\t\tprecision: null,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _isoDuration(Class, params) {\n\treturn new Class({\n\t\ttype: \"string\",\n\t\tformat: \"duration\",\n\t\tcheck: \"string_format\",\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _number(Class, params) {\n\treturn new Class({\n\t\ttype: \"number\",\n\t\tchecks: [],\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _int(Class, params) {\n\treturn new Class({\n\t\ttype: \"number\",\n\t\tcheck: \"number_format\",\n\t\tabort: false,\n\t\tformat: \"safeint\",\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _boolean(Class, params) {\n\treturn new Class({\n\t\ttype: \"boolean\",\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _unknown(Class) {\n\treturn new Class({ type: \"unknown\" });\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _never(Class, params) {\n\treturn new Class({\n\t\ttype: \"never\",\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _lt(value, params) {\n\treturn new $ZodCheckLessThan({\n\t\tcheck: \"less_than\",\n\t\t...normalizeParams(params),\n\t\tvalue,\n\t\tinclusive: false\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _lte(value, params) {\n\treturn new $ZodCheckLessThan({\n\t\tcheck: \"less_than\",\n\t\t...normalizeParams(params),\n\t\tvalue,\n\t\tinclusive: true\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _gt(value, params) {\n\treturn new $ZodCheckGreaterThan({\n\t\tcheck: \"greater_than\",\n\t\t...normalizeParams(params),\n\t\tvalue,\n\t\tinclusive: false\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _gte(value, params) {\n\treturn new $ZodCheckGreaterThan({\n\t\tcheck: \"greater_than\",\n\t\t...normalizeParams(params),\n\t\tvalue,\n\t\tinclusive: true\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _multipleOf(value, params) {\n\treturn new $ZodCheckMultipleOf({\n\t\tcheck: \"multiple_of\",\n\t\t...normalizeParams(params),\n\t\tvalue\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _maxLength(maximum, params) {\n\treturn new $ZodCheckMaxLength({\n\t\tcheck: \"max_length\",\n\t\t...normalizeParams(params),\n\t\tmaximum\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _minLength(minimum, params) {\n\treturn new $ZodCheckMinLength({\n\t\tcheck: \"min_length\",\n\t\t...normalizeParams(params),\n\t\tminimum\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _length(length, params) {\n\treturn new $ZodCheckLengthEquals({\n\t\tcheck: \"length_equals\",\n\t\t...normalizeParams(params),\n\t\tlength\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _regex(pattern, params) {\n\treturn new $ZodCheckRegex({\n\t\tcheck: \"string_format\",\n\t\tformat: \"regex\",\n\t\t...normalizeParams(params),\n\t\tpattern\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _lowercase(params) {\n\treturn new $ZodCheckLowerCase({\n\t\tcheck: \"string_format\",\n\t\tformat: \"lowercase\",\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _uppercase(params) {\n\treturn new $ZodCheckUpperCase({\n\t\tcheck: \"string_format\",\n\t\tformat: \"uppercase\",\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _includes(includes, params) {\n\treturn new $ZodCheckIncludes({\n\t\tcheck: \"string_format\",\n\t\tformat: \"includes\",\n\t\t...normalizeParams(params),\n\t\tincludes\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _startsWith(prefix, params) {\n\treturn new $ZodCheckStartsWith({\n\t\tcheck: \"string_format\",\n\t\tformat: \"starts_with\",\n\t\t...normalizeParams(params),\n\t\tprefix\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _endsWith(suffix, params) {\n\treturn new $ZodCheckEndsWith({\n\t\tcheck: \"string_format\",\n\t\tformat: \"ends_with\",\n\t\t...normalizeParams(params),\n\t\tsuffix\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _overwrite(tx) {\n\treturn new $ZodCheckOverwrite({\n\t\tcheck: \"overwrite\",\n\t\ttx\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _normalize(form) {\n\treturn /* @__PURE__ */ _overwrite((input) => input.normalize(form));\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _trim() {\n\treturn /* @__PURE__ */ _overwrite((input) => input.trim());\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _toLowerCase() {\n\treturn /* @__PURE__ */ _overwrite((input) => input.toLowerCase());\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _toUpperCase() {\n\treturn /* @__PURE__ */ _overwrite((input) => input.toUpperCase());\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _slugify() {\n\treturn /* @__PURE__ */ _overwrite((input) => slugify(input));\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _array(Class, element, params) {\n\treturn new Class({\n\t\ttype: \"array\",\n\t\telement,\n\t\t...normalizeParams(params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _refine(Class, fn, _params) {\n\treturn new Class({\n\t\ttype: \"custom\",\n\t\tcheck: \"custom\",\n\t\tfn,\n\t\t...normalizeParams(_params)\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _superRefine(fn) {\n\tconst ch = /* @__PURE__ */ _check((payload) => {\n\t\tpayload.addIssue = (issue$2) => {\n\t\t\tif (typeof issue$2 === \"string\") payload.issues.push(issue(issue$2, payload.value, ch._zod.def));\n\t\t\telse {\n\t\t\t\tconst _issue = issue$2;\n\t\t\t\tif (_issue.fatal) _issue.continue = false;\n\t\t\t\t_issue.code ?? (_issue.code = \"custom\");\n\t\t\t\t_issue.input ?? (_issue.input = payload.value);\n\t\t\t\t_issue.inst ?? (_issue.inst = ch);\n\t\t\t\t_issue.continue ?? (_issue.continue = !ch._zod.def.abort);\n\t\t\t\tpayload.issues.push(issue(_issue));\n\t\t\t}\n\t\t};\n\t\treturn fn(payload.value, payload);\n\t});\n\treturn ch;\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction _check(fn, params) {\n\tconst ch = new $ZodCheck({\n\t\tcheck: \"custom\",\n\t\t...normalizeParams(params)\n\t});\n\tch._zod.check = fn;\n\treturn ch;\n}\n//#endregion\n//#region ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/to-json-schema.js\nfunction initializeContext(params) {\n\tlet target = params?.target ?? \"draft-2020-12\";\n\tif (target === \"draft-4\") target = \"draft-04\";\n\tif (target === \"draft-7\") target = \"draft-07\";\n\treturn {\n\t\tprocessors: params.processors ?? {},\n\t\tmetadataRegistry: params?.metadata ?? globalRegistry,\n\t\ttarget,\n\t\tunrepresentable: params?.unrepresentable ?? \"throw\",\n\t\toverride: params?.override ?? (() => {}),\n\t\tio: params?.io ?? \"output\",\n\t\tcounter: 0,\n\t\tseen: /* @__PURE__ */ new Map(),\n\t\tcycles: params?.cycles ?? \"ref\",\n\t\treused: params?.reused ?? \"inline\",\n\t\texternal: params?.external ?? void 0\n\t};\n}\nfunction process$1(schema, ctx, _params = {\n\tpath: [],\n\tschemaPath: []\n}) {\n\tvar _a;\n\tconst def = schema._zod.def;\n\tconst seen = ctx.seen.get(schema);\n\tif (seen) {\n\t\tseen.count++;\n\t\tif (_params.schemaPath.includes(schema)) seen.cycle = _params.path;\n\t\treturn seen.schema;\n\t}\n\tconst result = {\n\t\tschema: {},\n\t\tcount: 1,\n\t\tcycle: void 0,\n\t\tpath: _params.path\n\t};\n\tctx.seen.set(schema, result);\n\tconst overrideSchema = schema._zod.toJSONSchema?.();\n\tif (overrideSchema) result.schema = overrideSchema;\n\telse {\n\t\tconst params = {\n\t\t\t..._params,\n\t\t\tschemaPath: [..._params.schemaPath, schema],\n\t\t\tpath: _params.path\n\t\t};\n\t\tif (schema._zod.processJSONSchema) schema._zod.processJSONSchema(ctx, result.schema, params);\n\t\telse {\n\t\t\tconst _json = result.schema;\n\t\t\tconst processor = ctx.processors[def.type];\n\t\t\tif (!processor) throw new Error(`[toJSONSchema]: Non-representable type encountered: ${def.type}`);\n\t\t\tprocessor(schema, ctx, _json, params);\n\t\t}\n\t\tconst parent = schema._zod.parent;\n\t\tif (parent) {\n\t\t\tif (!result.ref) result.ref = parent;\n\t\t\tprocess$1(parent, ctx, params);\n\t\t\tctx.seen.get(parent).isParent = true;\n\t\t}\n\t}\n\tconst meta = ctx.metadataRegistry.get(schema);\n\tif (meta) Object.assign(result.schema, meta);\n\tif (ctx.io === \"input\" && isTransforming(schema)) {\n\t\tdelete result.schema.examples;\n\t\tdelete result.schema.default;\n\t}\n\tif (ctx.io === \"input\" && result.schema._prefault) (_a = result.schema).default ?? (_a.default = result.schema._prefault);\n\tdelete result.schema._prefault;\n\treturn ctx.seen.get(schema).schema;\n}\nfunction extractDefs(ctx, schema) {\n\tconst root = ctx.seen.get(schema);\n\tif (!root) throw new Error(\"Unprocessed schema. This is a bug in Zod.\");\n\tconst idToSchema = /* @__PURE__ */ new Map();\n\tfor (const entry of ctx.seen.entries()) {\n\t\tconst id = ctx.metadataRegistry.get(entry[0])?.id;\n\t\tif (id) {\n\t\t\tconst existing = idToSchema.get(id);\n\t\t\tif (existing && existing !== entry[0]) throw new Error(`Duplicate schema id \"${id}\" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);\n\t\t\tidToSchema.set(id, entry[0]);\n\t\t}\n\t}\n\tconst makeURI = (entry) => {\n\t\tconst defsSegment = ctx.target === \"draft-2020-12\" ? \"$defs\" : \"definitions\";\n\t\tif (ctx.external) {\n\t\t\tconst externalId = ctx.external.registry.get(entry[0])?.id;\n\t\t\tconst uriGenerator = ctx.external.uri ?? ((id) => id);\n\t\t\tif (externalId) return { ref: uriGenerator(externalId) };\n\t\t\tconst id = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx.counter++}`;\n\t\t\tentry[1].defId = id;\n\t\t\treturn {\n\t\t\t\tdefId: id,\n\t\t\t\tref: `${uriGenerator(\"__shared\")}#/${defsSegment}/${id}`\n\t\t\t};\n\t\t}\n\t\tif (entry[1] === root) return { ref: \"#\" };\n\t\tconst defUriPrefix = `#/${defsSegment}/`;\n\t\tconst defId = entry[1].schema.id ?? `__schema${ctx.counter++}`;\n\t\treturn {\n\t\t\tdefId,\n\t\t\tref: defUriPrefix + defId\n\t\t};\n\t};\n\tconst extractToDef = (entry) => {\n\t\tif (entry[1].schema.$ref) return;\n\t\tconst seen = entry[1];\n\t\tconst { ref, defId } = makeURI(entry);\n\t\tseen.def = { ...seen.schema };\n\t\tif (defId) seen.defId = defId;\n\t\tconst schema = seen.schema;\n\t\tfor (const key in schema) delete schema[key];\n\t\tschema.$ref = ref;\n\t};\n\tif (ctx.cycles === \"throw\") for (const entry of ctx.seen.entries()) {\n\t\tconst seen = entry[1];\n\t\tif (seen.cycle) throw new Error(`Cycle detected: #/${seen.cycle?.join(\"/\")}/<root>\n\nSet the \\`cycles\\` parameter to \\`\"ref\"\\` to resolve cyclical schemas with defs.`);\n\t}\n\tfor (const entry of ctx.seen.entries()) {\n\t\tconst seen = entry[1];\n\t\tif (schema === entry[0]) {\n\t\t\textractToDef(entry);\n\t\t\tcontinue;\n\t\t}\n\t\tif (ctx.external) {\n\t\t\tconst ext = ctx.external.registry.get(entry[0])?.id;\n\t\t\tif (schema !== entry[0] && ext) {\n\t\t\t\textractToDef(entry);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\tif (ctx.metadataRegistry.get(entry[0])?.id) {\n\t\t\textractToDef(entry);\n\t\t\tcontinue;\n\t\t}\n\t\tif (seen.cycle) {\n\t\t\textractToDef(entry);\n\t\t\tcontinue;\n\t\t}\n\t\tif (seen.count > 1) {\n\t\t\tif (ctx.reused === \"ref\") {\n\t\t\t\textractToDef(entry);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t}\n}\nfunction finalize(ctx, schema) {\n\tconst root = ctx.seen.get(schema);\n\tif (!root) throw new Error(\"Unprocessed schema. This is a bug in Zod.\");\n\tconst flattenRef = (zodSchema) => {\n\t\tconst seen = ctx.seen.get(zodSchema);\n\t\tif (seen.ref === null) return;\n\t\tconst schema = seen.def ?? seen.schema;\n\t\tconst _cached = { ...schema };\n\t\tconst ref = seen.ref;\n\t\tseen.ref = null;\n\t\tif (ref) {\n\t\t\tflattenRef(ref);\n\t\t\tconst refSeen = ctx.seen.get(ref);\n\t\t\tconst refSchema = refSeen.schema;\n\t\t\tif (refSchema.$ref && (ctx.target === \"draft-07\" || ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\")) {\n\t\t\t\tschema.allOf = schema.allOf ?? [];\n\t\t\t\tschema.allOf.push(refSchema);\n\t\t\t} else Object.assign(schema, refSchema);\n\t\t\tObject.assign(schema, _cached);\n\t\t\tif (zodSchema._zod.parent === ref) for (const key in schema) {\n\t\t\t\tif (key === \"$ref\" || key === \"allOf\") continue;\n\t\t\t\tif (!(key in _cached)) delete schema[key];\n\t\t\t}\n\t\t\tif (refSchema.$ref && refSeen.def) for (const key in schema) {\n\t\t\t\tif (key === \"$ref\" || key === \"allOf\") continue;\n\t\t\t\tif (key in refSeen.def && JSON.stringify(schema[key]) === JSON.stringify(refSeen.def[key])) delete schema[key];\n\t\t\t}\n\t\t}\n\t\tconst parent = zodSchema._zod.parent;\n\t\tif (parent && parent !== ref) {\n\t\t\tflattenRef(parent);\n\t\t\tconst parentSeen = ctx.seen.get(parent);\n\t\t\tif (parentSeen?.schema.$ref) {\n\t\t\t\tschema.$ref = parentSeen.schema.$ref;\n\t\t\t\tif (parentSeen.def) for (const key in schema) {\n\t\t\t\t\tif (key === \"$ref\" || key === \"allOf\") continue;\n\t\t\t\t\tif (key in parentSeen.def && JSON.stringify(schema[key]) === JSON.stringify(parentSeen.def[key])) delete schema[key];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tctx.override({\n\t\t\tzodSchema,\n\t\t\tjsonSchema: schema,\n\t\t\tpath: seen.path ?? []\n\t\t});\n\t};\n\tfor (const entry of [...ctx.seen.entries()].reverse()) flattenRef(entry[0]);\n\tconst result = {};\n\tif (ctx.target === \"draft-2020-12\") result.$schema = \"https://json-schema.org/draft/2020-12/schema\";\n\telse if (ctx.target === \"draft-07\") result.$schema = \"http://json-schema.org/draft-07/schema#\";\n\telse if (ctx.target === \"draft-04\") result.$schema = \"http://json-schema.org/draft-04/schema#\";\n\telse if (ctx.target === \"openapi-3.0\") {}\n\tif (ctx.external?.uri) {\n\t\tconst id = ctx.external.registry.get(schema)?.id;\n\t\tif (!id) throw new Error(\"Schema is missing an `id` property\");\n\t\tresult.$id = ctx.external.uri(id);\n\t}\n\tObject.assign(result, root.def ?? root.schema);\n\tconst defs = ctx.external?.defs ?? {};\n\tfor (const entry of ctx.seen.entries()) {\n\t\tconst seen = entry[1];\n\t\tif (seen.def && seen.defId) defs[seen.defId] = seen.def;\n\t}\n\tif (ctx.external) {} else if (Object.keys(defs).length > 0) if (ctx.target === \"draft-2020-12\") result.$defs = defs;\n\telse result.definitions = defs;\n\ttry {\n\t\tconst finalized = JSON.parse(JSON.stringify(result));\n\t\tObject.defineProperty(finalized, \"~standard\", {\n\t\t\tvalue: {\n\t\t\t\t...schema[\"~standard\"],\n\t\t\t\tjsonSchema: {\n\t\t\t\t\tinput: createStandardJSONSchemaMethod(schema, \"input\", ctx.processors),\n\t\t\t\t\toutput: createStandardJSONSchemaMethod(schema, \"output\", ctx.processors)\n\t\t\t\t}\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t\twritable: false\n\t\t});\n\t\treturn finalized;\n\t} catch (_err) {\n\t\tthrow new Error(\"Error converting schema to JSON.\");\n\t}\n}\nfunction isTransforming(_schema, _ctx) {\n\tconst ctx = _ctx ?? { seen: /* @__PURE__ */ new Set() };\n\tif (ctx.seen.has(_schema)) return false;\n\tctx.seen.add(_schema);\n\tconst def = _schema._zod.def;\n\tif (def.type === \"transform\") return true;\n\tif (def.type === \"array\") return isTransforming(def.element, ctx);\n\tif (def.type === \"set\") return isTransforming(def.valueType, ctx);\n\tif (def.type === \"lazy\") return isTransforming(def.getter(), ctx);\n\tif (def.type === \"promise\" || def.type === \"optional\" || def.type === \"nonoptional\" || def.type === \"nullable\" || def.type === \"readonly\" || def.type === \"default\" || def.type === \"prefault\") return isTransforming(def.innerType, ctx);\n\tif (def.type === \"intersection\") return isTransforming(def.left, ctx) || isTransforming(def.right, ctx);\n\tif (def.type === \"record\" || def.type === \"map\") return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);\n\tif (def.type === \"pipe\") return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);\n\tif (def.type === \"object\") {\n\t\tfor (const key in def.shape) if (isTransforming(def.shape[key], ctx)) return true;\n\t\treturn false;\n\t}\n\tif (def.type === \"union\") {\n\t\tfor (const option of def.options) if (isTransforming(option, ctx)) return true;\n\t\treturn false;\n\t}\n\tif (def.type === \"tuple\") {\n\t\tfor (const item of def.items) if (isTransforming(item, ctx)) return true;\n\t\tif (def.rest && isTransforming(def.rest, ctx)) return true;\n\t\treturn false;\n\t}\n\treturn 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*/\nconst createToJSONSchemaMethod = (schema, processors = {}) => (params) => {\n\tconst ctx = initializeContext({\n\t\t...params,\n\t\tprocessors\n\t});\n\tprocess$1(schema, ctx);\n\textractDefs(ctx, schema);\n\treturn finalize(ctx, schema);\n};\nconst createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {\n\tconst { libraryOptions, target } = params ?? {};\n\tconst ctx = initializeContext({\n\t\t...libraryOptions ?? {},\n\t\ttarget,\n\t\tio,\n\t\tprocessors\n\t});\n\tprocess$1(schema, ctx);\n\textractDefs(ctx, schema);\n\treturn finalize(ctx, schema);\n};\n//#endregion\n//#region ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/json-schema-processors.js\nconst formatMap = {\n\tguid: \"uuid\",\n\turl: \"uri\",\n\tdatetime: \"date-time\",\n\tjson_string: \"json-string\",\n\tregex: \"\"\n};\nconst stringProcessor = (schema, ctx, _json, _params) => {\n\tconst json = _json;\n\tjson.type = \"string\";\n\tconst { minimum, maximum, format, patterns, contentEncoding } = schema._zod.bag;\n\tif (typeof minimum === \"number\") json.minLength = minimum;\n\tif (typeof maximum === \"number\") json.maxLength = maximum;\n\tif (format) {\n\t\tjson.format = formatMap[format] ?? format;\n\t\tif (json.format === \"\") delete json.format;\n\t\tif (format === \"time\") delete json.format;\n\t}\n\tif (contentEncoding) json.contentEncoding = contentEncoding;\n\tif (patterns && patterns.size > 0) {\n\t\tconst regexes = [...patterns];\n\t\tif (regexes.length === 1) json.pattern = regexes[0].source;\n\t\telse if (regexes.length > 1) json.allOf = [...regexes.map((regex) => ({\n\t\t\t...ctx.target === \"draft-07\" || ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\" ? { type: \"string\" } : {},\n\t\t\tpattern: regex.source\n\t\t}))];\n\t}\n};\nconst numberProcessor = (schema, ctx, _json, _params) => {\n\tconst json = _json;\n\tconst { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;\n\tif (typeof format === \"string\" && format.includes(\"int\")) json.type = \"integer\";\n\telse json.type = \"number\";\n\tif (typeof exclusiveMinimum === \"number\") if (ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\") {\n\t\tjson.minimum = exclusiveMinimum;\n\t\tjson.exclusiveMinimum = true;\n\t} else json.exclusiveMinimum = exclusiveMinimum;\n\tif (typeof minimum === \"number\") {\n\t\tjson.minimum = minimum;\n\t\tif (typeof exclusiveMinimum === \"number\" && ctx.target !== \"draft-04\") if (exclusiveMinimum >= minimum) delete json.minimum;\n\t\telse delete json.exclusiveMinimum;\n\t}\n\tif (typeof exclusiveMaximum === \"number\") if (ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\") {\n\t\tjson.maximum = exclusiveMaximum;\n\t\tjson.exclusiveMaximum = true;\n\t} else json.exclusiveMaximum = exclusiveMaximum;\n\tif (typeof maximum === \"number\") {\n\t\tjson.maximum = maximum;\n\t\tif (typeof exclusiveMaximum === \"number\" && ctx.target !== \"draft-04\") if (exclusiveMaximum <= maximum) delete json.maximum;\n\t\telse delete json.exclusiveMaximum;\n\t}\n\tif (typeof multipleOf === \"number\") json.multipleOf = multipleOf;\n};\nconst booleanProcessor = (_schema, _ctx, json, _params) => {\n\tjson.type = \"boolean\";\n};\nconst neverProcessor = (_schema, _ctx, json, _params) => {\n\tjson.not = {};\n};\nconst unknownProcessor = (_schema, _ctx, _json, _params) => {};\nconst enumProcessor = (schema, _ctx, json, _params) => {\n\tconst def = schema._zod.def;\n\tconst values = getEnumValues(def.entries);\n\tif (values.every((v) => typeof v === \"number\")) json.type = \"number\";\n\tif (values.every((v) => typeof v === \"string\")) json.type = \"string\";\n\tjson.enum = values;\n};\nconst literalProcessor = (schema, ctx, json, _params) => {\n\tconst def = schema._zod.def;\n\tconst vals = [];\n\tfor (const val of def.values) if (val === void 0) {\n\t\tif (ctx.unrepresentable === \"throw\") throw new Error(\"Literal `undefined` cannot be represented in JSON Schema\");\n\t} else if (typeof val === \"bigint\") if (ctx.unrepresentable === \"throw\") throw new Error(\"BigInt literals cannot be represented in JSON Schema\");\n\telse vals.push(Number(val));\n\telse vals.push(val);\n\tif (vals.length === 0) {} else if (vals.length === 1) {\n\t\tconst val = vals[0];\n\t\tjson.type = val === null ? \"null\" : typeof val;\n\t\tif (ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\") json.enum = [val];\n\t\telse json.const = val;\n\t} else {\n\t\tif (vals.every((v) => typeof v === \"number\")) json.type = \"number\";\n\t\tif (vals.every((v) => typeof v === \"string\")) json.type = \"string\";\n\t\tif (vals.every((v) => typeof v === \"boolean\")) json.type = \"boolean\";\n\t\tif (vals.every((v) => v === null)) json.type = \"null\";\n\t\tjson.enum = vals;\n\t}\n};\nconst customProcessor = (_schema, ctx, _json, _params) => {\n\tif (ctx.unrepresentable === \"throw\") throw new Error(\"Custom types cannot be represented in JSON Schema\");\n};\nconst transformProcessor = (_schema, ctx, _json, _params) => {\n\tif (ctx.unrepresentable === \"throw\") throw new Error(\"Transforms cannot be represented in JSON Schema\");\n};\nconst arrayProcessor = (schema, ctx, _json, params) => {\n\tconst json = _json;\n\tconst def = schema._zod.def;\n\tconst { minimum, maximum } = schema._zod.bag;\n\tif (typeof minimum === \"number\") json.minItems = minimum;\n\tif (typeof maximum === \"number\") json.maxItems = maximum;\n\tjson.type = \"array\";\n\tjson.items = process$1(def.element, ctx, {\n\t\t...params,\n\t\tpath: [...params.path, \"items\"]\n\t});\n};\nconst objectProcessor = (schema, ctx, _json, params) => {\n\tconst json = _json;\n\tconst def = schema._zod.def;\n\tjson.type = \"object\";\n\tjson.properties = {};\n\tconst shape = def.shape;\n\tfor (const key in shape) json.properties[key] = process$1(shape[key], ctx, {\n\t\t...params,\n\t\tpath: [\n\t\t\t...params.path,\n\t\t\t\"properties\",\n\t\t\tkey\n\t\t]\n\t});\n\tconst allKeys = new Set(Object.keys(shape));\n\tconst requiredKeys = new Set([...allKeys].filter((key) => {\n\t\tconst v = def.shape[key]._zod;\n\t\tif (ctx.io === \"input\") return v.optin === void 0;\n\t\telse return v.optout === void 0;\n\t}));\n\tif (requiredKeys.size > 0) json.required = Array.from(requiredKeys);\n\tif (def.catchall?._zod.def.type === \"never\") json.additionalProperties = false;\n\telse if (!def.catchall) {\n\t\tif (ctx.io === \"output\") json.additionalProperties = false;\n\t} else if (def.catchall) json.additionalProperties = process$1(def.catchall, ctx, {\n\t\t...params,\n\t\tpath: [...params.path, \"additionalProperties\"]\n\t});\n};\nconst unionProcessor = (schema, ctx, json, params) => {\n\tconst def = schema._zod.def;\n\tconst isExclusive = def.inclusive === false;\n\tconst options = def.options.map((x, i) => process$1(x, ctx, {\n\t\t...params,\n\t\tpath: [\n\t\t\t...params.path,\n\t\t\tisExclusive ? \"oneOf\" : \"anyOf\",\n\t\t\ti\n\t\t]\n\t}));\n\tif (isExclusive) json.oneOf = options;\n\telse json.anyOf = options;\n};\nconst intersectionProcessor = (schema, ctx, json, params) => {\n\tconst def = schema._zod.def;\n\tconst a = process$1(def.left, ctx, {\n\t\t...params,\n\t\tpath: [\n\t\t\t...params.path,\n\t\t\t\"allOf\",\n\t\t\t0\n\t\t]\n\t});\n\tconst b = process$1(def.right, ctx, {\n\t\t...params,\n\t\tpath: [\n\t\t\t...params.path,\n\t\t\t\"allOf\",\n\t\t\t1\n\t\t]\n\t});\n\tconst isSimpleIntersection = (val) => \"allOf\" in val && Object.keys(val).length === 1;\n\tjson.allOf = [...isSimpleIntersection(a) ? a.allOf : [a], ...isSimpleIntersection(b) ? b.allOf : [b]];\n};\nconst recordProcessor = (schema, ctx, _json, params) => {\n\tconst json = _json;\n\tconst def = schema._zod.def;\n\tjson.type = \"object\";\n\tconst keyType = def.keyType;\n\tconst patterns = keyType._zod.bag?.patterns;\n\tif (def.mode === \"loose\" && patterns && patterns.size > 0) {\n\t\tconst valueSchema = process$1(def.valueType, ctx, {\n\t\t\t...params,\n\t\t\tpath: [\n\t\t\t\t...params.path,\n\t\t\t\t\"patternProperties\",\n\t\t\t\t\"*\"\n\t\t\t]\n\t\t});\n\t\tjson.patternProperties = {};\n\t\tfor (const pattern of patterns) json.patternProperties[pattern.source] = valueSchema;\n\t} else {\n\t\tif (ctx.target === \"draft-07\" || ctx.target === \"draft-2020-12\") json.propertyNames = process$1(def.keyType, ctx, {\n\t\t\t...params,\n\t\t\tpath: [...params.path, \"propertyNames\"]\n\t\t});\n\t\tjson.additionalProperties = process$1(def.valueType, ctx, {\n\t\t\t...params,\n\t\t\tpath: [...params.path, \"additionalProperties\"]\n\t\t});\n\t}\n\tconst keyValues = keyType._zod.values;\n\tif (keyValues) {\n\t\tconst validKeyValues = [...keyValues].filter((v) => typeof v === \"string\" || typeof v === \"number\");\n\t\tif (validKeyValues.length > 0) json.required = validKeyValues;\n\t}\n};\nconst nullableProcessor = (schema, ctx, json, params) => {\n\tconst def = schema._zod.def;\n\tconst inner = process$1(def.innerType, ctx, params);\n\tconst seen = ctx.seen.get(schema);\n\tif (ctx.target === \"openapi-3.0\") {\n\t\tseen.ref = def.innerType;\n\t\tjson.nullable = true;\n\t} else json.anyOf = [inner, { type: \"null\" }];\n};\nconst nonoptionalProcessor = (schema, ctx, _json, params) => {\n\tconst def = schema._zod.def;\n\tprocess$1(def.innerType, ctx, params);\n\tconst seen = ctx.seen.get(schema);\n\tseen.ref = def.innerType;\n};\nconst defaultProcessor = (schema, ctx, json, params) => {\n\tconst def = schema._zod.def;\n\tprocess$1(def.innerType, ctx, params);\n\tconst seen = ctx.seen.get(schema);\n\tseen.ref = def.innerType;\n\tjson.default = JSON.parse(JSON.stringify(def.defaultValue));\n};\nconst prefaultProcessor = (schema, ctx, json, params) => {\n\tconst def = schema._zod.def;\n\tprocess$1(def.innerType, ctx, params);\n\tconst seen = ctx.seen.get(schema);\n\tseen.ref = def.innerType;\n\tif (ctx.io === \"input\") json._prefault = JSON.parse(JSON.stringify(def.defaultValue));\n};\nconst catchProcessor = (schema, ctx, json, params) => {\n\tconst def = schema._zod.def;\n\tprocess$1(def.innerType, ctx, params);\n\tconst seen = ctx.seen.get(schema);\n\tseen.ref = def.innerType;\n\tlet catchValue;\n\ttry {\n\t\tcatchValue = def.catchValue(void 0);\n\t} catch {\n\t\tthrow new Error(\"Dynamic catch values are not supported in JSON Schema\");\n\t}\n\tjson.default = catchValue;\n};\nconst pipeProcessor = (schema, ctx, _json, params) => {\n\tconst def = schema._zod.def;\n\tconst innerType = ctx.io === \"input\" ? def.in._zod.def.type === \"transform\" ? def.out : def.in : def.out;\n\tprocess$1(innerType, ctx, params);\n\tconst seen = ctx.seen.get(schema);\n\tseen.ref = innerType;\n};\nconst readonlyProcessor = (schema, ctx, json, params) => {\n\tconst def = schema._zod.def;\n\tprocess$1(def.innerType, ctx, params);\n\tconst seen = ctx.seen.get(schema);\n\tseen.ref = def.innerType;\n\tjson.readOnly = true;\n};\nconst optionalProcessor = (schema, ctx, _json, params) => {\n\tconst def = schema._zod.def;\n\tprocess$1(def.innerType, ctx, params);\n\tconst seen = ctx.seen.get(schema);\n\tseen.ref = def.innerType;\n};\n//#endregion\n//#region ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/iso.js\nconst ZodISODateTime = /* @__PURE__ */ $constructor(\"ZodISODateTime\", (inst, def) => {\n\t$ZodISODateTime.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nfunction datetime(params) {\n\treturn /* @__PURE__ */ _isoDateTime(ZodISODateTime, params);\n}\nconst ZodISODate = /* @__PURE__ */ $constructor(\"ZodISODate\", (inst, def) => {\n\t$ZodISODate.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nfunction date(params) {\n\treturn /* @__PURE__ */ _isoDate(ZodISODate, params);\n}\nconst ZodISOTime = /* @__PURE__ */ $constructor(\"ZodISOTime\", (inst, def) => {\n\t$ZodISOTime.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nfunction time(params) {\n\treturn /* @__PURE__ */ _isoTime(ZodISOTime, params);\n}\nconst ZodISODuration = /* @__PURE__ */ $constructor(\"ZodISODuration\", (inst, def) => {\n\t$ZodISODuration.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nfunction duration(params) {\n\treturn /* @__PURE__ */ _isoDuration(ZodISODuration, params);\n}\n//#endregion\n//#region ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/errors.js\nconst initializer = (inst, issues) => {\n\t$ZodError.init(inst, issues);\n\tinst.name = \"ZodError\";\n\tObject.defineProperties(inst, {\n\t\tformat: { value: (mapper) => formatError(inst, mapper) },\n\t\tflatten: { value: (mapper) => flattenError(inst, mapper) },\n\t\taddIssue: { value: (issue) => {\n\t\t\tinst.issues.push(issue);\n\t\t\tinst.message = JSON.stringify(inst.issues, jsonStringifyReplacer, 2);\n\t\t} },\n\t\taddIssues: { value: (issues) => {\n\t\t\tinst.issues.push(...issues);\n\t\t\tinst.message = JSON.stringify(inst.issues, jsonStringifyReplacer, 2);\n\t\t} },\n\t\tisEmpty: { get() {\n\t\t\treturn inst.issues.length === 0;\n\t\t} }\n\t});\n};\n$constructor(\"ZodError\", initializer);\nconst ZodRealError = $constructor(\"ZodError\", initializer, { Parent: Error });\n//#endregion\n//#region ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/parse.js\nconst parse = /* @__PURE__ */ _parse(ZodRealError);\nconst parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError);\nconst safeParse = /* @__PURE__ */ _safeParse(ZodRealError);\nconst safeParseAsync = /* @__PURE__ */ _safeParseAsync(ZodRealError);\nconst encode = /* @__PURE__ */ _encode(ZodRealError);\nconst decode = /* @__PURE__ */ _decode(ZodRealError);\nconst encodeAsync = /* @__PURE__ */ _encodeAsync(ZodRealError);\nconst decodeAsync = /* @__PURE__ */ _decodeAsync(ZodRealError);\nconst safeEncode = /* @__PURE__ */ _safeEncode(ZodRealError);\nconst safeDecode = /* @__PURE__ */ _safeDecode(ZodRealError);\nconst safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);\nconst safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);\n//#endregion\n//#region ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/schemas.js\nconst ZodType = /* @__PURE__ */ $constructor(\"ZodType\", (inst, def) => {\n\t$ZodType.init(inst, def);\n\tObject.assign(inst[\"~standard\"], { jsonSchema: {\n\t\tinput: createStandardJSONSchemaMethod(inst, \"input\"),\n\t\toutput: createStandardJSONSchemaMethod(inst, \"output\")\n\t} });\n\tinst.toJSONSchema = createToJSONSchemaMethod(inst, {});\n\tinst.def = def;\n\tinst.type = def.type;\n\tObject.defineProperty(inst, \"_def\", { value: def });\n\tinst.check = (...checks) => {\n\t\treturn inst.clone(mergeDefs(def, { checks: [...def.checks ?? [], ...checks.map((ch) => typeof ch === \"function\" ? { _zod: {\n\t\t\tcheck: ch,\n\t\t\tdef: { check: \"custom\" },\n\t\t\tonattach: []\n\t\t} } : ch)] }), { parent: true });\n\t};\n\tinst.with = inst.check;\n\tinst.clone = (def, params) => clone(inst, def, params);\n\tinst.brand = () => inst;\n\tinst.register = ((reg, meta) => {\n\t\treg.add(inst, meta);\n\t\treturn inst;\n\t});\n\tinst.parse = (data, params) => parse(inst, data, params, { callee: inst.parse });\n\tinst.safeParse = (data, params) => safeParse(inst, data, params);\n\tinst.parseAsync = async (data, params) => parseAsync(inst, data, params, { callee: inst.parseAsync });\n\tinst.safeParseAsync = async (data, params) => safeParseAsync(inst, data, params);\n\tinst.spa = inst.safeParseAsync;\n\tinst.encode = (data, params) => encode(inst, data, params);\n\tinst.decode = (data, params) => decode(inst, data, params);\n\tinst.encodeAsync = async (data, params) => encodeAsync(inst, data, params);\n\tinst.decodeAsync = async (data, params) => decodeAsync(inst, data, params);\n\tinst.safeEncode = (data, params) => safeEncode(inst, data, params);\n\tinst.safeDecode = (data, params) => safeDecode(inst, data, params);\n\tinst.safeEncodeAsync = async (data, params) => safeEncodeAsync(inst, data, params);\n\tinst.safeDecodeAsync = async (data, params) => safeDecodeAsync(inst, data, params);\n\tinst.refine = (check, params) => inst.check(refine(check, params));\n\tinst.superRefine = (refinement) => inst.check(superRefine(refinement));\n\tinst.overwrite = (fn) => inst.check(/* @__PURE__ */ _overwrite(fn));\n\tinst.optional = () => optional(inst);\n\tinst.exactOptional = () => exactOptional(inst);\n\tinst.nullable = () => nullable(inst);\n\tinst.nullish = () => optional(nullable(inst));\n\tinst.nonoptional = (params) => nonoptional(inst, params);\n\tinst.array = () => array(inst);\n\tinst.or = (arg) => union([inst, arg]);\n\tinst.and = (arg) => intersection(inst, arg);\n\tinst.transform = (tx) => pipe(inst, transform(tx));\n\tinst.default = (def) => _default(inst, def);\n\tinst.prefault = (def) => prefault(inst, def);\n\tinst.catch = (params) => _catch(inst, params);\n\tinst.pipe = (target) => pipe(inst, target);\n\tinst.readonly = () => readonly(inst);\n\tinst.describe = (description) => {\n\t\tconst cl = inst.clone();\n\t\tglobalRegistry.add(cl, { description });\n\t\treturn cl;\n\t};\n\tObject.defineProperty(inst, \"description\", {\n\t\tget() {\n\t\t\treturn globalRegistry.get(inst)?.description;\n\t\t},\n\t\tconfigurable: true\n\t});\n\tinst.meta = (...args) => {\n\t\tif (args.length === 0) return globalRegistry.get(inst);\n\t\tconst cl = inst.clone();\n\t\tglobalRegistry.add(cl, args[0]);\n\t\treturn cl;\n\t};\n\tinst.isOptional = () => inst.safeParse(void 0).success;\n\tinst.isNullable = () => inst.safeParse(null).success;\n\tinst.apply = (fn) => fn(inst);\n\treturn inst;\n});\n/** @internal */\nconst _ZodString = /* @__PURE__ */ $constructor(\"_ZodString\", (inst, def) => {\n\t$ZodString.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => stringProcessor(inst, ctx, json, params);\n\tconst bag = inst._zod.bag;\n\tinst.format = bag.format ?? null;\n\tinst.minLength = bag.minimum ?? null;\n\tinst.maxLength = bag.maximum ?? null;\n\tinst.regex = (...args) => inst.check(/* @__PURE__ */ _regex(...args));\n\tinst.includes = (...args) => inst.check(/* @__PURE__ */ _includes(...args));\n\tinst.startsWith = (...args) => inst.check(/* @__PURE__ */ _startsWith(...args));\n\tinst.endsWith = (...args) => inst.check(/* @__PURE__ */ _endsWith(...args));\n\tinst.min = (...args) => inst.check(/* @__PURE__ */ _minLength(...args));\n\tinst.max = (...args) => inst.check(/* @__PURE__ */ _maxLength(...args));\n\tinst.length = (...args) => inst.check(/* @__PURE__ */ _length(...args));\n\tinst.nonempty = (...args) => inst.check(/* @__PURE__ */ _minLength(1, ...args));\n\tinst.lowercase = (params) => inst.check(/* @__PURE__ */ _lowercase(params));\n\tinst.uppercase = (params) => inst.check(/* @__PURE__ */ _uppercase(params));\n\tinst.trim = () => inst.check(/* @__PURE__ */ _trim());\n\tinst.normalize = (...args) => inst.check(/* @__PURE__ */ _normalize(...args));\n\tinst.toLowerCase = () => inst.check(/* @__PURE__ */ _toLowerCase());\n\tinst.toUpperCase = () => inst.check(/* @__PURE__ */ _toUpperCase());\n\tinst.slugify = () => inst.check(/* @__PURE__ */ _slugify());\n});\nconst ZodString = /* @__PURE__ */ $constructor(\"ZodString\", (inst, def) => {\n\t$ZodString.init(inst, def);\n\t_ZodString.init(inst, def);\n\tinst.email = (params) => inst.check(/* @__PURE__ */ _email(ZodEmail, params));\n\tinst.url = (params) => inst.check(/* @__PURE__ */ _url(ZodURL, params));\n\tinst.jwt = (params) => inst.check(/* @__PURE__ */ _jwt(ZodJWT, params));\n\tinst.emoji = (params) => inst.check(/* @__PURE__ */ _emoji(ZodEmoji, params));\n\tinst.guid = (params) => inst.check(/* @__PURE__ */ _guid(ZodGUID, params));\n\tinst.uuid = (params) => inst.check(/* @__PURE__ */ _uuid(ZodUUID, params));\n\tinst.uuidv4 = (params) => inst.check(/* @__PURE__ */ _uuidv4(ZodUUID, params));\n\tinst.uuidv6 = (params) => inst.check(/* @__PURE__ */ _uuidv6(ZodUUID, params));\n\tinst.uuidv7 = (params) => inst.check(/* @__PURE__ */ _uuidv7(ZodUUID, params));\n\tinst.nanoid = (params) => inst.check(/* @__PURE__ */ _nanoid(ZodNanoID, params));\n\tinst.guid = (params) => inst.check(/* @__PURE__ */ _guid(ZodGUID, params));\n\tinst.cuid = (params) => inst.check(/* @__PURE__ */ _cuid(ZodCUID, params));\n\tinst.cuid2 = (params) => inst.check(/* @__PURE__ */ _cuid2(ZodCUID2, params));\n\tinst.ulid = (params) => inst.check(/* @__PURE__ */ _ulid(ZodULID, params));\n\tinst.base64 = (params) => inst.check(/* @__PURE__ */ _base64(ZodBase64, params));\n\tinst.base64url = (params) => inst.check(/* @__PURE__ */ _base64url(ZodBase64URL, params));\n\tinst.xid = (params) => inst.check(/* @__PURE__ */ _xid(ZodXID, params));\n\tinst.ksuid = (params) => inst.check(/* @__PURE__ */ _ksuid(ZodKSUID, params));\n\tinst.ipv4 = (params) => inst.check(/* @__PURE__ */ _ipv4(ZodIPv4, params));\n\tinst.ipv6 = (params) => inst.check(/* @__PURE__ */ _ipv6(ZodIPv6, params));\n\tinst.cidrv4 = (params) => inst.check(/* @__PURE__ */ _cidrv4(ZodCIDRv4, params));\n\tinst.cidrv6 = (params) => inst.check(/* @__PURE__ */ _cidrv6(ZodCIDRv6, params));\n\tinst.e164 = (params) => inst.check(/* @__PURE__ */ _e164(ZodE164, params));\n\tinst.datetime = (params) => inst.check(datetime(params));\n\tinst.date = (params) => inst.check(date(params));\n\tinst.time = (params) => inst.check(time(params));\n\tinst.duration = (params) => inst.check(duration(params));\n});\nfunction string(params) {\n\treturn /* @__PURE__ */ _string(ZodString, params);\n}\nconst ZodStringFormat = /* @__PURE__ */ $constructor(\"ZodStringFormat\", (inst, def) => {\n\t$ZodStringFormat.init(inst, def);\n\t_ZodString.init(inst, def);\n});\nconst ZodEmail = /* @__PURE__ */ $constructor(\"ZodEmail\", (inst, def) => {\n\t$ZodEmail.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nconst ZodGUID = /* @__PURE__ */ $constructor(\"ZodGUID\", (inst, def) => {\n\t$ZodGUID.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nconst ZodUUID = /* @__PURE__ */ $constructor(\"ZodUUID\", (inst, def) => {\n\t$ZodUUID.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nconst ZodURL = /* @__PURE__ */ $constructor(\"ZodURL\", (inst, def) => {\n\t$ZodURL.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nconst ZodEmoji = /* @__PURE__ */ $constructor(\"ZodEmoji\", (inst, def) => {\n\t$ZodEmoji.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nconst ZodNanoID = /* @__PURE__ */ $constructor(\"ZodNanoID\", (inst, def) => {\n\t$ZodNanoID.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nconst ZodCUID = /* @__PURE__ */ $constructor(\"ZodCUID\", (inst, def) => {\n\t$ZodCUID.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nconst ZodCUID2 = /* @__PURE__ */ $constructor(\"ZodCUID2\", (inst, def) => {\n\t$ZodCUID2.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nconst ZodULID = /* @__PURE__ */ $constructor(\"ZodULID\", (inst, def) => {\n\t$ZodULID.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nconst ZodXID = /* @__PURE__ */ $constructor(\"ZodXID\", (inst, def) => {\n\t$ZodXID.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nconst ZodKSUID = /* @__PURE__ */ $constructor(\"ZodKSUID\", (inst, def) => {\n\t$ZodKSUID.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nconst ZodIPv4 = /* @__PURE__ */ $constructor(\"ZodIPv4\", (inst, def) => {\n\t$ZodIPv4.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nconst ZodIPv6 = /* @__PURE__ */ $constructor(\"ZodIPv6\", (inst, def) => {\n\t$ZodIPv6.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nconst ZodCIDRv4 = /* @__PURE__ */ $constructor(\"ZodCIDRv4\", (inst, def) => {\n\t$ZodCIDRv4.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nconst ZodCIDRv6 = /* @__PURE__ */ $constructor(\"ZodCIDRv6\", (inst, def) => {\n\t$ZodCIDRv6.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nconst ZodBase64 = /* @__PURE__ */ $constructor(\"ZodBase64\", (inst, def) => {\n\t$ZodBase64.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nconst ZodBase64URL = /* @__PURE__ */ $constructor(\"ZodBase64URL\", (inst, def) => {\n\t$ZodBase64URL.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nconst ZodE164 = /* @__PURE__ */ $constructor(\"ZodE164\", (inst, def) => {\n\t$ZodE164.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nconst ZodJWT = /* @__PURE__ */ $constructor(\"ZodJWT\", (inst, def) => {\n\t$ZodJWT.init(inst, def);\n\tZodStringFormat.init(inst, def);\n});\nconst ZodNumber = /* @__PURE__ */ $constructor(\"ZodNumber\", (inst, def) => {\n\t$ZodNumber.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => numberProcessor(inst, ctx, json, params);\n\tinst.gt = (value, params) => inst.check(/* @__PURE__ */ _gt(value, params));\n\tinst.gte = (value, params) => inst.check(/* @__PURE__ */ _gte(value, params));\n\tinst.min = (value, params) => inst.check(/* @__PURE__ */ _gte(value, params));\n\tinst.lt = (value, params) => inst.check(/* @__PURE__ */ _lt(value, params));\n\tinst.lte = (value, params) => inst.check(/* @__PURE__ */ _lte(value, params));\n\tinst.max = (value, params) => inst.check(/* @__PURE__ */ _lte(value, params));\n\tinst.int = (params) => inst.check(int(params));\n\tinst.safe = (params) => inst.check(int(params));\n\tinst.positive = (params) => inst.check(/* @__PURE__ */ _gt(0, params));\n\tinst.nonnegative = (params) => inst.check(/* @__PURE__ */ _gte(0, params));\n\tinst.negative = (params) => inst.check(/* @__PURE__ */ _lt(0, params));\n\tinst.nonpositive = (params) => inst.check(/* @__PURE__ */ _lte(0, params));\n\tinst.multipleOf = (value, params) => inst.check(/* @__PURE__ */ _multipleOf(value, params));\n\tinst.step = (value, params) => inst.check(/* @__PURE__ */ _multipleOf(value, params));\n\tinst.finite = () => inst;\n\tconst bag = inst._zod.bag;\n\tinst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;\n\tinst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;\n\tinst.isInt = (bag.format ?? \"\").includes(\"int\") || Number.isSafeInteger(bag.multipleOf ?? .5);\n\tinst.isFinite = true;\n\tinst.format = bag.format ?? null;\n});\nfunction number(params) {\n\treturn /* @__PURE__ */ _number(ZodNumber, params);\n}\nconst ZodNumberFormat = /* @__PURE__ */ $constructor(\"ZodNumberFormat\", (inst, def) => {\n\t$ZodNumberFormat.init(inst, def);\n\tZodNumber.init(inst, def);\n});\nfunction int(params) {\n\treturn /* @__PURE__ */ _int(ZodNumberFormat, params);\n}\nconst ZodBoolean = /* @__PURE__ */ $constructor(\"ZodBoolean\", (inst, def) => {\n\t$ZodBoolean.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => booleanProcessor(inst, ctx, json, params);\n});\nfunction boolean(params) {\n\treturn /* @__PURE__ */ _boolean(ZodBoolean, params);\n}\nconst ZodUnknown = /* @__PURE__ */ $constructor(\"ZodUnknown\", (inst, def) => {\n\t$ZodUnknown.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => unknownProcessor(inst, ctx, json, params);\n});\nfunction unknown() {\n\treturn /* @__PURE__ */ _unknown(ZodUnknown);\n}\nconst ZodNever = /* @__PURE__ */ $constructor(\"ZodNever\", (inst, def) => {\n\t$ZodNever.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => neverProcessor(inst, ctx, json, params);\n});\nfunction never(params) {\n\treturn /* @__PURE__ */ _never(ZodNever, params);\n}\nconst ZodArray = /* @__PURE__ */ $constructor(\"ZodArray\", (inst, def) => {\n\t$ZodArray.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => arrayProcessor(inst, ctx, json, params);\n\tinst.element = def.element;\n\tinst.min = (minLength, params) => inst.check(/* @__PURE__ */ _minLength(minLength, params));\n\tinst.nonempty = (params) => inst.check(/* @__PURE__ */ _minLength(1, params));\n\tinst.max = (maxLength, params) => inst.check(/* @__PURE__ */ _maxLength(maxLength, params));\n\tinst.length = (len, params) => inst.check(/* @__PURE__ */ _length(len, params));\n\tinst.unwrap = () => inst.element;\n});\nfunction array(element, params) {\n\treturn /* @__PURE__ */ _array(ZodArray, element, params);\n}\nconst ZodObject = /* @__PURE__ */ $constructor(\"ZodObject\", (inst, def) => {\n\t$ZodObjectJIT.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => objectProcessor(inst, ctx, json, params);\n\tdefineLazy(inst, \"shape\", () => {\n\t\treturn def.shape;\n\t});\n\tinst.keyof = () => _enum(Object.keys(inst._zod.def.shape));\n\tinst.catchall = (catchall) => inst.clone({\n\t\t...inst._zod.def,\n\t\tcatchall\n\t});\n\tinst.passthrough = () => inst.clone({\n\t\t...inst._zod.def,\n\t\tcatchall: unknown()\n\t});\n\tinst.loose = () => inst.clone({\n\t\t...inst._zod.def,\n\t\tcatchall: unknown()\n\t});\n\tinst.strict = () => inst.clone({\n\t\t...inst._zod.def,\n\t\tcatchall: never()\n\t});\n\tinst.strip = () => inst.clone({\n\t\t...inst._zod.def,\n\t\tcatchall: void 0\n\t});\n\tinst.extend = (incoming) => {\n\t\treturn extend(inst, incoming);\n\t};\n\tinst.safeExtend = (incoming) => {\n\t\treturn safeExtend(inst, incoming);\n\t};\n\tinst.merge = (other) => merge(inst, other);\n\tinst.pick = (mask) => pick(inst, mask);\n\tinst.omit = (mask) => omit(inst, mask);\n\tinst.partial = (...args) => partial(ZodOptional, inst, args[0]);\n\tinst.required = (...args) => required(ZodNonOptional, inst, args[0]);\n});\nfunction object(shape, params) {\n\treturn new ZodObject({\n\t\ttype: \"object\",\n\t\tshape: shape ?? {},\n\t\t...normalizeParams(params)\n\t});\n}\nconst ZodUnion = /* @__PURE__ */ $constructor(\"ZodUnion\", (inst, def) => {\n\t$ZodUnion.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => unionProcessor(inst, ctx, json, params);\n\tinst.options = def.options;\n});\nfunction union(options, params) {\n\treturn new ZodUnion({\n\t\ttype: \"union\",\n\t\toptions,\n\t\t...normalizeParams(params)\n\t});\n}\nconst ZodDiscriminatedUnion = /* @__PURE__ */ $constructor(\"ZodDiscriminatedUnion\", (inst, def) => {\n\tZodUnion.init(inst, def);\n\t$ZodDiscriminatedUnion.init(inst, def);\n});\nfunction discriminatedUnion(discriminator, options, params) {\n\treturn new ZodDiscriminatedUnion({\n\t\ttype: \"union\",\n\t\toptions,\n\t\tdiscriminator,\n\t\t...normalizeParams(params)\n\t});\n}\nconst ZodIntersection = /* @__PURE__ */ $constructor(\"ZodIntersection\", (inst, def) => {\n\t$ZodIntersection.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => intersectionProcessor(inst, ctx, json, params);\n});\nfunction intersection(left, right) {\n\treturn new ZodIntersection({\n\t\ttype: \"intersection\",\n\t\tleft,\n\t\tright\n\t});\n}\nconst ZodRecord = /* @__PURE__ */ $constructor(\"ZodRecord\", (inst, def) => {\n\t$ZodRecord.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => recordProcessor(inst, ctx, json, params);\n\tinst.keyType = def.keyType;\n\tinst.valueType = def.valueType;\n});\nfunction record(keyType, valueType, params) {\n\treturn new ZodRecord({\n\t\ttype: \"record\",\n\t\tkeyType,\n\t\tvalueType,\n\t\t...normalizeParams(params)\n\t});\n}\nconst ZodEnum = /* @__PURE__ */ $constructor(\"ZodEnum\", (inst, def) => {\n\t$ZodEnum.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => enumProcessor(inst, ctx, json, params);\n\tinst.enum = def.entries;\n\tinst.options = Object.values(def.entries);\n\tconst keys = new Set(Object.keys(def.entries));\n\tinst.extract = (values, params) => {\n\t\tconst newEntries = {};\n\t\tfor (const value of values) if (keys.has(value)) newEntries[value] = def.entries[value];\n\t\telse throw new Error(`Key ${value} not found in enum`);\n\t\treturn new ZodEnum({\n\t\t\t...def,\n\t\t\tchecks: [],\n\t\t\t...normalizeParams(params),\n\t\t\tentries: newEntries\n\t\t});\n\t};\n\tinst.exclude = (values, params) => {\n\t\tconst newEntries = { ...def.entries };\n\t\tfor (const value of values) if (keys.has(value)) delete newEntries[value];\n\t\telse throw new Error(`Key ${value} not found in enum`);\n\t\treturn new ZodEnum({\n\t\t\t...def,\n\t\t\tchecks: [],\n\t\t\t...normalizeParams(params),\n\t\t\tentries: newEntries\n\t\t});\n\t};\n});\nfunction _enum(values, params) {\n\treturn new ZodEnum({\n\t\ttype: \"enum\",\n\t\tentries: Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values,\n\t\t...normalizeParams(params)\n\t});\n}\nconst ZodLiteral = /* @__PURE__ */ $constructor(\"ZodLiteral\", (inst, def) => {\n\t$ZodLiteral.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => literalProcessor(inst, ctx, json, params);\n\tinst.values = new Set(def.values);\n\tObject.defineProperty(inst, \"value\", { get() {\n\t\tif (def.values.length > 1) throw new Error(\"This schema contains multiple valid literal values. Use `.values` instead.\");\n\t\treturn def.values[0];\n\t} });\n});\nfunction literal(value, params) {\n\treturn new ZodLiteral({\n\t\ttype: \"literal\",\n\t\tvalues: Array.isArray(value) ? value : [value],\n\t\t...normalizeParams(params)\n\t});\n}\nconst ZodTransform = /* @__PURE__ */ $constructor(\"ZodTransform\", (inst, def) => {\n\t$ZodTransform.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => transformProcessor(inst, ctx, json, params);\n\tinst._zod.parse = (payload, _ctx) => {\n\t\tif (_ctx.direction === \"backward\") throw new $ZodEncodeError(inst.constructor.name);\n\t\tpayload.addIssue = (issue$1) => {\n\t\t\tif (typeof issue$1 === \"string\") payload.issues.push(issue(issue$1, payload.value, def));\n\t\t\telse {\n\t\t\t\tconst _issue = issue$1;\n\t\t\t\tif (_issue.fatal) _issue.continue = false;\n\t\t\t\t_issue.code ?? (_issue.code = \"custom\");\n\t\t\t\t_issue.input ?? (_issue.input = payload.value);\n\t\t\t\t_issue.inst ?? (_issue.inst = inst);\n\t\t\t\tpayload.issues.push(issue(_issue));\n\t\t\t}\n\t\t};\n\t\tconst output = def.transform(payload.value, payload);\n\t\tif (output instanceof Promise) return output.then((output) => {\n\t\t\tpayload.value = output;\n\t\t\treturn payload;\n\t\t});\n\t\tpayload.value = output;\n\t\treturn payload;\n\t};\n});\nfunction transform(fn) {\n\treturn new ZodTransform({\n\t\ttype: \"transform\",\n\t\ttransform: fn\n\t});\n}\nconst ZodOptional = /* @__PURE__ */ $constructor(\"ZodOptional\", (inst, def) => {\n\t$ZodOptional.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => optionalProcessor(inst, ctx, json, params);\n\tinst.unwrap = () => inst._zod.def.innerType;\n});\nfunction optional(innerType) {\n\treturn new ZodOptional({\n\t\ttype: \"optional\",\n\t\tinnerType\n\t});\n}\nconst ZodExactOptional = /* @__PURE__ */ $constructor(\"ZodExactOptional\", (inst, def) => {\n\t$ZodExactOptional.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => optionalProcessor(inst, ctx, json, params);\n\tinst.unwrap = () => inst._zod.def.innerType;\n});\nfunction exactOptional(innerType) {\n\treturn new ZodExactOptional({\n\t\ttype: \"optional\",\n\t\tinnerType\n\t});\n}\nconst ZodNullable = /* @__PURE__ */ $constructor(\"ZodNullable\", (inst, def) => {\n\t$ZodNullable.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => nullableProcessor(inst, ctx, json, params);\n\tinst.unwrap = () => inst._zod.def.innerType;\n});\nfunction nullable(innerType) {\n\treturn new ZodNullable({\n\t\ttype: \"nullable\",\n\t\tinnerType\n\t});\n}\nconst ZodDefault = /* @__PURE__ */ $constructor(\"ZodDefault\", (inst, def) => {\n\t$ZodDefault.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => defaultProcessor(inst, ctx, json, params);\n\tinst.unwrap = () => inst._zod.def.innerType;\n\tinst.removeDefault = inst.unwrap;\n});\nfunction _default(innerType, defaultValue) {\n\treturn new ZodDefault({\n\t\ttype: \"default\",\n\t\tinnerType,\n\t\tget defaultValue() {\n\t\t\treturn typeof defaultValue === \"function\" ? defaultValue() : shallowClone(defaultValue);\n\t\t}\n\t});\n}\nconst ZodPrefault = /* @__PURE__ */ $constructor(\"ZodPrefault\", (inst, def) => {\n\t$ZodPrefault.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => prefaultProcessor(inst, ctx, json, params);\n\tinst.unwrap = () => inst._zod.def.innerType;\n});\nfunction prefault(innerType, defaultValue) {\n\treturn new ZodPrefault({\n\t\ttype: \"prefault\",\n\t\tinnerType,\n\t\tget defaultValue() {\n\t\t\treturn typeof defaultValue === \"function\" ? defaultValue() : shallowClone(defaultValue);\n\t\t}\n\t});\n}\nconst ZodNonOptional = /* @__PURE__ */ $constructor(\"ZodNonOptional\", (inst, def) => {\n\t$ZodNonOptional.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => nonoptionalProcessor(inst, ctx, json, params);\n\tinst.unwrap = () => inst._zod.def.innerType;\n});\nfunction nonoptional(innerType, params) {\n\treturn new ZodNonOptional({\n\t\ttype: \"nonoptional\",\n\t\tinnerType,\n\t\t...normalizeParams(params)\n\t});\n}\nconst ZodCatch = /* @__PURE__ */ $constructor(\"ZodCatch\", (inst, def) => {\n\t$ZodCatch.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => catchProcessor(inst, ctx, json, params);\n\tinst.unwrap = () => inst._zod.def.innerType;\n\tinst.removeCatch = inst.unwrap;\n});\nfunction _catch(innerType, catchValue) {\n\treturn new ZodCatch({\n\t\ttype: \"catch\",\n\t\tinnerType,\n\t\tcatchValue: typeof catchValue === \"function\" ? catchValue : () => catchValue\n\t});\n}\nconst ZodPipe = /* @__PURE__ */ $constructor(\"ZodPipe\", (inst, def) => {\n\t$ZodPipe.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => pipeProcessor(inst, ctx, json, params);\n\tinst.in = def.in;\n\tinst.out = def.out;\n});\nfunction pipe(in_, out) {\n\treturn new ZodPipe({\n\t\ttype: \"pipe\",\n\t\tin: in_,\n\t\tout\n\t});\n}\nconst ZodReadonly = /* @__PURE__ */ $constructor(\"ZodReadonly\", (inst, def) => {\n\t$ZodReadonly.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => readonlyProcessor(inst, ctx, json, params);\n\tinst.unwrap = () => inst._zod.def.innerType;\n});\nfunction readonly(innerType) {\n\treturn new ZodReadonly({\n\t\ttype: \"readonly\",\n\t\tinnerType\n\t});\n}\nconst ZodCustom = /* @__PURE__ */ $constructor(\"ZodCustom\", (inst, def) => {\n\t$ZodCustom.init(inst, def);\n\tZodType.init(inst, def);\n\tinst._zod.processJSONSchema = (ctx, json, params) => customProcessor(inst, ctx, json, params);\n});\nfunction refine(fn, _params = {}) {\n\treturn /* @__PURE__ */ _refine(ZodCustom, fn, _params);\n}\nfunction superRefine(fn) {\n\treturn /* @__PURE__ */ _superRefine(fn);\n}\n//#endregion\n//#region ../internals-schemas/dist/index.js\nconst REGISTRY_URL = process.env.TANK_REGISTRY_URL || \"https://www.tankpkg.dev\";\nconst MANIFEST_FILENAME = \"tank.json\";\nconst LEGACY_MANIFEST_FILENAME = \"skills.json\";\nconst LOCKFILE_FILENAME = \"tank.lock\";\nconst supportLevelSchema = _enum([\n\t\"full\",\n\t\"degraded\",\n\t\"none\"\n]);\nconst adapterCapabilitiesSchema = object({\n\tinstruction: supportLevelSchema,\n\thook: supportLevelSchema,\n\ttool: supportLevelSchema,\n\tagent: supportLevelSchema,\n\trule: supportLevelSchema,\n\tresource: supportLevelSchema,\n\tprompt: supportLevelSchema\n}).strict();\nconst compilationWarningSchema = object({\n\tlevel: _enum([\"degraded\", \"skipped\"]),\n\tatomKind: string(),\n\tmessage: string()\n}).strict();\nobject({\n\tfiles: array(object({\n\t\tpath: string().min(1),\n\t\tcontent: string()\n\t}).strict()),\n\twarnings: array(compilationWarningSchema)\n}).strict();\nobject({\n\tname: string().min(1, \"Adapter name must not be empty\"),\n\tsupportedRange: string().min(1, \"Supported range must not be empty\"),\n\tcapabilities: adapterCapabilitiesSchema\n}).strict();\n_enum([\n\t\"instruction\",\n\t\"hook\",\n\t\"tool\",\n\t\"agent\",\n\t\"rule\",\n\t\"resource\",\n\t\"prompt\"\n]);\nconst extensionBagSchema = record(string(), unknown()).optional();\nconst modelTierSchema = _enum([\n\t\"fast\",\n\t\"balanced\",\n\t\"powerful\",\n\t\"custom\"\n]);\nmodelTierSchema.options;\nconst canonicalToolNameSchema = _enum([\n\t\"bash\",\n\t\"read\",\n\t\"write\",\n\t\"edit\",\n\t\"grep\",\n\t\"glob\",\n\t\"lsp\",\n\t\"mcp\",\n\t\"browser\",\n\t\"fetch\",\n\t\"git\",\n\t\"task\",\n\t\"notebook\"\n]);\ncanonicalToolNameSchema.options;\nconst agentIRSchema = object({\n\tkind: literal(\"agent\"),\n\tname: string().min(1, \"Agent name must not be empty\"),\n\trole: string().min(1, \"Agent role must not be empty\"),\n\ttools: array(canonicalToolNameSchema.or(string().min(1))).optional(),\n\tmodel: modelTierSchema.or(string().min(1)).optional(),\n\treadonly: boolean().optional(),\n\textensions: extensionBagSchema\n}).strict();\nconst hookEventSchema = _enum([\n\t\"pre-tool-use\",\n\t\"post-tool-use\",\n\t\"pre-file-read\",\n\t\"post-file-read\",\n\t\"pre-file-write\",\n\t\"post-file-write\",\n\t\"file-edited\",\n\t\"file-watcher-updated\",\n\t\"pre-command\",\n\t\"post-command\",\n\t\"pre-mcp-tool-use\",\n\t\"post-mcp-tool-use\",\n\t\"session-created\",\n\t\"session-updated\",\n\t\"session-idle\",\n\t\"session-error\",\n\t\"session-deleted\",\n\t\"pre-stop\",\n\t\"task-start\",\n\t\"task-resume\",\n\t\"task-complete\",\n\t\"task-cancel\",\n\t\"pre-user-prompt\",\n\t\"post-response\",\n\t\"message-updated\",\n\t\"message-removed\",\n\t\"system-prompt-transform\",\n\t\"pre-context-compact\",\n\t\"post-context-compact\",\n\t\"permission-asked\",\n\t\"permission-replied\",\n\t\"lsp-diagnostics\",\n\t\"lsp-updated\",\n\t\"subagent-start\",\n\t\"subagent-complete\",\n\t\"subagent-tool-use\",\n\t\"shell-env\",\n\t\"todo-updated\",\n\t\"installation-updated\"\n]);\nhookEventSchema.options;\nconst hookActionIRSchema = object({\n\taction: _enum([\n\t\t\"block\",\n\t\t\"allow\",\n\t\t\"rewrite\",\n\t\t\"injectContext\"\n\t]),\n\tmatch: string().optional(),\n\treason: string().optional(),\n\tvalue: string().optional()\n}).strict();\nconst hookHandlerIRSchema = discriminatedUnion(\"type\", [object({\n\ttype: literal(\"dsl\"),\n\tactions: array(hookActionIRSchema).min(1, \"DSL handler must have at least one action\")\n}).strict(), object({\n\ttype: literal(\"js\"),\n\tentry: string().min(1, \"JS handler entry path must not be empty\")\n}).strict()]);\nconst hookIRSchema = object({\n\tkind: literal(\"hook\"),\n\tname: string().optional(),\n\tevent: hookEventSchema,\n\tmatch: canonicalToolNameSchema.or(string().min(1)).optional(),\n\thandler: hookHandlerIRSchema,\n\tscope: _enum([\"project\", \"global\"]).optional(),\n\textensions: extensionBagSchema\n}).strict();\nconst instructionIRSchema = object({\n\tkind: literal(\"instruction\"),\n\tcontent: string().min(1, \"Content path must not be empty\"),\n\tscope: _enum([\n\t\t\"project\",\n\t\t\"global\",\n\t\t\"directory\"\n\t]).optional(),\n\tglobs: array(string()).optional(),\n\textensions: extensionBagSchema\n}).strict();\nconst networkPermissionsSchema = object({ outbound: array(string()).optional() }).strict();\nconst filesystemPermissionsSchema = object({\n\tread: array(string()).optional(),\n\twrite: array(string()).optional()\n}).strict();\nconst permissionsSchema = object({\n\tnetwork: networkPermissionsSchema.optional(),\n\tfilesystem: filesystemPermissionsSchema.optional(),\n\tsubprocess: boolean().optional()\n}).strict();\n_enum([\"user\", \"admin\"]);\n_enum([\n\t\"active\",\n\t\"suspended\",\n\t\"banned\"\n]);\n_enum([\n\t\"active\",\n\t\"deprecated\",\n\t\"quarantined\",\n\t\"removed\"\n]);\n_enum([\n\t\"user.ban\",\n\t\"user.suspend\",\n\t\"user.unban\",\n\t\"user.promote\",\n\t\"user.demote\",\n\t\"skill.quarantine\",\n\t\"skill.remove\",\n\t\"skill.deprecate\",\n\t\"skill.restore\",\n\t\"skill.feature\",\n\t\"skill.unfeature\",\n\t\"org.suspend\",\n\t\"org.member.remove\",\n\t\"org.delete\"\n]);\nconst promptIRSchema = object({\n\tkind: literal(\"prompt\"),\n\tname: string().min(1, \"Prompt name must not be empty\"),\n\tdescription: string().optional(),\n\ttemplate: string().min(1, \"Prompt template path must not be empty\"),\n\targuments: array(object({\n\t\tname: string(),\n\t\tdescription: string().optional(),\n\t\trequired: boolean().optional()\n\t}).strict()).optional(),\n\textensions: extensionBagSchema\n}).strict();\nconst resourceIRSchema = object({\n\tkind: literal(\"resource\"),\n\tname: string().optional(),\n\turi: string().min(1, \"Resource URI must not be empty\"),\n\tdescription: string().optional(),\n\tmimeType: string().optional(),\n\textensions: extensionBagSchema\n}).strict();\nconst ruleIRSchema = object({\n\tkind: literal(\"rule\"),\n\tname: string().optional(),\n\tevent: hookEventSchema,\n\tmatch: canonicalToolNameSchema.or(string().min(1)).optional(),\n\tpolicy: _enum([\n\t\t\"block\",\n\t\t\"allow\",\n\t\t\"warn\"\n\t]),\n\treason: string().optional(),\n\textensions: extensionBagSchema\n}).strict();\nconst mcpServerConfigSchema = object({\n\tcommand: string().min(1).optional(),\n\targs: array(string()).optional(),\n\tenv: record(string(), string()).optional(),\n\truntime: string().min(1).optional(),\n\tentry: string().min(1).optional()\n}).strict().refine((data) => data.command || data.runtime && data.entry, \"MCP config must have either \\\"command\\\" or both \\\"runtime\\\" and \\\"entry\\\"\");\nconst toolIRSchema = object({\n\tkind: literal(\"tool\"),\n\tname: string().min(1, \"Tool name must not be empty\"),\n\tdescription: string().optional(),\n\tmcp: mcpServerConfigSchema.optional(),\n\textensions: extensionBagSchema\n}).strict();\nconst NAME_PATTERN = /^@[a-z0-9-]+\\/[a-z0-9][a-z0-9-]*$/;\nconst SEMVER_PATTERN = /^\\d+\\.\\d+\\.\\d+(-[a-zA-Z0-9.-]+)?(\\+[a-zA-Z0-9.-]+)?$/;\nconst atomIRSchema = discriminatedUnion(\"kind\", [\n\tinstructionIRSchema,\n\thookIRSchema,\n\ttoolIRSchema,\n\tagentIRSchema,\n\truleIRSchema,\n\tresourceIRSchema,\n\tpromptIRSchema\n]);\nobject({\n\tname: string().min(1, \"Name must not be empty\").max(214, `Name must be 214 characters or fewer`).regex(NAME_PATTERN, \"Name must be scoped (@org/name), lowercase alphanumeric and hyphens\"),\n\tversion: string().regex(SEMVER_PATTERN, \"Version must be valid semver\"),\n\tdescription: string().max(500).optional(),\n\tatoms: array(atomIRSchema),\n\tincludes: array(string()).optional(),\n\tskills: record(string(), string()).optional(),\n\tpermissions: permissionsSchema.optional(),\n\trepository: string().url(\"Repository must be a valid URL\").optional(),\n\tvisibility: _enum([\"public\", \"private\"]).optional(),\n\taudit: object({ min_score: number().min(0).max(10) }).strict().optional()\n}).strict();\nconst commandSchema = string().min(1, \"command must not be empty\");\nconst argSchema = array(string()).default([]);\nconst envSchema = record(string(), string()).optional();\nconst remoteUrlSchema = string().url(\"remote must be a valid URL\");\nconst mcpServerSchema = union([object({\n\tcommand: commandSchema,\n\targs: argSchema,\n\tenv: envSchema,\n\trequires_auth: literal(false).optional()\n}).strict(), object({\n\tremote: remoteUrlSchema,\n\trequires_auth: boolean().default(false),\n\tenv: envSchema\n}).strict()]);\nconst perToolOverrideSchema = object({\n\tscan: boolean().optional(),\n\tblockOnMatch: boolean().optional()\n}).strict();\nobject({\n\tperfBudgetMs: number().positive().optional(),\n\tblockOnMatch: boolean().optional(),\n\tresetPinsOnMismatch: boolean().optional(),\n\tperTool: record(string(), perToolOverrideSchema).optional()\n}).strict();\nconst baseManifestFields = {\n\tname: string().min(1, \"Name must not be empty\").max(214, `Name must be 214 characters or fewer`).regex(/^@[a-z0-9-]+\\/[a-z0-9][a-z0-9-]*$/, \"Name must be scoped (@org/name), lowercase alphanumeric and hyphens\"),\n\tversion: string().regex(/^\\d+\\.\\d+\\.\\d+(-[a-zA-Z0-9.-]+)?(\\+[a-zA-Z0-9.-]+)?$/, \"Version must be valid semver\"),\n\tdescription: string().max(500, `Description must be 500 characters or fewer`).optional(),\n\tskills: record(string(), string()).optional(),\n\tpermissions: permissionsSchema.optional(),\n\trepository: string().url(\"Repository must be a valid URL\").optional(),\n\tvisibility: _enum([\"public\", \"private\"]).optional(),\n\taudit: object({ min_score: number().min(0).max(10) }).strict().optional(),\n\tmcp_server: mcpServerSchema.optional()\n};\nobject(baseManifestFields).strict();\nobject({\n\t...baseManifestFields,\n\tatoms: array(record(string(), unknown())).optional(),\n\tincludes: array(string()).optional()\n}).strict();\nconst SKILL_SOURCES = [\n\t\"registry\",\n\t\"github\",\n\t\"clawhub\",\n\t\"skills_sh\",\n\t\"agentskills_il\",\n\t\"npm\",\n\t\"local\"\n];\nconst SCAN_VERDICTS = [\n\t\"pass\",\n\t\"pass_with_notes\",\n\t\"flagged\",\n\t\"fail\",\n\t\"error\"\n];\nconst lockedSkillV1Schema = object({\n\tresolved: string().url(),\n\tintegrity: string().regex(/^sha512-/, \"Integrity must start with sha512-\"),\n\tpermissions: permissionsSchema,\n\taudit_score: number().min(0).max(10).nullable()\n});\nobject({\n\tlockfileVersion: literal(1),\n\tskills: record(string(), lockedSkillV1Schema)\n});\nconst lockedSkillSchema = object({\n\tresolved: string().url(),\n\tintegrity: string().regex(/^sha512-/, \"Integrity must start with sha512-\"),\n\tpermissions: permissionsSchema,\n\taudit_score: number().min(0).max(10).nullable(),\n\tdependencies: record(string(), string()).optional(),\n\tsource: _enum(SKILL_SOURCES).optional(),\n\tscan_verdict: _enum(SCAN_VERDICTS).optional(),\n\tscanned_at: string().optional()\n});\nobject({\n\tlockfileVersion: union([literal(1), literal(2)]),\n\tskills: record(string(), lockedSkillSchema)\n});\n//#endregion\n//#region src/constants.ts\nconst SDK_VERSION = \"0.10.6\";\nconst DEFAULT_CONFIG_DIR = \"~/.tank\";\nconst DEFAULT_MAX_RETRIES = 3;\nconst DEFAULT_TIMEOUT_MS = 3e4;\nconst SUPPORTED_AGENTS = [\n\t\"opencode\",\n\t\"cursor\",\n\t\"windsurf\",\n\t\"claude-code\",\n\t\"codex\"\n];\nconst AGENT_PATHS = {\n\topencode: \".opencode\",\n\tcursor: \".cursor\",\n\twindsurf: \".windsurf\",\n\t\"claude-code\": \".claude\",\n\tcodex: \".codex\"\n};\n//#endregion\n//#region src/errors.ts\n/**\n* Base error for all Tank SDK errors.\n* All typed errors extend this — catch TankError to handle any SDK failure.\n*/\nvar TankError = class extends Error {\n\t/** HTTP status code (if applicable) */\n\tstatus;\n\t/** Original cause of the error */\n\tcause;\n\tconstructor(message, options) {\n\t\tsuper(message, options?.cause ? { cause: options.cause } : void 0);\n\t\tthis.name = \"TankError\";\n\t\tthis.status = options?.status;\n\t\tif (options?.cause) this.cause = options.cause;\n\t}\n};\n/** Thrown when authentication fails (401). */\nvar TankAuthError = class extends TankError {\n\tconstructor(message = \"Authentication failed. Valid API key required.\") {\n\t\tsuper(message, { status: 401 });\n\t\tthis.name = \"TankAuthError\";\n\t}\n};\n/** Thrown when a requested resource is not found (404). */\nvar TankNotFoundError = class extends TankError {\n\t/** The skill name that was not found (if applicable) */\n\tskillName;\n\tconstructor(message, skillName) {\n\t\tsuper(message, { status: 404 });\n\t\tthis.name = \"TankNotFoundError\";\n\t\tthis.skillName = skillName;\n\t}\n};\n/** Thrown when the user lacks permission for an action (403). */\nvar TankPermissionError = class extends TankError {\n\t/** Required permissions that exceeded the budget */\n\trequired;\n\t/** Allowed permissions in the project budget */\n\tallowed;\n\tconstructor(message, details) {\n\t\tsuper(message, { status: 403 });\n\t\tthis.name = \"TankPermissionError\";\n\t\tthis.required = details?.required;\n\t\tthis.allowed = details?.allowed;\n\t}\n};\n/** Thrown when a network request fails (connection, timeout, DNS). */\nvar TankNetworkError = class extends TankError {\n\tconstructor(message, cause) {\n\t\tsuper(message, { cause });\n\t\tthis.name = \"TankNetworkError\";\n\t}\n};\n/** Thrown when SHA-512 integrity verification fails. */\nvar TankIntegrityError = class extends TankError {\n\t/** Expected integrity hash */\n\texpected;\n\t/** Actual computed hash */\n\tactual;\n\tconstructor(message, details) {\n\t\tsuper(message);\n\t\tthis.name = \"TankIntegrityError\";\n\t\tthis.expected = details?.expected;\n\t\tthis.actual = details?.actual;\n\t}\n};\n/** Thrown when dependency resolution encounters a conflict. */\nvar TankConflictError = class extends TankError {\n\t/** Details about the resolution failure */\n\tdetails;\n\tconstructor(message, details) {\n\t\tsuper(message, { status: 409 });\n\t\tthis.name = \"TankConflictError\";\n\t\tthis.details = details;\n\t}\n};\n//#endregion\n//#region src/client.ts\nfunction resolveConfigDir(configDir) {\n\tif (configDir) return configDir.replace(/^~/, os.homedir());\n\treturn path.join(os.homedir(), \".tank\");\n}\nfunction readConfigFile(configDir) {\n\ttry {\n\t\tconst configPath = path.join(resolveConfigDir(configDir), \"config.json\");\n\t\tconst raw = fs.readFileSync(configPath, \"utf-8\");\n\t\treturn JSON.parse(raw);\n\t} catch {\n\t\treturn {};\n\t}\n}\nfunction resolveToken(options, config) {\n\tif (options.token) return options.token;\n\tconst envToken = process.env.TANK_TOKEN?.trim();\n\tif (envToken) return envToken;\n\treturn config.token;\n}\nfunction parseRegistryOrigin(raw) {\n\tlet url;\n\ttry {\n\t\turl = new URL(raw);\n\t} catch {\n\t\tthrow new Error(`Invalid registry URL: ${raw}`);\n\t}\n\tif (url.username || url.password) throw new Error(`Registry URL must not contain credentials: ${raw}`);\n\tif (url.protocol !== \"https:\" && url.protocol !== \"http:\") throw new Error(`Registry URL must use https or http: ${raw}`);\n\treturn url.origin;\n}\nfunction resolveRegistryUrl(options, config) {\n\treturn parseRegistryOrigin(options.registryUrl || process.env.TANK_REGISTRY_URL?.trim() || config.registry || REGISTRY_URL);\n}\nconst MAX_DOWNLOAD_BYTES$1 = 100 * 1024 * 1024;\nfunction sleep(ms) {\n\treturn new Promise((r) => setTimeout(r, ms));\n}\nvar TankClient = class {\n\ttoken;\n\tregistryUrl;\n\tmaxRetries;\n\ttimeoutMs;\n\tconstructor(options = {}) {\n\t\tconst config = readConfigFile(options.configDir);\n\t\tthis.token = resolveToken(options, config);\n\t\tthis.registryUrl = resolveRegistryUrl(options, config);\n\t\tthis.maxRetries = options.maxRetries ?? 3;\n\t\tthis.timeoutMs = options.timeoutMs ?? 3e4;\n\t}\n\tasync readStreamWithLimit(body, limit) {\n\t\tconst reader = body.getReader();\n\t\tconst chunks = [];\n\t\tlet received = 0;\n\t\twhile (true) {\n\t\t\tconst { done, value } = await reader.read();\n\t\t\tif (done) break;\n\t\t\treceived += value.byteLength;\n\t\t\tif (received > limit) {\n\t\t\t\treader.cancel();\n\t\t\t\tthrow new TankNetworkError(`Response body exceeds ${limit} byte limit`);\n\t\t\t}\n\t\t\tchunks.push(value);\n\t\t}\n\t\treturn Buffer.concat(chunks);\n\t}\n\theaders(hasBody) {\n\t\tconst h = { \"User-Agent\": `tankpkg-sdk/${SDK_VERSION}` };\n\t\tif (this.token) h.Authorization = `Bearer ${this.token}`;\n\t\tif (hasBody) h[\"Content-Type\"] = \"application/json\";\n\t\treturn h;\n\t}\n\tasync request(method, apiPath, body) {\n\t\tconst url = `${this.registryUrl}/api/v1${apiPath}`;\n\t\tlet lastError;\n\t\tfor (let attempt = 0; attempt <= this.maxRetries; attempt++) try {\n\t\t\tconst res = await fetch(url, {\n\t\t\t\tmethod,\n\t\t\t\theaders: this.headers(!!body),\n\t\t\t\tbody: body ? JSON.stringify(body) : void 0,\n\t\t\t\tsignal: AbortSignal.timeout(this.timeoutMs),\n\t\t\t\tredirect: this.token ? \"manual\" : \"follow\"\n\t\t\t});\n\t\t\tif (res.status >= 300 && res.status < 400) throw new TankNetworkError(`Unexpected redirect (${res.status}) from ${url}. Refusing to follow to prevent credential leakage.`);\n\t\t\tif ((res.status === 429 || res.status >= 500) && attempt < this.maxRetries) {\n\t\t\t\tawait sleep(Math.min(1e3 * 2 ** attempt, 3e4));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\treturn res;\n\t\t} catch (err) {\n\t\t\tlastError = err instanceof Error ? err : new Error(String(err));\n\t\t\tif (attempt < this.maxRetries) await sleep(Math.min(1e3 * 2 ** attempt, 3e4));\n\t\t}\n\t\tthrow new TankNetworkError(`Request to ${url} failed after ${this.maxRetries + 1} attempts`, lastError);\n\t}\n\tasync json(method, apiPath, body) {\n\t\tconst res = await this.request(method, apiPath, body);\n\t\tif (res.status === 401) throw new TankAuthError();\n\t\tif (res.status === 403) throw new TankPermissionError((await res.json().catch(() => ({ error: \"Forbidden\" }))).error || \"Permission denied\");\n\t\tif (res.status === 404) throw new TankNotFoundError((await res.json().catch(() => ({ error: \"Not found\" }))).error || \"Not found\");\n\t\tif (!res.ok) {\n\t\t\tconst text = await res.text().catch(() => \"\");\n\t\t\tthrow new TankNetworkError(`HTTP ${res.status}: ${text}`);\n\t\t}\n\t\treturn await res.json();\n\t}\n\tasync search(query, options) {\n\t\tconst params = new URLSearchParams({ q: query });\n\t\tif (options?.page) params.set(\"page\", String(options.page));\n\t\tif (options?.limit) params.set(\"limit\", String(options.limit));\n\t\treturn this.json(\"GET\", `/search?${params}`);\n\t}\n\tasync info(name) {\n\t\treturn this.json(\"GET\", `/skills/${encodeURIComponent(name)}`);\n\t}\n\tasync versions(name) {\n\t\treturn this.json(\"GET\", `/skills/${encodeURIComponent(name)}/versions`);\n\t}\n\tasync download(name, version, options) {\n\t\tconst detail = await this.json(\"GET\", `/skills/${encodeURIComponent(name)}/${version}`);\n\t\tconst dlUrl = new URL(detail.downloadUrl);\n\t\tif (dlUrl.username || dlUrl.password) throw new TankNetworkError(`Download URL must not contain credentials: ${detail.downloadUrl}`);\n\t\tif (dlUrl.protocol !== \"https:\" && dlUrl.protocol !== \"http:\") throw new TankNetworkError(`Download URL must use https or http: ${detail.downloadUrl}`);\n\t\tconst res = await fetch(detail.downloadUrl, {\n\t\t\tsignal: AbortSignal.timeout(this.timeoutMs),\n\t\t\tredirect: \"manual\"\n\t\t});\n\t\tif (res.status >= 300 && res.status < 400) throw new TankNetworkError(`Unexpected redirect (${res.status}) from download URL`);\n\t\tif (!res.ok || !res.body) throw new TankNetworkError(`Failed to download tarball: HTTP ${res.status}`);\n\t\tif (options?.buffer || options?.dest) {\n\t\t\tconst buffer = await this.readStreamWithLimit(res.body, MAX_DOWNLOAD_BYTES$1);\n\t\t\tconst computed = `sha512-${(await import(\"node:crypto\")).createHash(\"sha512\").update(buffer).digest(\"base64\")}`;\n\t\t\tif (detail.integrity && detail.integrity !== \"pending\" && computed !== detail.integrity) throw new TankIntegrityError(\"Integrity verification failed\", {\n\t\t\t\texpected: detail.integrity,\n\t\t\t\tactual: computed\n\t\t\t});\n\t\t\tif (options?.dest) {\n\t\t\t\tconst destDir = options.dest.replace(/^~/, os.homedir());\n\t\t\t\tif (!fs.existsSync(destDir)) fs.mkdirSync(destDir, { recursive: true });\n\t\t\t\tconst filename = `${name.replace(/[/\\\\]/g, \"-\").replace(/\\.\\./g, \"\")}-${version}.tgz`;\n\t\t\t\tconst destPath = path.join(destDir, filename);\n\t\t\t\tfs.writeFileSync(destPath, buffer);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturn buffer;\n\t\t}\n\t\treturn res.body;\n\t}\n\tasync audit(name, version) {\n\t\tif (version) return this.json(\"GET\", `/skills/${encodeURIComponent(name)}/${version}`);\n\t\tconst latest = (await this.info(name)).latestVersion;\n\t\tif (!latest) throw new TankNotFoundError(`No versions found for ${name}`, name);\n\t\treturn this.json(\"GET\", `/skills/${encodeURIComponent(name)}/${latest}`);\n\t}\n\tasync permissions(name, version) {\n\t\treturn (await this.audit(name, version)).permissions;\n\t}\n\tasync whoami() {\n\t\tif (!this.token) return null;\n\t\ttry {\n\t\t\treturn await this.json(\"GET\", \"/auth/whoami\");\n\t\t} catch (err) {\n\t\t\tif (err instanceof TankAuthError) return null;\n\t\t\tthrow err;\n\t\t}\n\t}\n\tasync startLoginFlow() {\n\t\tconst state = crypto.randomUUID().replace(/-/g, \"\");\n\t\treturn this.json(\"POST\", \"/cli-auth/start\", { state });\n\t}\n\tasync exchangeLoginCode(sessionCode, state) {\n\t\ttry {\n\t\t\treturn await this.json(\"POST\", \"/cli-auth/exchange\", {\n\t\t\t\tsessionCode,\n\t\t\t\tstate\n\t\t\t});\n\t\t} catch (err) {\n\t\t\tif (err instanceof TankAuthError || err instanceof TankNotFoundError) return null;\n\t\t\tthrow err;\n\t\t}\n\t}\n\tasync listFiles(name, version) {\n\t\tconst ver = version ?? (await this.info(name)).latestVersion;\n\t\tif (!ver) throw new TankNotFoundError(`No versions found for ${name}`, name);\n\t\treturn (await this.json(\"GET\", `/skills/${encodeURIComponent(name)}/${ver}/files`)).files;\n\t}\n\tasync readFile(name, version, filePath) {\n\t\tconst normalized = filePath.replace(/\\\\/g, \"/\").replace(/\\0/g, \"\");\n\t\tif (!normalized || normalized.startsWith(\"/\") || normalized.split(\"/\").some((s) => s === \"..\")) throw new TankNetworkError(`Invalid file path: ${filePath}`);\n\t\tconst encodedName = encodeURIComponent(name);\n\t\tconst encodedPath = normalized.split(\"/\").map(encodeURIComponent).join(\"/\");\n\t\tconst res = await this.request(\"GET\", `/skills/${encodedName}/${version}/files/${encodedPath}`);\n\t\tif (res.status === 404) throw new TankNotFoundError(`File not found: ${filePath}`, name);\n\t\tif (!res.ok) throw new TankNetworkError(`Failed to read file: HTTP ${res.status}`);\n\t\treturn res.text();\n\t}\n\tasync batchRead(name, ver, items, concurrency = 6) {\n\t\tconst results = [];\n\t\tfor (let i = 0; i < items.length; i += concurrency) {\n\t\t\tconst batch = items.slice(i, i + concurrency);\n\t\t\tconst batchResults = await Promise.all(batch.map(async ({ f, prefix }) => ({\n\t\t\t\tkey: f.slice(prefix.length),\n\t\t\t\tprefix,\n\t\t\t\tcontent: await this.readFile(name, ver, f)\n\t\t\t})));\n\t\t\tresults.push(...batchResults);\n\t\t}\n\t\treturn results;\n\t}\n\tasync readSkill(name, version) {\n\t\tconst ver = version ?? (await this.info(name)).latestVersion;\n\t\tif (!ver) throw new TankNotFoundError(`No versions found for ${name}`, name);\n\t\tconst files = await this.listFiles(name, ver);\n\t\tconst content = files.find((f) => f === \"SKILL.md\") ? await this.readFile(name, ver, \"SKILL.md\") : \"\";\n\t\tconst filesToRead = [...files.filter((f) => f.startsWith(\"references/\")).map((f) => ({\n\t\t\tf,\n\t\t\tprefix: \"references/\"\n\t\t})), ...files.filter((f) => f.startsWith(\"scripts/\")).map((f) => ({\n\t\t\tf,\n\t\t\tprefix: \"scripts/\"\n\t\t}))];\n\t\tconst results = await this.batchRead(name, ver, filesToRead);\n\t\tconst refEntries = results.filter((r) => r.prefix === \"references/\").map((r) => [r.key, r.content]);\n\t\tconst scriptEntries = results.filter((r) => r.prefix === \"scripts/\").map((r) => [r.key, r.content]);\n\t\treturn {\n\t\t\tname,\n\t\t\tversion: ver,\n\t\t\tcontent,\n\t\t\treferences: Object.fromEntries(refEntries),\n\t\t\tscripts: Object.fromEntries(scriptEntries),\n\t\t\tfiles\n\t\t};\n\t}\n\tasync getStarCount(name) {\n\t\treturn this.json(\"GET\", `/skills/${encodeURIComponent(name)}/star`);\n\t}\n\tasync star(name) {\n\t\tawait this.json(\"POST\", `/skills/${encodeURIComponent(name)}/star`);\n\t}\n\tasync unstar(name) {\n\t\tawait this.json(\"DELETE\", `/skills/${encodeURIComponent(name)}/star`);\n\t}\n};\n//#endregion\n//#region src/install/native.ts\nconst esmRequire = createRequire(import.meta.url);\nlet _native = null;\nlet _nativeChecked = false;\nfunction tryLoadNative() {\n\tif (_nativeChecked) return _native;\n\t_nativeChecked = true;\n\ttry {\n\t\t_native = esmRequire(\"@tankpkg/sdk-core\");\n\t} catch {\n\t\t_native = null;\n\t}\n\treturn _native;\n}\nfunction hasNativeAcceleration() {\n\treturn tryLoadNative() !== null;\n}\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/internal/constants.js\nvar require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst SEMVER_SPEC_VERSION = \"2.0.0\";\n\tconst MAX_LENGTH = 256;\n\tconst MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;\n\tmodule.exports = {\n\t\tMAX_LENGTH,\n\t\tMAX_SAFE_COMPONENT_LENGTH: 16,\n\t\tMAX_SAFE_BUILD_LENGTH: MAX_LENGTH - 6,\n\t\tMAX_SAFE_INTEGER,\n\t\tRELEASE_TYPES: [\n\t\t\t\"major\",\n\t\t\t\"premajor\",\n\t\t\t\"minor\",\n\t\t\t\"preminor\",\n\t\t\t\"patch\",\n\t\t\t\"prepatch\",\n\t\t\t\"prerelease\"\n\t\t],\n\t\tSEMVER_SPEC_VERSION,\n\t\tFLAG_INCLUDE_PRERELEASE: 1,\n\t\tFLAG_LOOSE: 2\n\t};\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/internal/debug.js\nvar require_debug = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = typeof process === \"object\" && process.env && process.env.NODE_DEBUG && /\\bsemver\\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error(\"SEMVER\", ...args) : () => {};\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/internal/re.js\nvar require_re = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH } = require_constants();\n\tconst debug = require_debug();\n\texports = module.exports = {};\n\tconst re = exports.re = [];\n\tconst safeRe = exports.safeRe = [];\n\tconst src = exports.src = [];\n\tconst safeSrc = exports.safeSrc = [];\n\tconst t = exports.t = {};\n\tlet R = 0;\n\tconst LETTERDASHNUMBER = \"[a-zA-Z0-9-]\";\n\tconst safeRegexReplacements = [\n\t\t[\"\\\\s\", 1],\n\t\t[\"\\\\d\", MAX_LENGTH],\n\t\t[LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]\n\t];\n\tconst makeSafeRegex = (value) => {\n\t\tfor (const [token, max] of safeRegexReplacements) value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);\n\t\treturn value;\n\t};\n\tconst createToken = (name, value, isGlobal) => {\n\t\tconst safe = makeSafeRegex(value);\n\t\tconst index = R++;\n\t\tdebug(name, index, value);\n\t\tt[name] = index;\n\t\tsrc[index] = value;\n\t\tsafeSrc[index] = safe;\n\t\tre[index] = new RegExp(value, isGlobal ? \"g\" : void 0);\n\t\tsafeRe[index] = new RegExp(safe, isGlobal ? \"g\" : void 0);\n\t};\n\tcreateToken(\"NUMERICIDENTIFIER\", \"0|[1-9]\\\\d*\");\n\tcreateToken(\"NUMERICIDENTIFIERLOOSE\", \"\\\\d+\");\n\tcreateToken(\"NONNUMERICIDENTIFIER\", `\\\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);\n\tcreateToken(\"MAINVERSION\", `(${src[t.NUMERICIDENTIFIER]})\\\\.(${src[t.NUMERICIDENTIFIER]})\\\\.(${src[t.NUMERICIDENTIFIER]})`);\n\tcreateToken(\"MAINVERSIONLOOSE\", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);\n\tcreateToken(\"PRERELEASEIDENTIFIER\", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`);\n\tcreateToken(\"PRERELEASEIDENTIFIERLOOSE\", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`);\n\tcreateToken(\"PRERELEASE\", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\\\.${src[t.PRERELEASEIDENTIFIER]})*))`);\n\tcreateToken(\"PRERELEASELOOSE\", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);\n\tcreateToken(\"BUILDIDENTIFIER\", `${LETTERDASHNUMBER}+`);\n\tcreateToken(\"BUILD\", `(?:\\\\+(${src[t.BUILDIDENTIFIER]}(?:\\\\.${src[t.BUILDIDENTIFIER]})*))`);\n\tcreateToken(\"FULLPLAIN\", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);\n\tcreateToken(\"FULL\", `^${src[t.FULLPLAIN]}$`);\n\tcreateToken(\"LOOSEPLAIN\", `[v=\\\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);\n\tcreateToken(\"LOOSE\", `^${src[t.LOOSEPLAIN]}$`);\n\tcreateToken(\"GTLT\", \"((?:<|>)?=?)\");\n\tcreateToken(\"XRANGEIDENTIFIERLOOSE\", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`);\n\tcreateToken(\"XRANGEIDENTIFIER\", `${src[t.NUMERICIDENTIFIER]}|x|X|\\\\*`);\n\tcreateToken(\"XRANGEPLAIN\", `[v=\\\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\\\.(${src[t.XRANGEIDENTIFIER]})(?:\\\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`);\n\tcreateToken(\"XRANGEPLAINLOOSE\", `[v=\\\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);\n\tcreateToken(\"XRANGE\", `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAIN]}$`);\n\tcreateToken(\"XRANGELOOSE\", `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAINLOOSE]}$`);\n\tcreateToken(\"COERCEPLAIN\", `(^|[^\\\\d])(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}})(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);\n\tcreateToken(\"COERCE\", `${src[t.COERCEPLAIN]}(?:$|[^\\\\d])`);\n\tcreateToken(\"COERCEFULL\", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\\\d])`);\n\tcreateToken(\"COERCERTL\", src[t.COERCE], true);\n\tcreateToken(\"COERCERTLFULL\", src[t.COERCEFULL], true);\n\tcreateToken(\"LONETILDE\", \"(?:~>?)\");\n\tcreateToken(\"TILDETRIM\", `(\\\\s*)${src[t.LONETILDE]}\\\\s+`, true);\n\texports.tildeTrimReplace = \"$1~\";\n\tcreateToken(\"TILDE\", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);\n\tcreateToken(\"TILDELOOSE\", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);\n\tcreateToken(\"LONECARET\", \"(?:\\\\^)\");\n\tcreateToken(\"CARETTRIM\", `(\\\\s*)${src[t.LONECARET]}\\\\s+`, true);\n\texports.caretTrimReplace = \"$1^\";\n\tcreateToken(\"CARET\", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);\n\tcreateToken(\"CARETLOOSE\", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);\n\tcreateToken(\"COMPARATORLOOSE\", `^${src[t.GTLT]}\\\\s*(${src[t.LOOSEPLAIN]})$|^$`);\n\tcreateToken(\"COMPARATOR\", `^${src[t.GTLT]}\\\\s*(${src[t.FULLPLAIN]})$|^$`);\n\tcreateToken(\"COMPARATORTRIM\", `(\\\\s*)${src[t.GTLT]}\\\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);\n\texports.comparatorTrimReplace = \"$1$2$3\";\n\tcreateToken(\"HYPHENRANGE\", `^\\\\s*(${src[t.XRANGEPLAIN]})\\\\s+-\\\\s+(${src[t.XRANGEPLAIN]})\\\\s*$`);\n\tcreateToken(\"HYPHENRANGELOOSE\", `^\\\\s*(${src[t.XRANGEPLAINLOOSE]})\\\\s+-\\\\s+(${src[t.XRANGEPLAINLOOSE]})\\\\s*$`);\n\tcreateToken(\"STAR\", \"(<|>)?=?\\\\s*\\\\*\");\n\tcreateToken(\"GTE0\", \"^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$\");\n\tcreateToken(\"GTE0PRE\", \"^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$\");\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/internal/parse-options.js\nvar require_parse_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst looseOption = Object.freeze({ loose: true });\n\tconst emptyOpts = Object.freeze({});\n\tconst parseOptions = (options) => {\n\t\tif (!options) return emptyOpts;\n\t\tif (typeof options !== \"object\") return looseOption;\n\t\treturn options;\n\t};\n\tmodule.exports = parseOptions;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/internal/identifiers.js\nvar require_identifiers = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst numeric = /^[0-9]+$/;\n\tconst compareIdentifiers = (a, b) => {\n\t\tif (typeof a === \"number\" && typeof b === \"number\") return a === b ? 0 : a < b ? -1 : 1;\n\t\tconst anum = numeric.test(a);\n\t\tconst bnum = numeric.test(b);\n\t\tif (anum && bnum) {\n\t\t\ta = +a;\n\t\t\tb = +b;\n\t\t}\n\t\treturn a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;\n\t};\n\tconst rcompareIdentifiers = (a, b) => compareIdentifiers(b, a);\n\tmodule.exports = {\n\t\tcompareIdentifiers,\n\t\trcompareIdentifiers\n\t};\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/classes/semver.js\nvar require_semver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst debug = require_debug();\n\tconst { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();\n\tconst { safeRe: re, t } = require_re();\n\tconst parseOptions = require_parse_options();\n\tconst { compareIdentifiers } = require_identifiers();\n\tmodule.exports = class SemVer {\n\t\tconstructor(version, options) {\n\t\t\toptions = parseOptions(options);\n\t\t\tif (version instanceof SemVer) if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) return version;\n\t\t\telse version = version.version;\n\t\t\telse if (typeof version !== \"string\") throw new TypeError(`Invalid version. Must be a string. Got type \"${typeof version}\".`);\n\t\t\tif (version.length > MAX_LENGTH) throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);\n\t\t\tdebug(\"SemVer\", version, options);\n\t\t\tthis.options = options;\n\t\t\tthis.loose = !!options.loose;\n\t\t\tthis.includePrerelease = !!options.includePrerelease;\n\t\t\tconst m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);\n\t\t\tif (!m) throw new TypeError(`Invalid Version: ${version}`);\n\t\t\tthis.raw = version;\n\t\t\tthis.major = +m[1];\n\t\t\tthis.minor = +m[2];\n\t\t\tthis.patch = +m[3];\n\t\t\tif (this.major > MAX_SAFE_INTEGER || this.major < 0) throw new TypeError(\"Invalid major version\");\n\t\t\tif (this.minor > MAX_SAFE_INTEGER || this.minor < 0) throw new TypeError(\"Invalid minor version\");\n\t\t\tif (this.patch > MAX_SAFE_INTEGER || this.patch < 0) throw new TypeError(\"Invalid patch version\");\n\t\t\tif (!m[4]) this.prerelease = [];\n\t\t\telse this.prerelease = m[4].split(\".\").map((id) => {\n\t\t\t\tif (/^[0-9]+$/.test(id)) {\n\t\t\t\t\tconst num = +id;\n\t\t\t\t\tif (num >= 0 && num < MAX_SAFE_INTEGER) return num;\n\t\t\t\t}\n\t\t\t\treturn id;\n\t\t\t});\n\t\t\tthis.build = m[5] ? m[5].split(\".\") : [];\n\t\t\tthis.format();\n\t\t}\n\t\tformat() {\n\t\t\tthis.version = `${this.major}.${this.minor}.${this.patch}`;\n\t\t\tif (this.prerelease.length) this.version += `-${this.prerelease.join(\".\")}`;\n\t\t\treturn this.version;\n\t\t}\n\t\ttoString() {\n\t\t\treturn this.version;\n\t\t}\n\t\tcompare(other) {\n\t\t\tdebug(\"SemVer.compare\", this.version, this.options, other);\n\t\t\tif (!(other instanceof SemVer)) {\n\t\t\t\tif (typeof other === \"string\" && other === this.version) return 0;\n\t\t\t\tother = new SemVer(other, this.options);\n\t\t\t}\n\t\t\tif (other.version === this.version) return 0;\n\t\t\treturn this.compareMain(other) || this.comparePre(other);\n\t\t}\n\t\tcompareMain(other) {\n\t\t\tif (!(other instanceof SemVer)) other = new SemVer(other, this.options);\n\t\t\tif (this.major < other.major) return -1;\n\t\t\tif (this.major > other.major) return 1;\n\t\t\tif (this.minor < other.minor) return -1;\n\t\t\tif (this.minor > other.minor) return 1;\n\t\t\tif (this.patch < other.patch) return -1;\n\t\t\tif (this.patch > other.patch) return 1;\n\t\t\treturn 0;\n\t\t}\n\t\tcomparePre(other) {\n\t\t\tif (!(other instanceof SemVer)) other = new SemVer(other, this.options);\n\t\t\tif (this.prerelease.length && !other.prerelease.length) return -1;\n\t\t\telse if (!this.prerelease.length && other.prerelease.length) return 1;\n\t\t\telse if (!this.prerelease.length && !other.prerelease.length) return 0;\n\t\t\tlet i = 0;\n\t\t\tdo {\n\t\t\t\tconst a = this.prerelease[i];\n\t\t\t\tconst b = other.prerelease[i];\n\t\t\t\tdebug(\"prerelease compare\", i, a, b);\n\t\t\t\tif (a === void 0 && b === void 0) return 0;\n\t\t\t\telse if (b === void 0) return 1;\n\t\t\t\telse if (a === void 0) return -1;\n\t\t\t\telse if (a === b) continue;\n\t\t\t\telse return compareIdentifiers(a, b);\n\t\t\t} while (++i);\n\t\t}\n\t\tcompareBuild(other) {\n\t\t\tif (!(other instanceof SemVer)) other = new SemVer(other, this.options);\n\t\t\tlet i = 0;\n\t\t\tdo {\n\t\t\t\tconst a = this.build[i];\n\t\t\t\tconst b = other.build[i];\n\t\t\t\tdebug(\"build compare\", i, a, b);\n\t\t\t\tif (a === void 0 && b === void 0) return 0;\n\t\t\t\telse if (b === void 0) return 1;\n\t\t\t\telse if (a === void 0) return -1;\n\t\t\t\telse if (a === b) continue;\n\t\t\t\telse return compareIdentifiers(a, b);\n\t\t\t} while (++i);\n\t\t}\n\t\tinc(release, identifier, identifierBase) {\n\t\t\tif (release.startsWith(\"pre\")) {\n\t\t\t\tif (!identifier && identifierBase === false) throw new Error(\"invalid increment argument: identifier is empty\");\n\t\t\t\tif (identifier) {\n\t\t\t\t\tconst match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]);\n\t\t\t\t\tif (!match || match[1] !== identifier) throw new Error(`invalid identifier: ${identifier}`);\n\t\t\t\t}\n\t\t\t}\n\t\t\tswitch (release) {\n\t\t\t\tcase \"premajor\":\n\t\t\t\t\tthis.prerelease.length = 0;\n\t\t\t\t\tthis.patch = 0;\n\t\t\t\t\tthis.minor = 0;\n\t\t\t\t\tthis.major++;\n\t\t\t\t\tthis.inc(\"pre\", identifier, identifierBase);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"preminor\":\n\t\t\t\t\tthis.prerelease.length = 0;\n\t\t\t\t\tthis.patch = 0;\n\t\t\t\t\tthis.minor++;\n\t\t\t\t\tthis.inc(\"pre\", identifier, identifierBase);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"prepatch\":\n\t\t\t\t\tthis.prerelease.length = 0;\n\t\t\t\t\tthis.inc(\"patch\", identifier, identifierBase);\n\t\t\t\t\tthis.inc(\"pre\", identifier, identifierBase);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"prerelease\":\n\t\t\t\t\tif (this.prerelease.length === 0) this.inc(\"patch\", identifier, identifierBase);\n\t\t\t\t\tthis.inc(\"pre\", identifier, identifierBase);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"release\":\n\t\t\t\t\tif (this.prerelease.length === 0) throw new Error(`version ${this.raw} is not a prerelease`);\n\t\t\t\t\tthis.prerelease.length = 0;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"major\":\n\t\t\t\t\tif (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) this.major++;\n\t\t\t\t\tthis.minor = 0;\n\t\t\t\t\tthis.patch = 0;\n\t\t\t\t\tthis.prerelease = [];\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"minor\":\n\t\t\t\t\tif (this.patch !== 0 || this.prerelease.length === 0) this.minor++;\n\t\t\t\t\tthis.patch = 0;\n\t\t\t\t\tthis.prerelease = [];\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"patch\":\n\t\t\t\t\tif (this.prerelease.length === 0) this.patch++;\n\t\t\t\t\tthis.prerelease = [];\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"pre\": {\n\t\t\t\t\tconst base = Number(identifierBase) ? 1 : 0;\n\t\t\t\t\tif (this.prerelease.length === 0) this.prerelease = [base];\n\t\t\t\t\telse {\n\t\t\t\t\t\tlet i = this.prerelease.length;\n\t\t\t\t\t\twhile (--i >= 0) if (typeof this.prerelease[i] === \"number\") {\n\t\t\t\t\t\t\tthis.prerelease[i]++;\n\t\t\t\t\t\t\ti = -2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (i === -1) {\n\t\t\t\t\t\t\tif (identifier === this.prerelease.join(\".\") && identifierBase === false) throw new Error(\"invalid increment argument: identifier already exists\");\n\t\t\t\t\t\t\tthis.prerelease.push(base);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (identifier) {\n\t\t\t\t\t\tlet prerelease = [identifier, base];\n\t\t\t\t\t\tif (identifierBase === false) prerelease = [identifier];\n\t\t\t\t\t\tif (compareIdentifiers(this.prerelease[0], identifier) === 0) {\n\t\t\t\t\t\t\tif (isNaN(this.prerelease[1])) this.prerelease = prerelease;\n\t\t\t\t\t\t} else this.prerelease = prerelease;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault: throw new Error(`invalid increment argument: ${release}`);\n\t\t\t}\n\t\t\tthis.raw = this.format();\n\t\t\tif (this.build.length) this.raw += `+${this.build.join(\".\")}`;\n\t\t\treturn this;\n\t\t}\n\t};\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/parse.js\nvar require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst SemVer = require_semver$1();\n\tconst parse = (version, options, throwErrors = false) => {\n\t\tif (version instanceof SemVer) return version;\n\t\ttry {\n\t\t\treturn new SemVer(version, options);\n\t\t} catch (er) {\n\t\t\tif (!throwErrors) return null;\n\t\t\tthrow er;\n\t\t}\n\t};\n\tmodule.exports = parse;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/valid.js\nvar require_valid$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst parse = require_parse();\n\tconst valid = (version, options) => {\n\t\tconst v = parse(version, options);\n\t\treturn v ? v.version : null;\n\t};\n\tmodule.exports = valid;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/clean.js\nvar require_clean = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst parse = require_parse();\n\tconst clean = (version, options) => {\n\t\tconst s = parse(version.trim().replace(/^[=v]+/, \"\"), options);\n\t\treturn s ? s.version : null;\n\t};\n\tmodule.exports = clean;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/inc.js\nvar require_inc = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst SemVer = require_semver$1();\n\tconst inc = (version, release, options, identifier, identifierBase) => {\n\t\tif (typeof options === \"string\") {\n\t\t\tidentifierBase = identifier;\n\t\t\tidentifier = options;\n\t\t\toptions = void 0;\n\t\t}\n\t\ttry {\n\t\t\treturn new SemVer(version instanceof SemVer ? version.version : version, options).inc(release, identifier, identifierBase).version;\n\t\t} catch (er) {\n\t\t\treturn null;\n\t\t}\n\t};\n\tmodule.exports = inc;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/diff.js\nvar require_diff = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst parse = require_parse();\n\tconst diff = (version1, version2) => {\n\t\tconst v1 = parse(version1, null, true);\n\t\tconst v2 = parse(version2, null, true);\n\t\tconst comparison = v1.compare(v2);\n\t\tif (comparison === 0) return null;\n\t\tconst v1Higher = comparison > 0;\n\t\tconst highVersion = v1Higher ? v1 : v2;\n\t\tconst lowVersion = v1Higher ? v2 : v1;\n\t\tconst highHasPre = !!highVersion.prerelease.length;\n\t\tif (!!lowVersion.prerelease.length && !highHasPre) {\n\t\t\tif (!lowVersion.patch && !lowVersion.minor) return \"major\";\n\t\t\tif (lowVersion.compareMain(highVersion) === 0) {\n\t\t\t\tif (lowVersion.minor && !lowVersion.patch) return \"minor\";\n\t\t\t\treturn \"patch\";\n\t\t\t}\n\t\t}\n\t\tconst prefix = highHasPre ? \"pre\" : \"\";\n\t\tif (v1.major !== v2.major) return prefix + \"major\";\n\t\tif (v1.minor !== v2.minor) return prefix + \"minor\";\n\t\tif (v1.patch !== v2.patch) return prefix + \"patch\";\n\t\treturn \"prerelease\";\n\t};\n\tmodule.exports = diff;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/major.js\nvar require_major = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst SemVer = require_semver$1();\n\tconst major = (a, loose) => new SemVer(a, loose).major;\n\tmodule.exports = major;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/minor.js\nvar require_minor = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst SemVer = require_semver$1();\n\tconst minor = (a, loose) => new SemVer(a, loose).minor;\n\tmodule.exports = minor;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/patch.js\nvar require_patch = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst SemVer = require_semver$1();\n\tconst patch = (a, loose) => new SemVer(a, loose).patch;\n\tmodule.exports = patch;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/prerelease.js\nvar require_prerelease = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst parse = require_parse();\n\tconst prerelease = (version, options) => {\n\t\tconst parsed = parse(version, options);\n\t\treturn parsed && parsed.prerelease.length ? parsed.prerelease : null;\n\t};\n\tmodule.exports = prerelease;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/compare.js\nvar require_compare = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst SemVer = require_semver$1();\n\tconst compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));\n\tmodule.exports = compare;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/rcompare.js\nvar require_rcompare = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst compare = require_compare();\n\tconst rcompare = (a, b, loose) => compare(b, a, loose);\n\tmodule.exports = rcompare;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/compare-loose.js\nvar require_compare_loose = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst compare = require_compare();\n\tconst compareLoose = (a, b) => compare(a, b, true);\n\tmodule.exports = compareLoose;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/compare-build.js\nvar require_compare_build = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst SemVer = require_semver$1();\n\tconst compareBuild = (a, b, loose) => {\n\t\tconst versionA = new SemVer(a, loose);\n\t\tconst versionB = new SemVer(b, loose);\n\t\treturn versionA.compare(versionB) || versionA.compareBuild(versionB);\n\t};\n\tmodule.exports = compareBuild;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/sort.js\nvar require_sort = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst compareBuild = require_compare_build();\n\tconst sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose));\n\tmodule.exports = sort;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/rsort.js\nvar require_rsort = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst compareBuild = require_compare_build();\n\tconst rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));\n\tmodule.exports = rsort;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/gt.js\nvar require_gt = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst compare = require_compare();\n\tconst gt = (a, b, loose) => compare(a, b, loose) > 0;\n\tmodule.exports = gt;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/lt.js\nvar require_lt = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst compare = require_compare();\n\tconst lt = (a, b, loose) => compare(a, b, loose) < 0;\n\tmodule.exports = lt;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/eq.js\nvar require_eq = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst compare = require_compare();\n\tconst eq = (a, b, loose) => compare(a, b, loose) === 0;\n\tmodule.exports = eq;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/neq.js\nvar require_neq = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst compare = require_compare();\n\tconst neq = (a, b, loose) => compare(a, b, loose) !== 0;\n\tmodule.exports = neq;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/gte.js\nvar require_gte = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst compare = require_compare();\n\tconst gte = (a, b, loose) => compare(a, b, loose) >= 0;\n\tmodule.exports = gte;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/lte.js\nvar require_lte = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst compare = require_compare();\n\tconst lte = (a, b, loose) => compare(a, b, loose) <= 0;\n\tmodule.exports = lte;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/cmp.js\nvar require_cmp = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst eq = require_eq();\n\tconst neq = require_neq();\n\tconst gt = require_gt();\n\tconst gte = require_gte();\n\tconst lt = require_lt();\n\tconst lte = require_lte();\n\tconst cmp = (a, op, b, loose) => {\n\t\tswitch (op) {\n\t\t\tcase \"===\":\n\t\t\t\tif (typeof a === \"object\") a = a.version;\n\t\t\t\tif (typeof b === \"object\") b = b.version;\n\t\t\t\treturn a === b;\n\t\t\tcase \"!==\":\n\t\t\t\tif (typeof a === \"object\") a = a.version;\n\t\t\t\tif (typeof b === \"object\") b = b.version;\n\t\t\t\treturn a !== b;\n\t\t\tcase \"\":\n\t\t\tcase \"=\":\n\t\t\tcase \"==\": return eq(a, b, loose);\n\t\t\tcase \"!=\": return neq(a, b, loose);\n\t\t\tcase \">\": return gt(a, b, loose);\n\t\t\tcase \">=\": return gte(a, b, loose);\n\t\t\tcase \"<\": return lt(a, b, loose);\n\t\t\tcase \"<=\": return lte(a, b, loose);\n\t\t\tdefault: throw new TypeError(`Invalid operator: ${op}`);\n\t\t}\n\t};\n\tmodule.exports = cmp;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/coerce.js\nvar require_coerce = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst SemVer = require_semver$1();\n\tconst parse = require_parse();\n\tconst { safeRe: re, t } = require_re();\n\tconst coerce = (version, options) => {\n\t\tif (version instanceof SemVer) return version;\n\t\tif (typeof version === \"number\") version = String(version);\n\t\tif (typeof version !== \"string\") return null;\n\t\toptions = options || {};\n\t\tlet match = null;\n\t\tif (!options.rtl) match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);\n\t\telse {\n\t\t\tconst coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL];\n\t\t\tlet next;\n\t\t\twhile ((next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length)) {\n\t\t\t\tif (!match || next.index + next[0].length !== match.index + match[0].length) match = next;\n\t\t\t\tcoerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;\n\t\t\t}\n\t\t\tcoerceRtlRegex.lastIndex = -1;\n\t\t}\n\t\tif (match === null) return null;\n\t\tconst major = match[2];\n\t\treturn parse(`${major}.${match[3] || \"0\"}.${match[4] || \"0\"}${options.includePrerelease && match[5] ? `-${match[5]}` : \"\"}${options.includePrerelease && match[6] ? `+${match[6]}` : \"\"}`, options);\n\t};\n\tmodule.exports = coerce;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/internal/lrucache.js\nvar require_lrucache = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar LRUCache = class {\n\t\tconstructor() {\n\t\t\tthis.max = 1e3;\n\t\t\tthis.map = /* @__PURE__ */ new Map();\n\t\t}\n\t\tget(key) {\n\t\t\tconst value = this.map.get(key);\n\t\t\tif (value === void 0) return;\n\t\t\telse {\n\t\t\t\tthis.map.delete(key);\n\t\t\t\tthis.map.set(key, value);\n\t\t\t\treturn value;\n\t\t\t}\n\t\t}\n\t\tdelete(key) {\n\t\t\treturn this.map.delete(key);\n\t\t}\n\t\tset(key, value) {\n\t\t\tif (!this.delete(key) && value !== void 0) {\n\t\t\t\tif (this.map.size >= this.max) {\n\t\t\t\t\tconst firstKey = this.map.keys().next().value;\n\t\t\t\t\tthis.delete(firstKey);\n\t\t\t\t}\n\t\t\t\tthis.map.set(key, value);\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t};\n\tmodule.exports = LRUCache;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/classes/range.js\nvar require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst SPACE_CHARACTERS = /\\s+/g;\n\tmodule.exports = class Range {\n\t\tconstructor(range, options) {\n\t\t\toptions = parseOptions(options);\n\t\t\tif (range instanceof Range) if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) return range;\n\t\t\telse return new Range(range.raw, options);\n\t\t\tif (range instanceof Comparator) {\n\t\t\t\tthis.raw = range.value;\n\t\t\t\tthis.set = [[range]];\n\t\t\t\tthis.formatted = void 0;\n\t\t\t\treturn this;\n\t\t\t}\n\t\t\tthis.options = options;\n\t\t\tthis.loose = !!options.loose;\n\t\t\tthis.includePrerelease = !!options.includePrerelease;\n\t\t\tthis.raw = range.trim().replace(SPACE_CHARACTERS, \" \");\n\t\t\tthis.set = this.raw.split(\"||\").map((r) => this.parseRange(r.trim())).filter((c) => c.length);\n\t\t\tif (!this.set.length) throw new TypeError(`Invalid SemVer Range: ${this.raw}`);\n\t\t\tif (this.set.length > 1) {\n\t\t\t\tconst first = this.set[0];\n\t\t\t\tthis.set = this.set.filter((c) => !isNullSet(c[0]));\n\t\t\t\tif (this.set.length === 0) this.set = [first];\n\t\t\t\telse if (this.set.length > 1) {\n\t\t\t\t\tfor (const c of this.set) if (c.length === 1 && isAny(c[0])) {\n\t\t\t\t\t\tthis.set = [c];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.formatted = void 0;\n\t\t}\n\t\tget range() {\n\t\t\tif (this.formatted === void 0) {\n\t\t\t\tthis.formatted = \"\";\n\t\t\t\tfor (let i = 0; i < this.set.length; i++) {\n\t\t\t\t\tif (i > 0) this.formatted += \"||\";\n\t\t\t\t\tconst comps = this.set[i];\n\t\t\t\t\tfor (let k = 0; k < comps.length; k++) {\n\t\t\t\t\t\tif (k > 0) this.formatted += \" \";\n\t\t\t\t\t\tthis.formatted += comps[k].toString().trim();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn this.formatted;\n\t\t}\n\t\tformat() {\n\t\t\treturn this.range;\n\t\t}\n\t\ttoString() {\n\t\t\treturn this.range;\n\t\t}\n\t\tparseRange(range) {\n\t\t\tconst memoKey = ((this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE)) + \":\" + range;\n\t\t\tconst cached = cache.get(memoKey);\n\t\t\tif (cached) return cached;\n\t\t\tconst loose = this.options.loose;\n\t\t\tconst hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];\n\t\t\trange = range.replace(hr, hyphenReplace(this.options.includePrerelease));\n\t\t\tdebug(\"hyphen replace\", range);\n\t\t\trange = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);\n\t\t\tdebug(\"comparator trim\", range);\n\t\t\trange = range.replace(re[t.TILDETRIM], tildeTrimReplace);\n\t\t\tdebug(\"tilde trim\", range);\n\t\t\trange = range.replace(re[t.CARETTRIM], caretTrimReplace);\n\t\t\tdebug(\"caret trim\", range);\n\t\t\tlet rangeList = range.split(\" \").map((comp) => parseComparator(comp, this.options)).join(\" \").split(/\\s+/).map((comp) => replaceGTE0(comp, this.options));\n\t\t\tif (loose) rangeList = rangeList.filter((comp) => {\n\t\t\t\tdebug(\"loose invalid filter\", comp, this.options);\n\t\t\t\treturn !!comp.match(re[t.COMPARATORLOOSE]);\n\t\t\t});\n\t\t\tdebug(\"range list\", rangeList);\n\t\t\tconst rangeMap = /* @__PURE__ */ new Map();\n\t\t\tconst comparators = rangeList.map((comp) => new Comparator(comp, this.options));\n\t\t\tfor (const comp of comparators) {\n\t\t\t\tif (isNullSet(comp)) return [comp];\n\t\t\t\trangeMap.set(comp.value, comp);\n\t\t\t}\n\t\t\tif (rangeMap.size > 1 && rangeMap.has(\"\")) rangeMap.delete(\"\");\n\t\t\tconst result = [...rangeMap.values()];\n\t\t\tcache.set(memoKey, result);\n\t\t\treturn result;\n\t\t}\n\t\tintersects(range, options) {\n\t\t\tif (!(range instanceof Range)) throw new TypeError(\"a Range is required\");\n\t\t\treturn this.set.some((thisComparators) => {\n\t\t\t\treturn isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => {\n\t\t\t\t\treturn isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {\n\t\t\t\t\t\treturn rangeComparators.every((rangeComparator) => {\n\t\t\t\t\t\t\treturn thisComparator.intersects(rangeComparator, options);\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t\ttest(version) {\n\t\t\tif (!version) return false;\n\t\t\tif (typeof version === \"string\") try {\n\t\t\t\tversion = new SemVer(version, this.options);\n\t\t\t} catch (er) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tfor (let i = 0; i < this.set.length; i++) if (testSet(this.set[i], version, this.options)) return true;\n\t\t\treturn false;\n\t\t}\n\t};\n\tconst cache = new (require_lrucache())();\n\tconst parseOptions = require_parse_options();\n\tconst Comparator = require_comparator();\n\tconst debug = require_debug();\n\tconst SemVer = require_semver$1();\n\tconst { safeRe: re, t, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace } = require_re();\n\tconst { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();\n\tconst isNullSet = (c) => c.value === \"<0.0.0-0\";\n\tconst isAny = (c) => c.value === \"\";\n\tconst isSatisfiable = (comparators, options) => {\n\t\tlet result = true;\n\t\tconst remainingComparators = comparators.slice();\n\t\tlet testComparator = remainingComparators.pop();\n\t\twhile (result && remainingComparators.length) {\n\t\t\tresult = remainingComparators.every((otherComparator) => {\n\t\t\t\treturn testComparator.intersects(otherComparator, options);\n\t\t\t});\n\t\t\ttestComparator = remainingComparators.pop();\n\t\t}\n\t\treturn result;\n\t};\n\tconst parseComparator = (comp, options) => {\n\t\tcomp = comp.replace(re[t.BUILD], \"\");\n\t\tdebug(\"comp\", comp, options);\n\t\tcomp = replaceCarets(comp, options);\n\t\tdebug(\"caret\", comp);\n\t\tcomp = replaceTildes(comp, options);\n\t\tdebug(\"tildes\", comp);\n\t\tcomp = replaceXRanges(comp, options);\n\t\tdebug(\"xrange\", comp);\n\t\tcomp = replaceStars(comp, options);\n\t\tdebug(\"stars\", comp);\n\t\treturn comp;\n\t};\n\tconst isX = (id) => !id || id.toLowerCase() === \"x\" || id === \"*\";\n\tconst replaceTildes = (comp, options) => {\n\t\treturn comp.trim().split(/\\s+/).map((c) => replaceTilde(c, options)).join(\" \");\n\t};\n\tconst replaceTilde = (comp, options) => {\n\t\tconst r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];\n\t\treturn comp.replace(r, (_, M, m, p, pr) => {\n\t\t\tdebug(\"tilde\", comp, _, M, m, p, pr);\n\t\t\tlet ret;\n\t\t\tif (isX(M)) ret = \"\";\n\t\t\telse if (isX(m)) ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;\n\t\t\telse if (isX(p)) ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;\n\t\t\telse if (pr) {\n\t\t\t\tdebug(\"replaceTilde pr\", pr);\n\t\t\t\tret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;\n\t\t\t} else ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;\n\t\t\tdebug(\"tilde return\", ret);\n\t\t\treturn ret;\n\t\t});\n\t};\n\tconst replaceCarets = (comp, options) => {\n\t\treturn comp.trim().split(/\\s+/).map((c) => replaceCaret(c, options)).join(\" \");\n\t};\n\tconst replaceCaret = (comp, options) => {\n\t\tdebug(\"caret\", comp, options);\n\t\tconst r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];\n\t\tconst z = options.includePrerelease ? \"-0\" : \"\";\n\t\treturn comp.replace(r, (_, M, m, p, pr) => {\n\t\t\tdebug(\"caret\", comp, _, M, m, p, pr);\n\t\t\tlet ret;\n\t\t\tif (isX(M)) ret = \"\";\n\t\t\telse if (isX(m)) ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;\n\t\t\telse if (isX(p)) if (M === \"0\") ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;\n\t\t\telse ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;\n\t\t\telse if (pr) {\n\t\t\t\tdebug(\"replaceCaret pr\", pr);\n\t\t\t\tif (M === \"0\") if (m === \"0\") ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;\n\t\t\t\telse ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;\n\t\t\t\telse ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;\n\t\t\t} else {\n\t\t\t\tdebug(\"no pr\");\n\t\t\t\tif (M === \"0\") if (m === \"0\") ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`;\n\t\t\t\telse ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`;\n\t\t\t\telse ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;\n\t\t\t}\n\t\t\tdebug(\"caret return\", ret);\n\t\t\treturn ret;\n\t\t});\n\t};\n\tconst replaceXRanges = (comp, options) => {\n\t\tdebug(\"replaceXRanges\", comp, options);\n\t\treturn comp.split(/\\s+/).map((c) => replaceXRange(c, options)).join(\" \");\n\t};\n\tconst replaceXRange = (comp, options) => {\n\t\tcomp = comp.trim();\n\t\tconst r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];\n\t\treturn comp.replace(r, (ret, gtlt, M, m, p, pr) => {\n\t\t\tdebug(\"xRange\", comp, ret, gtlt, M, m, p, pr);\n\t\t\tconst xM = isX(M);\n\t\t\tconst xm = xM || isX(m);\n\t\t\tconst xp = xm || isX(p);\n\t\t\tconst anyX = xp;\n\t\t\tif (gtlt === \"=\" && anyX) gtlt = \"\";\n\t\t\tpr = options.includePrerelease ? \"-0\" : \"\";\n\t\t\tif (xM) if (gtlt === \">\" || gtlt === \"<\") ret = \"<0.0.0-0\";\n\t\t\telse ret = \"*\";\n\t\t\telse if (gtlt && anyX) {\n\t\t\t\tif (xm) m = 0;\n\t\t\t\tp = 0;\n\t\t\t\tif (gtlt === \">\") {\n\t\t\t\t\tgtlt = \">=\";\n\t\t\t\t\tif (xm) {\n\t\t\t\t\t\tM = +M + 1;\n\t\t\t\t\t\tm = 0;\n\t\t\t\t\t\tp = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tm = +m + 1;\n\t\t\t\t\t\tp = 0;\n\t\t\t\t\t}\n\t\t\t\t} else if (gtlt === \"<=\") {\n\t\t\t\t\tgtlt = \"<\";\n\t\t\t\t\tif (xm) M = +M + 1;\n\t\t\t\t\telse m = +m + 1;\n\t\t\t\t}\n\t\t\t\tif (gtlt === \"<\") pr = \"-0\";\n\t\t\t\tret = `${gtlt + M}.${m}.${p}${pr}`;\n\t\t\t} else if (xm) ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;\n\t\t\telse if (xp) ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;\n\t\t\tdebug(\"xRange return\", ret);\n\t\t\treturn ret;\n\t\t});\n\t};\n\tconst replaceStars = (comp, options) => {\n\t\tdebug(\"replaceStars\", comp, options);\n\t\treturn comp.trim().replace(re[t.STAR], \"\");\n\t};\n\tconst replaceGTE0 = (comp, options) => {\n\t\tdebug(\"replaceGTE0\", comp, options);\n\t\treturn comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], \"\");\n\t};\n\tconst hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {\n\t\tif (isX(fM)) from = \"\";\n\t\telse if (isX(fm)) from = `>=${fM}.0.0${incPr ? \"-0\" : \"\"}`;\n\t\telse if (isX(fp)) from = `>=${fM}.${fm}.0${incPr ? \"-0\" : \"\"}`;\n\t\telse if (fpr) from = `>=${from}`;\n\t\telse from = `>=${from}${incPr ? \"-0\" : \"\"}`;\n\t\tif (isX(tM)) to = \"\";\n\t\telse if (isX(tm)) to = `<${+tM + 1}.0.0-0`;\n\t\telse if (isX(tp)) to = `<${tM}.${+tm + 1}.0-0`;\n\t\telse if (tpr) to = `<=${tM}.${tm}.${tp}-${tpr}`;\n\t\telse if (incPr) to = `<${tM}.${tm}.${+tp + 1}-0`;\n\t\telse to = `<=${to}`;\n\t\treturn `${from} ${to}`.trim();\n\t};\n\tconst testSet = (set, version, options) => {\n\t\tfor (let i = 0; i < set.length; i++) if (!set[i].test(version)) return false;\n\t\tif (version.prerelease.length && !options.includePrerelease) {\n\t\t\tfor (let i = 0; i < set.length; i++) {\n\t\t\t\tdebug(set[i].semver);\n\t\t\t\tif (set[i].semver === Comparator.ANY) continue;\n\t\t\t\tif (set[i].semver.prerelease.length > 0) {\n\t\t\t\t\tconst allowed = set[i].semver;\n\t\t\t\t\tif (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) return true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t};\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/classes/comparator.js\nvar require_comparator = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst ANY = Symbol(\"SemVer ANY\");\n\tmodule.exports = class Comparator {\n\t\tstatic get ANY() {\n\t\t\treturn ANY;\n\t\t}\n\t\tconstructor(comp, options) {\n\t\t\toptions = parseOptions(options);\n\t\t\tif (comp instanceof Comparator) if (comp.loose === !!options.loose) return comp;\n\t\t\telse comp = comp.value;\n\t\t\tcomp = comp.trim().split(/\\s+/).join(\" \");\n\t\t\tdebug(\"comparator\", comp, options);\n\t\t\tthis.options = options;\n\t\t\tthis.loose = !!options.loose;\n\t\t\tthis.parse(comp);\n\t\t\tif (this.semver === ANY) this.value = \"\";\n\t\t\telse this.value = this.operator + this.semver.version;\n\t\t\tdebug(\"comp\", this);\n\t\t}\n\t\tparse(comp) {\n\t\t\tconst r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];\n\t\t\tconst m = comp.match(r);\n\t\t\tif (!m) throw new TypeError(`Invalid comparator: ${comp}`);\n\t\t\tthis.operator = m[1] !== void 0 ? m[1] : \"\";\n\t\t\tif (this.operator === \"=\") this.operator = \"\";\n\t\t\tif (!m[2]) this.semver = ANY;\n\t\t\telse this.semver = new SemVer(m[2], this.options.loose);\n\t\t}\n\t\ttoString() {\n\t\t\treturn this.value;\n\t\t}\n\t\ttest(version) {\n\t\t\tdebug(\"Comparator.test\", version, this.options.loose);\n\t\t\tif (this.semver === ANY || version === ANY) return true;\n\t\t\tif (typeof version === \"string\") try {\n\t\t\t\tversion = new SemVer(version, this.options);\n\t\t\t} catch (er) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn cmp(version, this.operator, this.semver, this.options);\n\t\t}\n\t\tintersects(comp, options) {\n\t\t\tif (!(comp instanceof Comparator)) throw new TypeError(\"a Comparator is required\");\n\t\t\tif (this.operator === \"\") {\n\t\t\t\tif (this.value === \"\") return true;\n\t\t\t\treturn new Range(comp.value, options).test(this.value);\n\t\t\t} else if (comp.operator === \"\") {\n\t\t\t\tif (comp.value === \"\") return true;\n\t\t\t\treturn new Range(this.value, options).test(comp.semver);\n\t\t\t}\n\t\t\toptions = parseOptions(options);\n\t\t\tif (options.includePrerelease && (this.value === \"<0.0.0-0\" || comp.value === \"<0.0.0-0\")) return false;\n\t\t\tif (!options.includePrerelease && (this.value.startsWith(\"<0.0.0\") || comp.value.startsWith(\"<0.0.0\"))) return false;\n\t\t\tif (this.operator.startsWith(\">\") && comp.operator.startsWith(\">\")) return true;\n\t\t\tif (this.operator.startsWith(\"<\") && comp.operator.startsWith(\"<\")) return true;\n\t\t\tif (this.semver.version === comp.semver.version && this.operator.includes(\"=\") && comp.operator.includes(\"=\")) return true;\n\t\t\tif (cmp(this.semver, \"<\", comp.semver, options) && this.operator.startsWith(\">\") && comp.operator.startsWith(\"<\")) return true;\n\t\t\tif (cmp(this.semver, \">\", comp.semver, options) && this.operator.startsWith(\"<\") && comp.operator.startsWith(\">\")) return true;\n\t\t\treturn false;\n\t\t}\n\t};\n\tconst parseOptions = require_parse_options();\n\tconst { safeRe: re, t } = require_re();\n\tconst cmp = require_cmp();\n\tconst debug = require_debug();\n\tconst SemVer = require_semver$1();\n\tconst Range = require_range();\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/satisfies.js\nvar require_satisfies = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst Range = require_range();\n\tconst satisfies = (version, range, options) => {\n\t\ttry {\n\t\t\trange = new Range(range, options);\n\t\t} catch (er) {\n\t\t\treturn false;\n\t\t}\n\t\treturn range.test(version);\n\t};\n\tmodule.exports = satisfies;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/ranges/to-comparators.js\nvar require_to_comparators = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst Range = require_range();\n\tconst toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(\" \").trim().split(\" \"));\n\tmodule.exports = toComparators;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/ranges/max-satisfying.js\nvar require_max_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst SemVer = require_semver$1();\n\tconst Range = require_range();\n\tconst maxSatisfying = (versions, range, options) => {\n\t\tlet max = null;\n\t\tlet maxSV = null;\n\t\tlet rangeObj = null;\n\t\ttry {\n\t\t\trangeObj = new Range(range, options);\n\t\t} catch (er) {\n\t\t\treturn null;\n\t\t}\n\t\tversions.forEach((v) => {\n\t\t\tif (rangeObj.test(v)) {\n\t\t\t\tif (!max || maxSV.compare(v) === -1) {\n\t\t\t\t\tmax = v;\n\t\t\t\t\tmaxSV = new SemVer(max, options);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn max;\n\t};\n\tmodule.exports = maxSatisfying;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/ranges/min-satisfying.js\nvar require_min_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst SemVer = require_semver$1();\n\tconst Range = require_range();\n\tconst minSatisfying = (versions, range, options) => {\n\t\tlet min = null;\n\t\tlet minSV = null;\n\t\tlet rangeObj = null;\n\t\ttry {\n\t\t\trangeObj = new Range(range, options);\n\t\t} catch (er) {\n\t\t\treturn null;\n\t\t}\n\t\tversions.forEach((v) => {\n\t\t\tif (rangeObj.test(v)) {\n\t\t\t\tif (!min || minSV.compare(v) === 1) {\n\t\t\t\t\tmin = v;\n\t\t\t\t\tminSV = new SemVer(min, options);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn min;\n\t};\n\tmodule.exports = minSatisfying;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/ranges/min-version.js\nvar require_min_version = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst SemVer = require_semver$1();\n\tconst Range = require_range();\n\tconst gt = require_gt();\n\tconst minVersion = (range, loose) => {\n\t\trange = new Range(range, loose);\n\t\tlet minver = new SemVer(\"0.0.0\");\n\t\tif (range.test(minver)) return minver;\n\t\tminver = new SemVer(\"0.0.0-0\");\n\t\tif (range.test(minver)) return minver;\n\t\tminver = null;\n\t\tfor (let i = 0; i < range.set.length; ++i) {\n\t\t\tconst comparators = range.set[i];\n\t\t\tlet setMin = null;\n\t\t\tcomparators.forEach((comparator) => {\n\t\t\t\tconst compver = new SemVer(comparator.semver.version);\n\t\t\t\tswitch (comparator.operator) {\n\t\t\t\t\tcase \">\":\n\t\t\t\t\t\tif (compver.prerelease.length === 0) compver.patch++;\n\t\t\t\t\t\telse compver.prerelease.push(0);\n\t\t\t\t\t\tcompver.raw = compver.format();\n\t\t\t\t\tcase \"\":\n\t\t\t\t\tcase \">=\":\n\t\t\t\t\t\tif (!setMin || gt(compver, setMin)) setMin = compver;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"<\":\n\t\t\t\t\tcase \"<=\": break;\n\t\t\t\t\tdefault: throw new Error(`Unexpected operation: ${comparator.operator}`);\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (setMin && (!minver || gt(minver, setMin))) minver = setMin;\n\t\t}\n\t\tif (minver && range.test(minver)) return minver;\n\t\treturn null;\n\t};\n\tmodule.exports = minVersion;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/ranges/valid.js\nvar require_valid = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst Range = require_range();\n\tconst validRange = (range, options) => {\n\t\ttry {\n\t\t\treturn new Range(range, options).range || \"*\";\n\t\t} catch (er) {\n\t\t\treturn null;\n\t\t}\n\t};\n\tmodule.exports = validRange;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/ranges/outside.js\nvar require_outside = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst SemVer = require_semver$1();\n\tconst Comparator = require_comparator();\n\tconst { ANY } = Comparator;\n\tconst Range = require_range();\n\tconst satisfies = require_satisfies();\n\tconst gt = require_gt();\n\tconst lt = require_lt();\n\tconst lte = require_lte();\n\tconst gte = require_gte();\n\tconst outside = (version, range, hilo, options) => {\n\t\tversion = new SemVer(version, options);\n\t\trange = new Range(range, options);\n\t\tlet gtfn, ltefn, ltfn, comp, ecomp;\n\t\tswitch (hilo) {\n\t\t\tcase \">\":\n\t\t\t\tgtfn = gt;\n\t\t\t\tltefn = lte;\n\t\t\t\tltfn = lt;\n\t\t\t\tcomp = \">\";\n\t\t\t\tecomp = \">=\";\n\t\t\t\tbreak;\n\t\t\tcase \"<\":\n\t\t\t\tgtfn = lt;\n\t\t\t\tltefn = gte;\n\t\t\t\tltfn = gt;\n\t\t\t\tcomp = \"<\";\n\t\t\t\tecomp = \"<=\";\n\t\t\t\tbreak;\n\t\t\tdefault: throw new TypeError(\"Must provide a hilo val of \\\"<\\\" or \\\">\\\"\");\n\t\t}\n\t\tif (satisfies(version, range, options)) return false;\n\t\tfor (let i = 0; i < range.set.length; ++i) {\n\t\t\tconst comparators = range.set[i];\n\t\t\tlet high = null;\n\t\t\tlet low = null;\n\t\t\tcomparators.forEach((comparator) => {\n\t\t\t\tif (comparator.semver === ANY) comparator = new Comparator(\">=0.0.0\");\n\t\t\t\thigh = high || comparator;\n\t\t\t\tlow = low || comparator;\n\t\t\t\tif (gtfn(comparator.semver, high.semver, options)) high = comparator;\n\t\t\t\telse if (ltfn(comparator.semver, low.semver, options)) low = comparator;\n\t\t\t});\n\t\t\tif (high.operator === comp || high.operator === ecomp) return false;\n\t\t\tif ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) return false;\n\t\t\telse if (low.operator === ecomp && ltfn(version, low.semver)) return false;\n\t\t}\n\t\treturn true;\n\t};\n\tmodule.exports = outside;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/ranges/gtr.js\nvar require_gtr = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst outside = require_outside();\n\tconst gtr = (version, range, options) => outside(version, range, \">\", options);\n\tmodule.exports = gtr;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/ranges/ltr.js\nvar require_ltr = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst outside = require_outside();\n\tconst ltr = (version, range, options) => outside(version, range, \"<\", options);\n\tmodule.exports = ltr;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/ranges/intersects.js\nvar require_intersects = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst Range = require_range();\n\tconst intersects = (r1, r2, options) => {\n\t\tr1 = new Range(r1, options);\n\t\tr2 = new Range(r2, options);\n\t\treturn r1.intersects(r2, options);\n\t};\n\tmodule.exports = intersects;\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/ranges/simplify.js\nvar require_simplify = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst satisfies = require_satisfies();\n\tconst compare = require_compare();\n\tmodule.exports = (versions, range, options) => {\n\t\tconst set = [];\n\t\tlet first = null;\n\t\tlet prev = null;\n\t\tconst v = versions.sort((a, b) => compare(a, b, options));\n\t\tfor (const version of v) if (satisfies(version, range, options)) {\n\t\t\tprev = version;\n\t\t\tif (!first) first = version;\n\t\t} else {\n\t\t\tif (prev) set.push([first, prev]);\n\t\t\tprev = null;\n\t\t\tfirst = null;\n\t\t}\n\t\tif (first) set.push([first, null]);\n\t\tconst ranges = [];\n\t\tfor (const [min, max] of set) if (min === max) ranges.push(min);\n\t\telse if (!max && min === v[0]) ranges.push(\"*\");\n\t\telse if (!max) ranges.push(`>=${min}`);\n\t\telse if (min === v[0]) ranges.push(`<=${max}`);\n\t\telse ranges.push(`${min} - ${max}`);\n\t\tconst simplified = ranges.join(\" || \");\n\t\tconst original = typeof range.raw === \"string\" ? range.raw : String(range);\n\t\treturn simplified.length < original.length ? simplified : range;\n\t};\n}));\n//#endregion\n//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/ranges/subset.js\nvar require_subset = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst Range = require_range();\n\tconst Comparator = require_comparator();\n\tconst { ANY } = Comparator;\n\tconst satisfies = require_satisfies();\n\tconst compare = require_compare();\n\tconst subset = (sub, dom, options = {}) => {\n\t\tif (sub === dom) return true;\n\t\tsub = new Range(sub, options);\n\t\tdom = new Range(dom, options);\n\t\tlet sawNonNull = false;\n\t\tOUTER: for (const simpleSub of sub.set) {\n\t\t\tfor (const simpleDom of dom.set) {\n\t\t\t\tconst isSub = simpleSubset(simpleSub, simpleDom, options);\n\t\t\t\tsawNonNull = sawNonNull || isSub !== null;\n\t\t\t\tif (isSub) continue OUTER;\n\t\t\t}\n\t\t\tif (sawNonNull) return false;\n\t\t}\n\t\treturn true;\n\t};\n\tconst minimumVersionWithPreRelease = [new Comparator(\">=0.0.0-0\")];\n\tconst minimumVersion = [new Comparator(\">=0.0.0\")];\n\tconst simpleSubset = (sub, dom, options) => {\n\t\tif (sub === dom) return true;\n\t\tif (sub.length === 1 && sub[0].semver === ANY) if (dom.length === 1 && dom[0].semver === ANY) return true;\n\t\telse if (options.includePrerelease) sub = minimumVersionWithPreRelease;\n\t\telse sub = minimumVersion;\n\t\tif (dom.length === 1 && dom[0].semver === ANY) if (options.includePrerelease) return true;\n\t\telse dom = minimumVersion;\n\t\tconst eqSet = /* @__PURE__ */ new Set();\n\t\tlet gt, lt;\n\t\tfor (const c of sub) if (c.operator === \">\" || c.operator === \">=\") gt = higherGT(gt, c, options);\n\t\telse if (c.operator === \"<\" || c.operator === \"<=\") lt = lowerLT(lt, c, options);\n\t\telse eqSet.add(c.semver);\n\t\tif (eqSet.size > 1) return null;\n\t\tlet gtltComp;\n\t\tif (gt && lt) {\n\t\t\tgtltComp = compare(gt.semver, lt.semver, options);\n\t\t\tif (gtltComp > 0) return null;\n\t\t\telse if (gtltComp === 0 && (gt.operator !== \">=\" || lt.operator !== \"<=\")) return null;\n\t\t}\n\t\tfor (const eq of eqSet) {\n\t\t\tif (gt && !satisfies(eq, String(gt), options)) return null;\n\t\t\tif (lt && !satisfies(eq, String(lt), options)) return null;\n\t\t\tfor (const c of dom) if (!satisfies(eq, String(c), options)) return false;\n\t\t\treturn true;\n\t\t}\n\t\tlet higher, lower;\n\t\tlet hasDomLT, hasDomGT;\n\t\tlet needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false;\n\t\tlet needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false;\n\t\tif (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === \"<\" && needDomLTPre.prerelease[0] === 0) needDomLTPre = false;\n\t\tfor (const c of dom) {\n\t\t\thasDomGT = hasDomGT || c.operator === \">\" || c.operator === \">=\";\n\t\t\thasDomLT = hasDomLT || c.operator === \"<\" || c.operator === \"<=\";\n\t\t\tif (gt) {\n\t\t\t\tif (needDomGTPre) {\n\t\t\t\t\tif (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) needDomGTPre = false;\n\t\t\t\t}\n\t\t\t\tif (c.operator === \">\" || c.operator === \">=\") {\n\t\t\t\t\thigher = higherGT(gt, c, options);\n\t\t\t\t\tif (higher === c && higher !== gt) return false;\n\t\t\t\t} else if (gt.operator === \">=\" && !satisfies(gt.semver, String(c), options)) return false;\n\t\t\t}\n\t\t\tif (lt) {\n\t\t\t\tif (needDomLTPre) {\n\t\t\t\t\tif (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) needDomLTPre = false;\n\t\t\t\t}\n\t\t\t\tif (c.operator === \"<\" || c.operator === \"<=\") {\n\t\t\t\t\tlower = lowerLT(lt, c, options);\n\t\t\t\t\tif (lower === c && lower !== lt) return false;\n\t\t\t\t} else if (lt.operator === \"<=\" && !satisfies(lt.semver, String(c), options)) return false;\n\t\t\t}\n\t\t\tif (!c.operator && (lt || gt) && gtltComp !== 0) return false;\n\t\t}\n\t\tif (gt && hasDomLT && !lt && gtltComp !== 0) return false;\n\t\tif (lt && hasDomGT && !gt && gtltComp !== 0) return false;\n\t\tif (needDomGTPre || needDomLTPre) return false;\n\t\treturn true;\n\t};\n\tconst higherGT = (a, b, options) => {\n\t\tif (!a) return b;\n\t\tconst comp = compare(a.semver, b.semver, options);\n\t\treturn comp > 0 ? a : comp < 0 ? b : b.operator === \">\" && a.operator === \">=\" ? b : a;\n\t};\n\tconst lowerLT = (a, b, options) => {\n\t\tif (!a) return b;\n\t\tconst comp = compare(a.semver, b.semver, options);\n\t\treturn comp < 0 ? a : comp > 0 ? b : b.operator === \"<\" && a.operator === \"<=\" ? b : a;\n\t};\n\tmodule.exports = subset;\n}));\n//#endregion\n//#region ../internals-helpers/dist/index.js\nvar import_semver = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst internalRe = require_re();\n\tconst constants = require_constants();\n\tconst SemVer = require_semver$1();\n\tconst identifiers = require_identifiers();\n\tmodule.exports = {\n\t\tparse: require_parse(),\n\t\tvalid: require_valid$1(),\n\t\tclean: require_clean(),\n\t\tinc: require_inc(),\n\t\tdiff: require_diff(),\n\t\tmajor: require_major(),\n\t\tminor: require_minor(),\n\t\tpatch: require_patch(),\n\t\tprerelease: require_prerelease(),\n\t\tcompare: require_compare(),\n\t\trcompare: require_rcompare(),\n\t\tcompareLoose: require_compare_loose(),\n\t\tcompareBuild: require_compare_build(),\n\t\tsort: require_sort(),\n\t\trsort: require_rsort(),\n\t\tgt: require_gt(),\n\t\tlt: require_lt(),\n\t\teq: require_eq(),\n\t\tneq: require_neq(),\n\t\tgte: require_gte(),\n\t\tlte: require_lte(),\n\t\tcmp: require_cmp(),\n\t\tcoerce: require_coerce(),\n\t\tComparator: require_comparator(),\n\t\tRange: require_range(),\n\t\tsatisfies: require_satisfies(),\n\t\ttoComparators: require_to_comparators(),\n\t\tmaxSatisfying: require_max_satisfying(),\n\t\tminSatisfying: require_min_satisfying(),\n\t\tminVersion: require_min_version(),\n\t\tvalidRange: require_valid(),\n\t\toutside: require_outside(),\n\t\tgtr: require_gtr(),\n\t\tltr: require_ltr(),\n\t\tintersects: require_intersects(),\n\t\tsimplifyRange: require_simplify(),\n\t\tsubset: require_subset(),\n\t\tSemVer,\n\t\tre: internalRe.re,\n\t\tsrc: internalRe.src,\n\t\ttokens: internalRe.t,\n\t\tSEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,\n\t\tRELEASE_TYPES: constants.RELEASE_TYPES,\n\t\tcompareIdentifiers: identifiers.compareIdentifiers,\n\t\trcompareIdentifiers: identifiers.rcompareIdentifiers\n\t};\n})))(), 1);\nconst ALPHANUMERIC = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n`${ALPHANUMERIC}`, `${ALPHANUMERIC}`, `${ALPHANUMERIC}`, `${ALPHANUMERIC}`;\nfunction resolve(range, versions) {\n\ttry {\n\t\tif (!range || !import_semver.default.validRange(range)) return null;\n\t\tconst validVersions = versions.filter((v) => import_semver.default.valid(v) !== null);\n\t\tif (validVersions.length === 0) return null;\n\t\treturn import_semver.default.maxSatisfying(validVersions, range) ?? null;\n\t} catch {\n\t\treturn null;\n\t}\n}\nfunction isDomainAllowed(domain, allowedDomains) {\n\tfor (const allowed of allowedDomains) {\n\t\tif (allowed === domain) return true;\n\t\tif (allowed.startsWith(\"*.\")) {\n\t\t\tconst suffix = allowed.slice(1);\n\t\t\tif (domain.endsWith(suffix) || domain === allowed.slice(2)) return true;\n\t\t\tif (domain === allowed) return true;\n\t\t}\n\t}\n\treturn false;\n}\nfunction isPathAllowed(requestedPath, allowedPaths) {\n\tconst norm = (p) => p.replaceAll(\"\\\\\", \"/\");\n\tconst req = norm(requestedPath);\n\tif (req.includes(\"..\")) return false;\n\tfor (const allowed of allowedPaths) {\n\t\tconst a = norm(allowed);\n\t\tif (a === req) return true;\n\t\tif (a.endsWith(\"/**\")) {\n\t\t\tconst prefix = a.slice(0, -3);\n\t\t\tif (req === prefix || req.startsWith(`${prefix}/`)) return true;\n\t\t}\n\t}\n\treturn false;\n}\n/**\n* Thrown by checkPermissionBudget when a skill's declared permissions exceed the project budget.\n*\n* internals-helpers cannot import from @tankpkg/sdk (would invert dep graph).\n* sdk shim catches this and re-throws as TankPermissionError to preserve\n* the public sdk error API. See D7 / INTENT C25b.\n*/\nvar PermissionBudgetError = class extends Error {\n\tconstructor(message) {\n\t\tsuper(message);\n\t\tthis.name = \"PermissionBudgetError\";\n\t}\n};\nfunction checkPermissionBudget$1(budget, skillPerms, skillName) {\n\tif (!skillPerms) return;\n\tif (skillPerms.subprocess === true && budget.subprocess !== true) throw new PermissionBudgetError(`${skillName} requires subprocess access, but project budget does not allow it`);\n\tif (skillPerms.network?.outbound && skillPerms.network.outbound.length > 0) {\n\t\tconst budgetDomains = budget.network?.outbound ?? [];\n\t\tfor (const domain of skillPerms.network.outbound) if (!isDomainAllowed(domain, budgetDomains)) throw new PermissionBudgetError(`${skillName} requests network access to \"${domain}\", which is not in the project's permission budget`);\n\t}\n\tif (skillPerms.filesystem?.read && skillPerms.filesystem.read.length > 0) {\n\t\tconst budgetPaths = budget.filesystem?.read ?? [];\n\t\tfor (const p of skillPerms.filesystem.read) if (!isPathAllowed(p, budgetPaths)) throw new PermissionBudgetError(`${skillName} requests filesystem read access to \"${p}\", which is not in the project's permission budget`);\n\t}\n\tif (skillPerms.filesystem?.write && skillPerms.filesystem.write.length > 0) {\n\t\tconst budgetPaths = budget.filesystem?.write ?? [];\n\t\tfor (const p of skillPerms.filesystem.write) if (!isPathAllowed(p, budgetPaths)) throw new PermissionBudgetError(`${skillName} requests filesystem write access to \"${p}\", which is not in the project's permission budget`);\n\t}\n}\nfunction collectPermissionViolations$1(budget, skillPerms, skillName) {\n\tconst violations = [];\n\tif (!skillPerms) return violations;\n\tif (skillPerms.subprocess === true && budget.subprocess !== true) violations.push({\n\t\tskillName,\n\t\ttype: \"subprocess\",\n\t\trequested: \"true\"\n\t});\n\tif (skillPerms.network?.outbound) {\n\t\tconst budgetDomains = budget.network?.outbound ?? [];\n\t\tfor (const domain of skillPerms.network.outbound) if (!isDomainAllowed(domain, budgetDomains)) violations.push({\n\t\t\tskillName,\n\t\t\ttype: \"network.outbound\",\n\t\t\trequested: domain\n\t\t});\n\t}\n\tif (skillPerms.filesystem?.read) {\n\t\tconst budgetPaths = budget.filesystem?.read ?? [];\n\t\tfor (const p of skillPerms.filesystem.read) if (!isPathAllowed(p, budgetPaths)) violations.push({\n\t\t\tskillName,\n\t\t\ttype: \"filesystem.read\",\n\t\t\trequested: p\n\t\t});\n\t}\n\tif (skillPerms.filesystem?.write) {\n\t\tconst budgetPaths = budget.filesystem?.write ?? [];\n\t\tfor (const p of skillPerms.filesystem.write) if (!isPathAllowed(p, budgetPaths)) violations.push({\n\t\t\tskillName,\n\t\t\ttype: \"filesystem.write\",\n\t\t\trequested: p\n\t\t});\n\t}\n\treturn violations;\n}\n//#endregion\n//#region src/install/permissions.ts\nfunction checkPermissionBudget(budget, skillPerms, skillName) {\n\ttry {\n\t\tcheckPermissionBudget$1(budget, skillPerms, skillName);\n\t} catch (e) {\n\t\tif (e instanceof PermissionBudgetError) throw new TankPermissionError(e.message);\n\t\tthrow e;\n\t}\n}\nfunction collectPermissionViolations(budget, skillPerms, skillName) {\n\treturn collectPermissionViolations$1(budget, skillPerms, skillName);\n}\n//#endregion\n//#region src/install/resolver.ts\nfunction buildSkillKey(name, version) {\n\treturn `${name}@${version}`;\n}\nfunction formatConflictMessage(conflict) {\n\tconst lines = [`Version conflict for ${conflict.skillName}:`];\n\tfor (const req of conflict.requirements) {\n\t\tconst origin = req.source.kind === \"root\" ? \"root\" : req.source.from ?? \"unknown\";\n\t\tlines.push(` - ${req.range} (required by ${origin})`);\n\t}\n\tlines.push(`Available versions: ${conflict.availableVersions.join(\", \")}`);\n\tlines.push(\"No single version satisfies all constraints.\");\n\treturn lines.join(\"\\n\");\n}\nasync function resolveDependencyTree(rootDependencies, fetcher) {\n\tconst constraintsByName = /* @__PURE__ */ new Map();\n\tconst selectedByName = /* @__PURE__ */ new Map();\n\tconst metadataCache = /* @__PURE__ */ new Map();\n\tconst versionsCache = /* @__PURE__ */ new Map();\n\tconst contributedDeps = /* @__PURE__ */ new Map();\n\tconst queue = /* @__PURE__ */ new Set();\n\tconst inProgress = /* @__PURE__ */ new Set();\n\tconst sortedRootNames = Object.keys(rootDependencies).sort();\n\tfor (const name of sortedRootNames) {\n\t\tconst range = rootDependencies[name];\n\t\tconstraintsByName.set(name, [{\n\t\t\tname,\n\t\t\trange,\n\t\t\tsource: { kind: \"root\" }\n\t\t}]);\n\t\tqueue.add(name);\n\t}\n\tconst MAX_ITERATIONS = 1e4;\n\tlet iterations = 0;\n\twhile (queue.size > 0) {\n\t\tif (++iterations > MAX_ITERATIONS) throw new Error(`Dependency resolution exceeded ${MAX_ITERATIONS} iterations. This likely indicates a degenerate dependency graph.`);\n\t\tconst name = [...queue].sort()[0];\n\t\tqueue.delete(name);\n\t\tif (inProgress.has(name)) continue;\n\t\tconst constraints = constraintsByName.get(name);\n\t\tif (!constraints || constraints.length === 0) continue;\n\t\tlet versionInfos = versionsCache.get(name);\n\t\tif (!versionInfos) {\n\t\t\tversionInfos = await fetcher.fetchVersions(name);\n\t\t\tversionsCache.set(name, versionInfos);\n\t\t}\n\t\tconst availableVersions = versionInfos.map((v) => v.version).sort();\n\t\tconst selectedVersion = findSatisfyingVersion(availableVersions, constraints);\n\t\tif (selectedVersion === null) throw new Error(formatConflictMessage({\n\t\t\tskillName: name,\n\t\t\trequirements: constraints,\n\t\t\tavailableVersions\n\t\t}));\n\t\tconst previousVersion = selectedByName.get(name);\n\t\tif (previousVersion === selectedVersion) continue;\n\t\tinProgress.add(name);\n\t\tif (previousVersion !== void 0) {\n\t\t\tconst prevKey = buildSkillKey(name, previousVersion);\n\t\t\tconst prevDeps = contributedDeps.get(prevKey) ?? [];\n\t\t\tfor (const depName of prevDeps) {\n\t\t\t\tconst depConstraints = constraintsByName.get(depName);\n\t\t\t\tif (depConstraints) {\n\t\t\t\t\tconst filtered = depConstraints.filter((r) => r.source.from !== prevKey);\n\t\t\t\t\tif (filtered.length > 0) constraintsByName.set(depName, filtered);\n\t\t\t\t\telse constraintsByName.delete(depName);\n\t\t\t\t\tqueue.add(depName);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcontributedDeps.delete(prevKey);\n\t\t}\n\t\tselectedByName.set(name, selectedVersion);\n\t\tconst skillKey = buildSkillKey(name, selectedVersion);\n\t\tlet meta = metadataCache.get(skillKey);\n\t\tif (!meta) {\n\t\t\tmeta = await fetcher.fetchMetadata(name, selectedVersion);\n\t\t\tmetadataCache.set(skillKey, meta);\n\t\t}\n\t\tconst depNames = [];\n\t\tconst sortedDepEntries = Object.entries(meta.dependencies).sort(([a], [b]) => a.localeCompare(b));\n\t\tfor (const [depName, depRange] of sortedDepEntries) {\n\t\t\tdepNames.push(depName);\n\t\t\tconst requirement = {\n\t\t\t\tname: depName,\n\t\t\t\trange: depRange,\n\t\t\t\tsource: {\n\t\t\t\t\tkind: \"skill\",\n\t\t\t\t\tfrom: skillKey\n\t\t\t\t}\n\t\t\t};\n\t\t\tconst existing = constraintsByName.get(depName) ?? [];\n\t\t\texisting.push(requirement);\n\t\t\tconstraintsByName.set(depName, existing);\n\t\t\tqueue.add(depName);\n\t\t}\n\t\tcontributedDeps.set(skillKey, depNames);\n\t\tinProgress.delete(name);\n\t}\n\tfor (const [name] of selectedByName) {\n\t\tconst constraints = constraintsByName.get(name);\n\t\tif (!constraints || constraints.length === 0) selectedByName.delete(name);\n\t}\n\treturn buildGraph(selectedByName, metadataCache);\n}\nfunction findSatisfyingVersion(availableVersions, constraints) {\n\tconst satisfyingSets = [...new Set(constraints.map((c) => c.range))].map((range) => {\n\t\tconst matching = /* @__PURE__ */ new Set();\n\t\tfor (const v of availableVersions) if (resolve(range, [v]) !== null) matching.add(v);\n\t\treturn matching;\n\t});\n\tif (satisfyingSets.length === 0) return null;\n\tlet intersection = satisfyingSets[0];\n\tfor (let i = 1; i < satisfyingSets.length; i++) intersection = new Set([...intersection].filter((v) => satisfyingSets[i].has(v)));\n\tif (intersection.size === 0) return null;\n\treturn resolve(\"*\", [...intersection]);\n}\nfunction buildGraph(selectedByName, metadataCache) {\n\tconst nodes = /* @__PURE__ */ new Map();\n\tconst installOrder = [];\n\tconst sortedEntries = [...selectedByName.entries()].sort(([a], [b]) => a.localeCompare(b));\n\tfor (const [name, version] of sortedEntries) {\n\t\tconst skillKey = buildSkillKey(name, version);\n\t\tconst meta = metadataCache.get(skillKey);\n\t\tif (!meta) throw new Error(`Internal error: missing metadata for ${skillKey}`);\n\t\tconst resolvedDeps = {};\n\t\tconst sortedDepNames = Object.keys(meta.dependencies).sort();\n\t\tfor (const depName of sortedDepNames) {\n\t\t\tconst depVersion = selectedByName.get(depName);\n\t\t\tif (depVersion === void 0) throw new Error(`Internal error: ${skillKey} depends on ${depName} but it was not resolved`);\n\t\t\tresolvedDeps[depName] = depVersion;\n\t\t}\n\t\tnodes.set(name, {\n\t\t\tname,\n\t\t\tversion,\n\t\t\tmeta,\n\t\t\tdependencies: resolvedDeps\n\t\t});\n\t\tinstallOrder.push(skillKey);\n\t}\n\treturn {\n\t\tnodes,\n\t\tinstallOrder\n\t};\n}\n//#endregion\n//#region src/install/pipeline.ts\nconst MAX_DOWNLOAD_BYTES = 100 * 1024 * 1024;\nconst MAX_EXTRACT_ENTRIES = 1e4;\nconst MAX_EXTRACT_FILE_BYTES = 50 * 1024 * 1024;\nconst MAX_EXTRACT_TOTAL_BYTES = 500 * 1024 * 1024;\nfunction validateDownloadUrl(url) {\n\tlet parsed;\n\ttry {\n\t\tparsed = new URL(url);\n\t} catch {\n\t\tthrow new TankNetworkError(`Invalid download URL: ${url}`);\n\t}\n\tif (parsed.protocol !== \"https:\" && parsed.protocol !== \"http:\") throw new TankNetworkError(`Download URL must use https or http: ${url}`);\n\tif (parsed.username || parsed.password) throw new TankNetworkError(`Download URL must not contain credentials: ${url}`);\n}\nasync function downloadAllParallel(nodes, onProgress) {\n\tconst results = /* @__PURE__ */ new Map();\n\tconst CONCURRENCY_LIMIT = 8;\n\tfor (let i = 0; i < nodes.length; i += CONCURRENCY_LIMIT) {\n\t\tconst promises = nodes.slice(i, i + CONCURRENCY_LIMIT).map(async (node) => {\n\t\t\tonProgress?.(`Downloading ${node.name}@${node.version}...`);\n\t\t\tvalidateDownloadUrl(node.meta.downloadUrl);\n\t\t\tlet res;\n\t\t\ttry {\n\t\t\t\tres = await fetch(node.meta.downloadUrl, { redirect: \"manual\" });\n\t\t\t} catch (err) {\n\t\t\t\tthrow new TankNetworkError(`Network error downloading ${node.name}@${node.version}`, err instanceof Error ? err : void 0);\n\t\t\t}\n\t\t\tif (res.status >= 300 && res.status < 400) throw new TankNetworkError(`Unexpected redirect (${res.status}) downloading ${node.name}@${node.version}. Refusing to follow.`);\n\t\t\tif (!res.ok) throw new TankNetworkError(`Failed to download ${node.name}@${node.version}: ${res.status} ${res.statusText}`);\n\t\t\tconst contentLength = res.headers.get(\"content-length\");\n\t\t\tif (contentLength && Number(contentLength) > MAX_DOWNLOAD_BYTES) throw new TankNetworkError(`Tarball for ${node.name}@${node.version} exceeds ${MAX_DOWNLOAD_BYTES} byte limit (Content-Length: ${contentLength})`);\n\t\t\tconst chunks = [];\n\t\t\tlet received = 0;\n\t\t\tconst reader = res.body?.getReader();\n\t\t\tif (!reader) throw new TankNetworkError(`No response body for ${node.name}@${node.version}`);\n\t\t\twhile (true) {\n\t\t\t\tconst { done, value } = await reader.read();\n\t\t\t\tif (done) break;\n\t\t\t\treceived += value.byteLength;\n\t\t\t\tif (received > MAX_DOWNLOAD_BYTES) {\n\t\t\t\t\treader.cancel();\n\t\t\t\t\tthrow new TankNetworkError(`Tarball for ${node.name}@${node.version} exceeds ${MAX_DOWNLOAD_BYTES} byte limit`);\n\t\t\t\t}\n\t\t\t\tchunks.push(value);\n\t\t\t}\n\t\t\tconst buffer = Buffer.concat(chunks);\n\t\t\tconst computedIntegrity = `sha512-${crypto$1.createHash(\"sha512\").update(buffer).digest(\"base64\")}`;\n\t\t\tif (computedIntegrity !== node.meta.integrity) throw new TankIntegrityError(`Integrity mismatch for ${node.name}@${node.version}`, {\n\t\t\t\texpected: node.meta.integrity,\n\t\t\t\tactual: computedIntegrity\n\t\t\t});\n\t\t\treturn {\n\t\t\t\tname: node.name,\n\t\t\t\tbuffer,\n\t\t\t\tintegrity: computedIntegrity\n\t\t\t};\n\t\t});\n\t\tconst batchResults = await Promise.all(promises);\n\t\tfor (const result of batchResults) results.set(result.name, {\n\t\t\tbuffer: result.buffer,\n\t\t\tintegrity: result.integrity\n\t\t});\n\t}\n\treturn results;\n}\nfunction verifyExtractedDependencies(extractDir, node, onProgress) {\n\tlet extractedManifestPath = path.join(extractDir, MANIFEST_FILENAME);\n\tif (!fs.existsSync(extractedManifestPath)) extractedManifestPath = path.join(extractDir, LEGACY_MANIFEST_FILENAME);\n\tif (!fs.existsSync(extractedManifestPath)) return;\n\ttry {\n\t\tconst raw = fs.readFileSync(extractedManifestPath, \"utf-8\");\n\t\tconst extractedDeps = JSON.parse(raw).skills ?? {};\n\t\tconst apiDeps = node.meta.dependencies;\n\t\tconst extractedSorted = Object.fromEntries(Object.entries(extractedDeps).sort(([a], [b]) => a.localeCompare(b)));\n\t\tconst apiSorted = Object.fromEntries(Object.entries(apiDeps).sort(([a], [b]) => a.localeCompare(b)));\n\t\tif (JSON.stringify(extractedSorted) !== JSON.stringify(apiSorted)) onProgress?.(`Warning: ${node.name}@${node.version} manifest dependencies differ from registry metadata`);\n\t} catch {}\n}\nfunction readExtractedDependencies(extractDir) {\n\tlet extractedManifestPath = path.join(extractDir, MANIFEST_FILENAME);\n\tif (!fs.existsSync(extractedManifestPath)) extractedManifestPath = path.join(extractDir, LEGACY_MANIFEST_FILENAME);\n\tif (!fs.existsSync(extractedManifestPath)) return {};\n\ttry {\n\t\tconst raw = fs.readFileSync(extractedManifestPath, \"utf-8\");\n\t\tconst extractedDeps = JSON.parse(raw).skills;\n\t\tif (!extractedDeps || typeof extractedDeps !== \"object\") return {};\n\t\tconst deps = {};\n\t\tfor (const [depName, depRange] of Object.entries(extractedDeps)) if (typeof depRange === \"string\") deps[depName] = depRange;\n\t\treturn deps;\n\t} catch {\n\t\treturn {};\n\t}\n}\nfunction writeLockfileWithResolvedGraph(lock, nodes, downloaded, onProgress) {\n\tfor (const node of nodes) {\n\t\tconst key = buildSkillKey(node.name, node.version);\n\t\tif (!downloaded.has(node.name) && lock.skills[key]) continue;\n\t\tconst integrity = downloaded.get(node.name)?.integrity ?? lock.skills[key]?.integrity ?? node.meta.integrity;\n\t\tconst permsParsed = permissionsSchema.safeParse(node.meta.permissions);\n\t\tif (!permsParsed.success) onProgress?.(`Warning: ${node.name}@${node.version} has unrecognized permissions format — treating as unrestricted`);\n\t\tconst validatedPerms = permsParsed.success ? permsParsed.data : {};\n\t\tlock.skills[key] = {\n\t\t\tresolved: node.meta.downloadUrl,\n\t\t\tintegrity,\n\t\t\tpermissions: validatedPerms,\n\t\t\taudit_score: node.meta.auditScore ?? null,\n\t\t\tdependencies: node.dependencies\n\t\t};\n\t}\n\tconst sortedSkills = {};\n\tfor (const key of Object.keys(lock.skills).sort()) sortedSkills[key] = lock.skills[key];\n\tlock.skills = sortedSkills;\n\treturn lock;\n}\nfunction mkdirSafeNoSymlinks(targetDir) {\n\tconst resolved = path.resolve(targetDir);\n\tconst segments = resolved.split(path.sep).filter(Boolean);\n\tlet current = resolved.startsWith(\"/\") ? \"/\" : \"\";\n\tfor (const seg of segments) {\n\t\tcurrent = path.join(current, seg);\n\t\tif (fs.existsSync(current)) {\n\t\t\tconst stat = fs.lstatSync(current);\n\t\t\tif (stat.isSymbolicLink()) throw new TankIntegrityError(`Symlink in install path: ${current}`);\n\t\t\tif (!stat.isDirectory()) throw new TankIntegrityError(`Non-directory in install path: ${current}`);\n\t\t} else fs.mkdirSync(current);\n\t}\n}\nfunction isDirNonEmpty(dir) {\n\ttry {\n\t\treturn fs.readdirSync(dir).length > 0;\n\t} catch {\n\t\treturn false;\n\t}\n}\nfunction moveEntryAcrossDevices(src, dst) {\n\ttry {\n\t\tfs.renameSync(src, dst);\n\t} catch (err) {\n\t\tif (err.code === \"EXDEV\") {\n\t\t\tfs.cpSync(src, dst, { recursive: true });\n\t\t\tfs.rmSync(src, {\n\t\t\t\trecursive: true,\n\t\t\t\tforce: true\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tthrow err;\n\t}\n}\nasync function extractSafely(tarball, destDir) {\n\tif (tarball.length > MAX_DOWNLOAD_BYTES) throw new TankIntegrityError(`Tarball exceeds ${MAX_DOWNLOAD_BYTES} byte limit`);\n\tconst tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), \"tank-extract-\"));\n\tconst tmpTarball = path.join(tmpDir, `${crypto$1.randomUUID()}.tgz`);\n\tfs.writeFileSync(tmpTarball, tarball, { flag: \"wx\" });\n\tlet entryCount = 0;\n\tlet totalBytes = 0;\n\tlet backupDir = null;\n\ttry {\n\t\tawait extract({\n\t\t\tfile: tmpTarball,\n\t\t\tcwd: tmpDir,\n\t\t\tfilter: (entryPath) => {\n\t\t\t\tentryCount++;\n\t\t\t\tif (entryCount > MAX_EXTRACT_ENTRIES) throw new Error(`Tarball exceeds ${MAX_EXTRACT_ENTRIES} entry limit`);\n\t\t\t\tif (path.isAbsolute(entryPath)) throw new Error(`Absolute path in tarball: ${entryPath}`);\n\t\t\t\tif (entryPath.split(\"/\").includes(\"..\") || entryPath.split(path.sep).includes(\"..\")) throw new Error(`Path traversal in tarball: ${entryPath}`);\n\t\t\t\treturn true;\n\t\t\t},\n\t\t\tonReadEntry: (entry) => {\n\t\t\t\tif (entry.type === \"SymbolicLink\" || entry.type === \"Link\") throw new Error(`Symlink/hardlink in tarball: ${entry.path}`);\n\t\t\t\tif (entry.size && entry.size > MAX_EXTRACT_FILE_BYTES) throw new Error(`File ${entry.path} exceeds ${MAX_EXTRACT_FILE_BYTES} byte limit`);\n\t\t\t\ttotalBytes += entry.size ?? 0;\n\t\t\t\tif (totalBytes > MAX_EXTRACT_TOTAL_BYTES) throw new Error(`Total extracted size exceeds ${MAX_EXTRACT_TOTAL_BYTES} byte limit`);\n\t\t\t}\n\t\t});\n\t\tmkdirSafeNoSymlinks(destDir);\n\t\tif (isDirNonEmpty(destDir)) {\n\t\t\tbackupDir = `${destDir}.tank-old-${crypto$1.randomUUID()}`;\n\t\t\tfs.renameSync(destDir, backupDir);\n\t\t\tmkdirSafeNoSymlinks(destDir);\n\t\t}\n\t\tfor (const entry of fs.readdirSync(tmpDir)) {\n\t\t\tif (entry === path.basename(tmpTarball)) continue;\n\t\t\tmoveEntryAcrossDevices(path.join(tmpDir, entry), path.join(destDir, entry));\n\t\t}\n\t\tif (backupDir !== null) {\n\t\t\tfs.rmSync(backupDir, {\n\t\t\t\trecursive: true,\n\t\t\t\tforce: true\n\t\t\t});\n\t\t\tbackupDir = null;\n\t\t}\n\t} catch (err) {\n\t\tif (backupDir !== null && fs.existsSync(backupDir)) try {\n\t\t\tfs.rmSync(destDir, {\n\t\t\t\trecursive: true,\n\t\t\t\tforce: true\n\t\t\t});\n\t\t\tfs.renameSync(backupDir, destDir);\n\t\t} catch {}\n\t\tthrow err;\n\t} finally {\n\t\tfs.rmSync(tmpDir, {\n\t\t\trecursive: true,\n\t\t\tforce: true\n\t\t});\n\t}\n}\nfunction getExtractDir(projectDir, skillName) {\n\tif (skillName.startsWith(\"@\")) {\n\t\tconst [scope, name] = skillName.split(\"/\");\n\t\treturn path.join(projectDir, \".tank\", \"skills\", scope, name);\n\t}\n\treturn path.join(projectDir, \".tank\", \"skills\", skillName);\n}\nfunction getGlobalExtractDir(homedir, skillName) {\n\tconst globalDir = path.join(homedir, \".tank\", \"skills\");\n\tif (skillName.startsWith(\"@\")) {\n\t\tconst [scope, name] = skillName.split(\"/\");\n\t\treturn path.join(globalDir, scope, name);\n\t}\n\treturn path.join(globalDir, skillName);\n}\nfunction parseLockKey(key) {\n\tconst lastAt = key.lastIndexOf(\"@\");\n\tif (lastAt <= 0) throw new Error(`Invalid lockfile key: ${key}`);\n\treturn key.slice(0, lastAt);\n}\nfunction parseVersionFromLockKey(key) {\n\tconst lastAt = key.lastIndexOf(\"@\");\n\tif (lastAt <= 0 || lastAt === key.length - 1) throw new Error(`Invalid lockfile key: ${key}`);\n\treturn key.slice(lastAt + 1);\n}\nfunction getResolvedNodesInOrder(nodes, installOrder) {\n\tconst orderedNodes = [];\n\tfor (const key of installOrder) {\n\t\tconst skillName = parseLockKey(key);\n\t\tconst node = nodes.get(skillName);\n\t\tif (!node) throw new Error(`Internal error: missing resolved node for ${key}`);\n\t\torderedNodes.push(node);\n\t}\n\treturn orderedNodes;\n}\n//#endregion\n//#region src/tools.ts\nconst MAX_TOOL_NAME_LENGTH = 64;\nconst MAX_DESCRIPTION_LENGTH = 1024;\nconst MAX_FILES_IN_DESCRIPTION = 30;\nconst MAX_FILES_IN_ERROR = 10;\nfunction sanitizeToolName(skillName) {\n\treturn skillName.replace(/[^a-zA-Z0-9_]/g, \"_\").replace(/^_+/, \"\").replace(/_+/g, \"_\").slice(0, MAX_TOOL_NAME_LENGTH) || \"skill_tool\";\n}\nfunction buildParameterSchema() {\n\treturn {\n\t\ttype: \"object\",\n\t\trequired: [\"action\"],\n\t\tadditionalProperties: false,\n\t\tproperties: {\n\t\t\taction: {\n\t\t\t\ttype: \"string\",\n\t\t\t\tenum: [\n\t\t\t\t\t\"read\",\n\t\t\t\t\t\"list\",\n\t\t\t\t\t\"read_all\"\n\t\t\t\t],\n\t\t\t\tdescription: \"read: read a single file (requires path). list: list all files. read_all: complete skill with references and scripts.\"\n\t\t\t},\n\t\t\tpath: {\n\t\t\t\ttype: \"string\",\n\t\t\t\tdescription: \"File path to read (required when action is \\\"read\\\"). Example: \\\"SKILL.md\\\", \\\"references/guide.md\\\"\"\n\t\t\t}\n\t\t}\n\t};\n}\nfunction truncate(text, max) {\n\treturn text.length <= max ? text : `${text.slice(0, max - 3)}...`;\n}\nfunction buildDescription(skillName, version, skillDescription, files) {\n\tconst refFiles = files.filter((f) => f.startsWith(\"references/\"));\n\tconst scriptFiles = files.filter((f) => f.startsWith(\"scripts/\"));\n\tconst displayFiles = files.length <= MAX_FILES_IN_DESCRIPTION ? files.join(\", \") : `${files.slice(0, MAX_FILES_IN_DESCRIPTION).join(\", \")} and ${files.length - MAX_FILES_IN_DESCRIPTION} more`;\n\tconst parts = [\n\t\t`Access the \"${skillName}\" skill (v${version}).`,\n\t\ttruncate(skillDescription, 200),\n\t\t\"\",\n\t\t\"Actions: read_all | list | read (with path)\",\n\t\t`Files (${files.length}): ${displayFiles}`\n\t];\n\tif (refFiles.length > 0) parts.push(`References: ${refFiles.map((f) => f.replace(\"references/\", \"\")).join(\", \")}`);\n\tif (scriptFiles.length > 0) parts.push(`Scripts: ${scriptFiles.map((f) => f.replace(\"scripts/\", \"\")).join(\", \")}`);\n\treturn truncate(parts.join(\"\\n\"), MAX_DESCRIPTION_LENGTH);\n}\nasync function createSkillTool(client, skillName, version) {\n\tconst info = await client.info(skillName);\n\tconst ver = version ?? info.latestVersion;\n\tif (!ver) throw new TankNotFoundError(`No published versions for ${skillName}`, skillName);\n\tconst files = await client.listFiles(skillName, ver);\n\tconst filesSet = new Set(files);\n\tconst toolName = sanitizeToolName(skillName);\n\tconst description = buildDescription(skillName, ver, info.description ?? \"\", files);\n\tconst parameterSchema = buildParameterSchema();\n\tasync function execute(input) {\n\t\ttry {\n\t\t\tswitch (input.action) {\n\t\t\t\tcase \"list\": return {\n\t\t\t\t\tsuccess: true,\n\t\t\t\t\tfiles\n\t\t\t\t};\n\t\t\t\tcase \"read\":\n\t\t\t\t\tif (!input.path) return {\n\t\t\t\t\t\tsuccess: false,\n\t\t\t\t\t\terror: \"path is required for action \\\"read\\\"\"\n\t\t\t\t\t};\n\t\t\t\t\tif (!filesSet.has(input.path)) {\n\t\t\t\t\t\tconst hint = files.slice(0, MAX_FILES_IN_ERROR).join(\", \");\n\t\t\t\t\t\tconst suffix = files.length > MAX_FILES_IN_ERROR ? ` and ${files.length - MAX_FILES_IN_ERROR} more` : \"\";\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tsuccess: false,\n\t\t\t\t\t\t\terror: `File not found: ${input.path}. Available: ${hint}${suffix}`\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\treturn {\n\t\t\t\t\t\tsuccess: true,\n\t\t\t\t\t\tcontent: await client.readFile(skillName, ver, input.path)\n\t\t\t\t\t};\n\t\t\t\tcase \"read_all\": {\n\t\t\t\t\tconst skill = await client.readSkill(skillName, ver);\n\t\t\t\t\treturn {\n\t\t\t\t\t\tsuccess: true,\n\t\t\t\t\t\tskill: {\n\t\t\t\t\t\t\tcontent: skill.content,\n\t\t\t\t\t\t\treferences: skill.references,\n\t\t\t\t\t\t\tscripts: skill.scripts,\n\t\t\t\t\t\t\tfiles: skill.files\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tdefault: return {\n\t\t\t\t\tsuccess: false,\n\t\t\t\t\terror: `Unknown action: ${String(input.action)}`\n\t\t\t\t};\n\t\t\t}\n\t\t} catch (err) {\n\t\t\treturn {\n\t\t\t\tsuccess: false,\n\t\t\t\terror: err instanceof Error ? err.message : String(err)\n\t\t\t};\n\t\t}\n\t}\n\treturn {\n\t\tname: toolName,\n\t\tskillName,\n\t\tversion: ver,\n\t\tdescription,\n\t\tfiles,\n\t\texecute,\n\t\ttoOpenAI() {\n\t\t\treturn {\n\t\t\t\ttype: \"function\",\n\t\t\t\tfunction: {\n\t\t\t\t\tname: toolName,\n\t\t\t\t\tdescription,\n\t\t\t\t\tparameters: parameterSchema\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\t\ttoMCP() {\n\t\t\treturn {\n\t\t\t\tname: toolName,\n\t\t\t\tdescription,\n\t\t\t\tinputSchema: parameterSchema\n\t\t\t};\n\t\t}\n\t};\n}\nasync function createSkillTools(client, skillNames) {\n\tconst tools = [];\n\tfor (let i = 0; i < skillNames.length; i += 6) {\n\t\tconst batch = skillNames.slice(i, i + 6);\n\t\tconst batchTools = await Promise.all(batch.map((name) => createSkillTool(client, name)));\n\t\ttools.push(...batchTools);\n\t}\n\treturn tools;\n}\n//#endregion\nexport { AGENT_PATHS, DEFAULT_CONFIG_DIR, DEFAULT_MAX_RETRIES, REGISTRY_URL as DEFAULT_REGISTRY_URL, DEFAULT_TIMEOUT_MS, LOCKFILE_FILENAME, MANIFEST_FILENAME, SDK_VERSION, SUPPORTED_AGENTS, TankAuthError, TankClient, TankConflictError, TankError, TankIntegrityError, TankNetworkError, TankNotFoundError, TankPermissionError, buildSkillKey, checkPermissionBudget, collectPermissionViolations, createSkillTool, createSkillTools, downloadAllParallel, extractSafely, getExtractDir, getGlobalExtractDir, getResolvedNodesInOrder, hasNativeAcceleration, isDomainAllowed, isPathAllowed, parseLockKey, parseVersionFromLockKey, readExtractedDependencies, resolveDependencyTree, verifyExtractedDependencies, writeLockfileWithResolvedGraph };\n","import fs from 'node:fs';\nimport os from 'node:os';\nimport path from 'node:path';\n\nexport interface TankConfig {\n token?: string;\n user?: { name: string; email: string };\n registry: string;\n}\n\nconst DEFAULT_CONFIG: TankConfig = {\n registry: 'https://www.tankpkg.dev'\n};\n\n/**\n * Get the path to the tank config directory.\n */\nexport function getConfigDir(configDir?: string): string {\n return configDir ?? path.join(os.homedir(), '.tank');\n}\n\n/**\n * Get the path to the tank config file.\n */\nexport function getConfigPath(configDir?: string): string {\n return path.join(getConfigDir(configDir), 'config.json');\n}\n\n/**\n * Read the tank config file. Returns defaults if file doesn't exist.\n */\nexport function getConfig(configDir?: string): TankConfig {\n const configPath = getConfigPath(configDir);\n\n try {\n const raw = fs.readFileSync(configPath, 'utf-8');\n const parsed = JSON.parse(raw) as Partial<TankConfig>;\n const merged = { ...DEFAULT_CONFIG, ...parsed };\n // TANK_TOKEN env var takes priority\n const envToken = process.env.TANK_TOKEN?.trim();\n if (envToken) {\n merged.token = envToken;\n }\n return merged;\n } catch {\n const envToken = process.env.TANK_TOKEN?.trim();\n return {\n ...DEFAULT_CONFIG,\n ...(envToken ? { token: envToken } : {})\n };\n }\n}\n\n/**\n * Write config to disk. Merges with existing config.\n */\nexport function setConfig(partial: Partial<TankConfig>, configDir?: string): void {\n const dir = getConfigDir(configDir);\n const configPath = getConfigPath(configDir);\n\n if (!fs.existsSync(dir)) {\n fs.mkdirSync(dir, { recursive: true, mode: 0o700 });\n }\n\n const existing = getConfig(configDir);\n const merged = { ...existing, ...partial };\n\n fs.writeFileSync(configPath, `${JSON.stringify(merged, null, 2)}\\n`, {\n encoding: 'utf-8',\n mode: 0o600\n });\n}\n","import { TankAuthError, TankClient } from '@tankpkg/sdk';\nimport { getConfig, type TankConfig } from './config.js';\n\nexport interface ApiClientOptions {\n configDir?: string;\n}\n\nexport class TankApiClient {\n private client: TankClient;\n private config: TankConfig;\n\n constructor(options: ApiClientOptions = {}) {\n this.config = getConfig(options.configDir);\n this.client = new TankClient({\n token: this.config.token,\n registryUrl: this.config.registry,\n configDir: options.configDir\n });\n }\n\n get baseUrl(): string {\n return this.config.registry;\n }\n\n get token(): string | undefined {\n return this.config.token;\n }\n\n get isAuthenticated(): boolean {\n return !!this.config.token;\n }\n\n get sdk(): TankClient {\n return this.client;\n }\n\n async fetch<T>(\n path: string,\n options: RequestInit = {}\n ): Promise<{ data: T; ok: true } | { error: string; status: number; ok: false }> {\n const url = `${this.baseUrl}${path}`;\n const headers: Record<string, string> = {\n 'Content-Type': 'application/json',\n ...(options.headers as Record<string, string>)\n };\n\n if (this.config.token) {\n headers.Authorization = `Bearer ${this.config.token}`;\n }\n\n try {\n const response = await fetch(url, {\n ...options,\n headers,\n signal: AbortSignal.timeout(30_000)\n });\n\n if (!response.ok) {\n const body = await response.json().catch(() => ({}));\n return {\n error: (body as { error?: string }).error ?? response.statusText,\n status: response.status,\n ok: false\n };\n }\n\n const data = (await response.json()) as T;\n return { data, ok: true };\n } catch (err) {\n return {\n error: err instanceof Error ? err.message : 'Network error',\n status: 0,\n ok: false\n };\n }\n }\n\n async verifyAuth(): Promise<\n | { valid: true; user: { name: string | null; email: string | null } }\n | { valid: false; reason: 'no-token' | 'unauthorized' | 'network-error'; error?: string }\n > {\n if (!this.config.token) {\n return { valid: false, reason: 'no-token' };\n }\n\n try {\n const user = await this.client.whoami();\n if (user) {\n return { valid: true, user: { name: user.name, email: user.email } };\n }\n return { valid: false, reason: 'unauthorized' };\n } catch (err) {\n if (err instanceof TankAuthError) {\n return { valid: false, reason: 'unauthorized' };\n }\n return {\n valid: false,\n reason: 'network-error',\n error: err instanceof Error ? err.message : 'Unknown error'\n };\n }\n }\n}\n","import fs from 'node:fs';\nimport path from 'node:path';\n\nimport { LEGACY_LOCKFILE_FILENAME, LOCKFILE_FILENAME, type SkillsLock } from '@internals/schemas';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { z } from 'zod';\n\nimport { TankApiClient } from '~/lib/api-client.js';\n\nconst SCOPED_NAME_PATTERN = /^@[a-z0-9-]+\\/[a-z0-9][a-z0-9-]*$/;\n\ninterface VersionDetails {\n name: string;\n version: string;\n permissions?: {\n network?: { outbound?: string[] };\n filesystem?: { read?: string[]; write?: string[] };\n subprocess?: boolean;\n };\n auditScore: number | null;\n auditStatus: string;\n downloadUrl: string;\n publishedAt: string;\n downloads: number;\n}\n\ninterface ScanFinding {\n stage: string;\n severity: 'critical' | 'high' | 'medium' | 'low';\n type: string;\n description: string;\n location: string | null;\n}\n\ninterface ScanResult {\n verdict: string;\n audit_score: number;\n findings: ScanFinding[];\n scanned_at: string;\n}\n\ninterface SkillMetaResponse {\n name: string;\n description: string | null;\n latestVersion: string;\n auditScore: number | null;\n auditStatus: string;\n versions: Array<{\n version: string;\n auditScore: number | null;\n auditStatus: string;\n publishedAt: string;\n }>;\n}\n\nfunction parseLockKey(key: string): { name: string; version: string } | null {\n const lastAt = key.lastIndexOf('@');\n if (lastAt <= 0) return null;\n return { name: key.slice(0, lastAt), version: key.slice(lastAt + 1) };\n}\n\nfunction deriveVerdict(score: number | null, status: string): string {\n if (status !== 'completed' || score === null) return 'PENDING';\n if (score >= 7) return 'PASS';\n if (score >= 4) return 'FLAGGED';\n return 'FAIL';\n}\n\nfunction formatFindings(findings: ScanFinding[]): string {\n if (findings.length === 0) return '';\n\n const bySeverity: Record<string, ScanFinding[]> = {\n critical: [],\n high: [],\n medium: [],\n low: []\n };\n\n for (const f of findings) {\n if (bySeverity[f.severity]) {\n bySeverity[f.severity].push(f);\n }\n }\n\n const lines: string[] = ['', `### Findings (${findings.length})`];\n\n for (const severity of ['critical', 'high', 'medium', 'low'] as const) {\n const group = bySeverity[severity];\n if (group.length === 0) continue;\n lines.push(`\\n**${severity.toUpperCase()} (${group.length}):**`);\n for (const f of group) {\n lines.push(`- ${f.type}: ${f.description}${f.location ? ` (${f.location})` : ''}`);\n }\n }\n\n return lines.join('\\n');\n}\n\nexport function registerAuditSkillTool(server: McpServer): void {\n server.tool(\n 'audit-skill',\n 'Show security audit results for a skill from the Tank registry.',\n {\n name: z.string().describe('Skill name in @org/name format'),\n version: z.string().optional().describe('Specific version to audit (defaults to installed or latest)')\n },\n async ({ name, version }) => {\n if (!SCOPED_NAME_PATTERN.test(name)) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Validation error: Skill name \"${name}\" must use the @org/name format (e.g. @acme/my-skill).`\n }\n ],\n isError: true\n };\n }\n\n const client = new TankApiClient();\n if (!client.isAuthenticated) {\n return {\n content: [\n {\n type: 'text' as const,\n text: 'Authentication required. Please run the \"login\" tool first to authenticate with Tank.'\n }\n ],\n isError: true\n };\n }\n\n const encodedName = encodeURIComponent(name);\n\n // If no version specified, try to find installed version from lockfile\n let targetVersion = version;\n if (!targetVersion) {\n let lockPath = path.join(process.cwd(), LOCKFILE_FILENAME);\n if (!fs.existsSync(lockPath)) {\n lockPath = path.join(process.cwd(), LEGACY_LOCKFILE_FILENAME);\n }\n if (fs.existsSync(lockPath)) {\n try {\n const raw = fs.readFileSync(lockPath, 'utf-8');\n const lock = JSON.parse(raw) as SkillsLock;\n for (const key of Object.keys(lock.skills)) {\n const parsed = parseLockKey(key);\n if (parsed && parsed.name === name) {\n targetVersion = parsed.version;\n break;\n }\n }\n } catch {\n // Lockfile unreadable — fall through to fetch latest\n }\n }\n }\n\n // If still no version, fetch skill metadata to get latest\n if (!targetVersion) {\n const metaResult = await client.fetch<SkillMetaResponse>(`/api/v1/skills/${encodedName}`);\n\n if (!metaResult.ok) {\n if (metaResult.status === 0) {\n return {\n content: [\n {\n type: 'text' as const,\n text: 'Unable to connect to the Tank registry. Check your network connection and try again.'\n }\n ],\n isError: true\n };\n }\n if (metaResult.status === 404) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Skill \"${name}\" not found in the Tank registry.`\n }\n ],\n isError: true\n };\n }\n return {\n content: [\n {\n type: 'text' as const,\n text: `Failed to fetch skill metadata: ${metaResult.error}`\n }\n ],\n isError: true\n };\n }\n\n targetVersion = metaResult.data.latestVersion;\n }\n\n // Fetch version details with audit data\n const versionResult = await client.fetch<VersionDetails>(`/api/v1/skills/${encodedName}/${targetVersion}`);\n\n if (!versionResult.ok) {\n if (versionResult.status === 0) {\n return {\n content: [\n {\n type: 'text' as const,\n text: 'Unable to connect to the Tank registry. Check your network connection and try again.'\n }\n ],\n isError: true\n };\n }\n if (versionResult.status === 404) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Skill \"${name}\" version \"${targetVersion}\" not found in the Tank registry.`\n }\n ],\n isError: true\n };\n }\n return {\n content: [\n {\n type: 'text' as const,\n text: `Failed to fetch audit data: ${versionResult.error}`\n }\n ],\n isError: true\n };\n }\n\n const details = versionResult.data;\n const verdict = deriveVerdict(details.auditScore, details.auditStatus);\n\n if (details.auditStatus !== 'completed') {\n return {\n content: [\n {\n type: 'text' as const,\n text: [\n `## Audit: ${name}@${targetVersion}`,\n '',\n `**Status:** Pending security review`,\n `**Scan Status:** ${details.auditStatus}`,\n '',\n 'This skill has not yet been through security scanning. Results will be available once the scan completes.'\n ].join('\\n')\n }\n ]\n };\n }\n\n // Try to fetch detailed scan results\n let findingsText = '';\n const scanResult = await client.fetch<ScanResult>(`/api/v1/skills/${encodedName}/${targetVersion}/scan`);\n if (scanResult.ok && scanResult.data.findings) {\n findingsText = formatFindings(scanResult.data.findings);\n }\n\n const score = details.auditScore !== null ? details.auditScore.toFixed(1) : 'N/A';\n\n const lines = [\n `## Audit: ${name}@${targetVersion}`,\n '',\n `**Verdict:** ${verdict}`,\n `**Score:** ${score}/10`,\n `**Scanned:** ${details.publishedAt}`,\n `**Version:** ${targetVersion}`\n ];\n\n if (details.permissions) {\n lines.push('', '**Permissions:**');\n const p = details.permissions;\n if (p.network?.outbound?.length) {\n lines.push(` - Network: ${p.network.outbound.join(', ')}`);\n }\n if (p.filesystem?.read?.length || p.filesystem?.write?.length) {\n const parts: string[] = [];\n if (p.filesystem.read?.length) parts.push(`read: ${p.filesystem.read.join(', ')}`);\n if (p.filesystem.write?.length) parts.push(`write: ${p.filesystem.write.join(', ')}`);\n lines.push(` - Filesystem: ${parts.join('; ')}`);\n }\n lines.push(` - Subprocess: ${p.subprocess ? 'yes' : 'no'}`);\n }\n\n if (findingsText) {\n lines.push(findingsText);\n }\n\n return {\n content: [\n {\n type: 'text' as const,\n text: lines.join('\\n')\n }\n ]\n };\n }\n );\n}\n","import fs from 'node:fs';\n\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\n\nimport { TankApiClient } from '~/lib/api-client.js';\nimport { getConfig, getConfigPath } from '~/lib/config.js';\n\nconst MIN_NODE_MAJOR = 24;\n\ninterface CheckResult {\n name: string;\n status: 'PASS' | 'FAIL';\n message: string;\n}\n\nfunction checkConfigFile(): CheckResult {\n const configPath = getConfigPath();\n\n if (!fs.existsSync(configPath)) {\n return {\n name: 'Configuration File',\n status: 'FAIL',\n message: `Configuration file not found at ${configPath}. Run the login tool to create it.`\n };\n }\n\n try {\n const raw = fs.readFileSync(configPath, 'utf-8');\n JSON.parse(raw);\n return {\n name: 'Configuration File',\n status: 'PASS',\n message: `Configuration file exists and is valid JSON (${configPath}).`\n };\n } catch (err) {\n const detail = err instanceof Error ? err.message : String(err);\n return {\n name: 'Configuration File',\n status: 'FAIL',\n message: `Configuration file at ${configPath} is malformed: ${detail}`\n };\n }\n}\n\nasync function checkAuthentication(): Promise<CheckResult> {\n const client = new TankApiClient();\n\n if (!client.isAuthenticated) {\n return {\n name: 'Authentication',\n status: 'FAIL',\n message: 'Not authenticated. Use the login tool to authenticate with Tank.'\n };\n }\n\n const authCheck = await client.verifyAuth();\n\n if (authCheck.valid) {\n const name = authCheck.user.name ?? 'unknown';\n return {\n name: 'Authentication',\n status: 'PASS',\n message: `Authenticated as ${name}.`\n };\n }\n\n if (authCheck.reason === 'network-error') {\n return {\n name: 'Authentication',\n status: 'FAIL',\n message: `Could not verify credentials (network error). ${authCheck.error ?? ''}`.trim()\n };\n }\n\n return {\n name: 'Authentication',\n status: 'FAIL',\n message: 'Credentials are expired or invalid. Use the login tool to re-authenticate.'\n };\n}\n\nasync function checkRegistryConnectivity(): Promise<CheckResult> {\n const config = getConfig();\n const registryUrl = config.registry;\n\n try {\n const healthUrl = `${registryUrl}/api/health`;\n const response = await fetch(healthUrl, {\n signal: AbortSignal.timeout(10_000)\n });\n\n if (response.ok) {\n return {\n name: 'Registry Connectivity',\n status: 'PASS',\n message: `Registry at ${registryUrl} is reachable.`\n };\n }\n\n return {\n name: 'Registry Connectivity',\n status: 'FAIL',\n message: `Registry at ${registryUrl} returned HTTP ${response.status}.`\n };\n } catch {\n return {\n name: 'Registry Connectivity',\n status: 'FAIL',\n message: `Cannot reach registry at ${registryUrl}. Check your network connection.`\n };\n }\n}\n\nfunction checkNodeVersion(): CheckResult {\n const raw = process.version;\n const match = raw.match(/^v(\\d+)/);\n const major = match ? Number.parseInt(match[1], 10) : 0;\n\n if (major >= MIN_NODE_MAJOR) {\n return {\n name: 'Node.js Version',\n status: 'PASS',\n message: `Node.js ${raw} meets the minimum requirement (v${MIN_NODE_MAJOR}.0.0).`\n };\n }\n\n return {\n name: 'Node.js Version',\n status: 'FAIL',\n message: `Node.js ${raw} is below the minimum required version v${MIN_NODE_MAJOR}.0.0. Please upgrade Node.js.`\n };\n}\n\nfunction formatChecks(checks: CheckResult[]): string {\n const lines: string[] = [];\n\n lines.push('Tank Doctor Report');\n lines.push('==================');\n lines.push('');\n\n for (const check of checks) {\n const icon = check.status === 'PASS' ? 'PASS' : 'FAIL';\n lines.push(`[${icon}] ${check.name}`);\n lines.push(` ${check.message}`);\n }\n\n lines.push('');\n\n const failedChecks = checks.filter((c) => c.status === 'FAIL');\n const allPassed = failedChecks.length === 0;\n\n if (allPassed) {\n lines.push('All checks passed. Your Tank environment is ready to use.');\n } else {\n lines.push('Suggestions:');\n for (const check of failedChecks) {\n if (check.name === 'Authentication') {\n lines.push(' - Use the login tool to authenticate with Tank.');\n } else if (check.name === 'Registry Connectivity') {\n lines.push(' - Check your network connection and verify the registry URL.');\n } else if (check.name === 'Node.js Version') {\n lines.push(` - Upgrade Node.js to v${MIN_NODE_MAJOR}.0.0 or later.`);\n } else if (check.name === 'Configuration File') {\n lines.push(' - Use the login tool to create a valid configuration file.');\n }\n }\n lines.push('');\n lines.push('The environment is not healthy. Please address the issues above.');\n }\n\n return lines.join('\\n');\n}\n\nexport function registerDoctorTool(server: McpServer): void {\n server.tool('doctor', 'Diagnose Tank setup and environment.', {}, async () => {\n const checks: CheckResult[] = [];\n\n checks.push(checkConfigFile());\n checks.push(await checkAuthentication());\n checks.push(await checkRegistryConnectivity());\n checks.push(checkNodeVersion());\n\n return {\n content: [{ type: 'text' as const, text: formatChecks(checks) }]\n };\n });\n}\n","import fs from 'node:fs';\nimport path from 'node:path';\n\nimport { LEGACY_MANIFEST_FILENAME, MANIFEST_FILENAME, type SkillsJson, skillsJsonSchema } from '@internals/schemas';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { z } from 'zod';\n\nconst SCOPED_NAME_PATTERN = /^@[a-z0-9-]+\\/[a-z0-9][a-z0-9-]*$/;\nconst SEMVER_PATTERN = /^\\d+\\.\\d+\\.\\d+(-[a-zA-Z0-9.-]+)?(\\+[a-zA-Z0-9.-]+)?$/;\n\nexport function registerInitSkillTool(server: McpServer): void {\n server.tool(\n 'init-skill',\n `Create a new ${MANIFEST_FILENAME} and SKILL.md template for a Tank skill.`,\n {\n name: z.string().regex(SCOPED_NAME_PATTERN, 'Name must be in @org/name format'),\n version: z.string().regex(SEMVER_PATTERN, 'Version must be valid semver').optional().default('0.1.0'),\n description: z.string().optional().default(''),\n directory: z.string().optional().default('.')\n },\n async ({ name, version = '0.1.0', description = '', directory = '.' }) => {\n const targetDir = path.resolve(directory);\n\n if (!fs.existsSync(targetDir)) {\n return {\n content: [{ type: 'text' as const, text: `Directory does not exist: ${targetDir}` }]\n };\n }\n\n if (!fs.statSync(targetDir).isDirectory()) {\n return {\n content: [{ type: 'text' as const, text: `Path is not a directory: ${targetDir}` }]\n };\n }\n\n // Check for existing manifest (tank.json or skills.json)\n const newManifestPath = path.join(targetDir, MANIFEST_FILENAME);\n const legacyManifestPath = path.join(targetDir, LEGACY_MANIFEST_FILENAME);\n const skillsJsonPath = newManifestPath;\n if (fs.existsSync(newManifestPath) || fs.existsSync(legacyManifestPath)) {\n const existingFile = fs.existsSync(newManifestPath) ? MANIFEST_FILENAME : LEGACY_MANIFEST_FILENAME;\n return {\n content: [\n {\n type: 'text' as const,\n text: `${existingFile} already exists at ${targetDir}. Aborting to avoid overwrite.`\n }\n ]\n };\n }\n\n const manifest: SkillsJson = {\n name,\n version,\n description,\n skills: {},\n permissions: {\n network: { outbound: [] },\n filesystem: { read: [], write: [] },\n subprocess: false\n }\n };\n\n const parseResult = skillsJsonSchema.safeParse(manifest);\n if (!parseResult.success) {\n const details = parseResult.error.issues\n .map((issue) => `${issue.path.join('.') || 'root'}: ${issue.message}`)\n .join('; ');\n\n return {\n content: [{ type: 'text' as const, text: `Failed to create ${MANIFEST_FILENAME}: ${details}` }]\n };\n }\n\n fs.writeFileSync(skillsJsonPath, `${JSON.stringify(manifest, null, 2)}\\n`, 'utf-8');\n\n const skillMdPath = path.join(targetDir, 'SKILL.md');\n let createdSkillMd = false;\n if (!fs.existsSync(skillMdPath)) {\n const skillMd = `# ${name}\\n\\n${description || 'Description here.'}\\n`;\n fs.writeFileSync(skillMdPath, skillMd, 'utf-8');\n createdSkillMd = true;\n }\n\n const skillMdLine = createdSkillMd ? `Created: ${skillMdPath}` : `Skipped existing: ${skillMdPath}`;\n\n return {\n content: [\n {\n type: 'text' as const,\n text: `Initialized skill in ${targetDir}\\nCreated: ${skillsJsonPath}\\n${skillMdLine}`\n }\n ]\n };\n }\n );\n}\n","import semver from \"semver\";\nimport { realpath } from \"node:fs/promises\";\n//#region src/credentials/entropy.ts\n/**\n* Shannon entropy in bits/char. Used to reject low-entropy\n* regex matches (e.g. `sk_live_aaaaaaaaaaaaaaaa`) that pass\n* the pattern but are obviously not real credentials (C25a).\n*/\nfunction shannonEntropy(value) {\n\tif (value.length === 0) return 0;\n\tconst frequencies = /* @__PURE__ */ new Map();\n\tfor (const char of value) frequencies.set(char, (frequencies.get(char) ?? 0) + 1);\n\tconst length = value.length;\n\tlet entropy = 0;\n\tfor (const count of frequencies.values()) {\n\t\tconst probability = count / length;\n\t\tentropy -= probability * Math.log2(probability);\n\t}\n\treturn entropy;\n}\nconst DEFAULT_ENTROPY_THRESHOLD_BITS_PER_CHAR = 4;\n//#endregion\n//#region src/credentials/patterns.ts\nconst ALPHANUMERIC = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\nconst ALPHANUMERIC_UPPER = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\nconst HEX_LOWER = \"0123456789abcdef\";\nconst COMMON_PLACEHOLDERS = [\n\t\"EXAMPLE\",\n\t\"PLACEHOLDER\",\n\t\"YOUR_KEY\",\n\t\"YOUR-KEY\",\n\t\"XXXXXX\"\n];\nconst CREDENTIAL_PATTERNS = [\n\t{\n\t\tid: \"stripe_secret\",\n\t\tlabel: \"Stripe Secret Key\",\n\t\tprefix: \"sk_live_\",\n\t\tregex: /(?:sk_live_|sk_test_)[A-Za-z0-9]{16,64}/g,\n\t\tcharset: ALPHANUMERIC,\n\t\tlength: 0,\n\t\tminEntropy: 3.95,\n\t\tplaceholderDenylist: COMMON_PLACEHOLDERS\n\t},\n\t{\n\t\tid: \"stripe_publishable\",\n\t\tlabel: \"Stripe Publishable Key\",\n\t\tprefix: \"pk_live_\",\n\t\tregex: /(?:pk_live_|pk_test_)[A-Za-z0-9]{16,64}/g,\n\t\tcharset: ALPHANUMERIC,\n\t\tlength: 0,\n\t\tminEntropy: 3.95,\n\t\tplaceholderDenylist: COMMON_PLACEHOLDERS\n\t},\n\t{\n\t\tid: \"aws_access_key\",\n\t\tlabel: \"AWS Access Key ID\",\n\t\tprefix: \"AKIA\",\n\t\tregex: /AKIA[A-Z0-9]{16}/g,\n\t\tcharset: ALPHANUMERIC_UPPER,\n\t\tlength: 20,\n\t\tminEntropy: 3.3,\n\t\tplaceholderDenylist: COMMON_PLACEHOLDERS\n\t},\n\t{\n\t\tid: \"github_pat\",\n\t\tlabel: \"GitHub Personal Access Token\",\n\t\tprefix: \"ghp_\",\n\t\tregex: /ghp_[A-Za-z0-9]{36}/g,\n\t\tcharset: ALPHANUMERIC,\n\t\tlength: 40,\n\t\tminEntropy: 4.4,\n\t\tplaceholderDenylist: COMMON_PLACEHOLDERS\n\t},\n\t{\n\t\tid: \"github_oauth\",\n\t\tlabel: \"GitHub OAuth Token\",\n\t\tprefix: \"gho_\",\n\t\tregex: /gho_[A-Za-z0-9]{36}/g,\n\t\tcharset: ALPHANUMERIC,\n\t\tlength: 40,\n\t\tminEntropy: 3.75,\n\t\tplaceholderDenylist: COMMON_PLACEHOLDERS\n\t},\n\t{\n\t\tid: \"openai_key\",\n\t\tlabel: \"OpenAI API Key\",\n\t\tprefix: \"sk-proj-\",\n\t\tregex: /sk-(?:proj-)?[A-Za-z0-9_-]{20,128}/g,\n\t\tcharset: `${ALPHANUMERIC}_-`,\n\t\tlength: 0,\n\t\tminEntropy: 4.5,\n\t\tplaceholderDenylist: COMMON_PLACEHOLDERS\n\t},\n\t{\n\t\tid: \"elevenlabs_key\",\n\t\tlabel: \"ElevenLabs API Key\",\n\t\tprefix: \"elvn_\",\n\t\tregex: /elvn_[A-Za-z0-9]{20,64}/g,\n\t\tcharset: ALPHANUMERIC,\n\t\tlength: 0,\n\t\tminEntropy: 4,\n\t\tplaceholderDenylist: COMMON_PLACEHOLDERS\n\t},\n\t{\n\t\tid: \"jwt_token\",\n\t\tlabel: \"JWT Token\",\n\t\tprefix: \"eyJ\",\n\t\tregex: /eyJ[A-Za-z0-9_-]{6,}\\.[A-Za-z0-9_-]{6,}\\.[A-Za-z0-9_-]{6,}/g,\n\t\tcharset: `${ALPHANUMERIC}_-.`,\n\t\tlength: 0,\n\t\tstructural: true\n\t},\n\t{\n\t\tid: \"database_url\",\n\t\tlabel: \"Database URL\",\n\t\tprefix: \"postgresql://\",\n\t\tregex: /(?:postgres(?:ql)?|mysql|mariadb|mongodb(?:\\+srv)?|redis):\\/\\/[^\\s\"'`]+/g,\n\t\tcharset: `${ALPHANUMERIC}:/?&=._-@+%$!~*(),`,\n\t\tlength: 0,\n\t\tstructural: true\n\t},\n\t{\n\t\tid: \"slack_webhook\",\n\t\tlabel: \"Slack Webhook URL\",\n\t\tprefix: \"https://hooks.slack.com/services/\",\n\t\tregex: /https:\\/\\/hooks\\.slack\\.com\\/services\\/[A-Z0-9]{9,12}\\/[A-Z0-9]{9,12}\\/[A-Za-z0-9]{24,}/g,\n\t\tcharset: `${ALPHANUMERIC}:/.`,\n\t\tlength: 0,\n\t\tstructural: true\n\t}\n];\n//#endregion\n//#region src/credentials/scanner.ts\nfunction scan(text, options = {}) {\n\tif (text.length === 0) return [];\n\tconst mode = options.mode ?? \"strict\";\n\tconst overrideThreshold = options.entropyThreshold;\n\tconst matches = [];\n\tfor (const pattern of CREDENTIAL_PATTERNS) {\n\t\tconst regex = new RegExp(pattern.regex.source, pattern.regex.flags.includes(\"g\") ? pattern.regex.flags : `${pattern.regex.flags}g`);\n\t\tlet result = regex.exec(text);\n\t\twhile (result) {\n\t\t\tconst value = result[0];\n\t\t\tconst rawStart = result.index;\n\t\t\tconst start = rawStart > 1 && text[rawStart - 1] === \" \" && text[rawStart - 2] === \":\" ? rawStart + 1 : rawStart;\n\t\t\tconst end = rawStart + value.length + (start === rawStart ? 0 : 1);\n\t\t\tif (passesCredentialGates(pattern, value, mode, overrideThreshold)) matches.push({\n\t\t\t\tstart,\n\t\t\t\tend,\n\t\t\t\tpatternId: pattern.id\n\t\t\t});\n\t\t\tresult = regex.exec(text);\n\t\t}\n\t}\n\tmatches.sort((a, b) => {\n\t\tif (a.start !== b.start) return a.start - b.start;\n\t\tif (a.end !== b.end) return a.end - b.end;\n\t\treturn a.patternId.localeCompare(b.patternId);\n\t});\n\tconst deduped = [];\n\tfor (const match of matches) {\n\t\tconst prev = deduped[deduped.length - 1];\n\t\tif (prev && prev.start === match.start && prev.end === match.end && prev.patternId === match.patternId) continue;\n\t\tdeduped.push(match);\n\t}\n\treturn deduped;\n}\nfunction passesCredentialGates(pattern, value, mode, overrideThreshold) {\n\tif (pattern.structural === true) return true;\n\tif (mode === \"permissive\") return true;\n\tif (containsPlaceholder(value, pattern.placeholderDenylist)) return false;\n\tconst body = value.startsWith(pattern.prefix) ? value.slice(pattern.prefix.length) : value;\n\tif (body.length === 0) return false;\n\tconst threshold = overrideThreshold ?? pattern.minEntropy ?? 4;\n\treturn shannonEntropy(body) >= threshold;\n}\nfunction containsPlaceholder(value, denylist) {\n\tif (!denylist || denylist.length === 0) return false;\n\tconst upper = value.toUpperCase();\n\tfor (const placeholder of denylist) if (upper.includes(placeholder.toUpperCase())) return true;\n\treturn false;\n}\n//#endregion\n//#region src/lib/resolver.ts\nfunction resolve(range, versions) {\n\ttry {\n\t\tif (!range || !semver.validRange(range)) return null;\n\t\tconst validVersions = versions.filter((v) => semver.valid(v) !== null);\n\t\tif (validVersions.length === 0) return null;\n\t\treturn semver.maxSatisfying(validVersions, range) ?? null;\n\t} catch {\n\t\treturn null;\n\t}\n}\nfunction sortVersions(versions) {\n\treturn [...versions.filter((v) => semver.valid(v) !== null)].sort((a, b) => semver.rcompare(a, b));\n}\n//#endregion\n//#region src/lib/url.ts\nfunction encodeSkillName(name) {\n\treturn encodeURIComponent(name).replace(/%40/g, \"@\").replace(/%2F/gi, \"/\");\n}\n//#endregion\n//#region src/permission-escalation.ts\nfunction parseParts(version) {\n\tconst parts = version.split(\".\").map((p) => {\n\t\tconst n = Number.parseInt(p, 10);\n\t\treturn Number.isNaN(n) ? 0 : n;\n\t});\n\treturn [\n\t\tparts[0] ?? 0,\n\t\tparts[1] ?? 0,\n\t\tparts[2] ?? 0\n\t];\n}\nfunction determineBump(prevVersion, newVersion) {\n\tif (!prevVersion) return \"none\";\n\tconst [pMaj, pMin] = parseParts(prevVersion);\n\tconst [nMaj, nMin] = parseParts(newVersion);\n\tif (nMaj > pMaj) return \"major\";\n\tif (nMin > pMin) return \"minor\";\n\treturn \"patch\";\n}\nfunction asStringArray(value) {\n\tif (!Array.isArray(value)) return [];\n\treturn value.filter((v) => typeof v === \"string\");\n}\nfunction findNewOutboundHosts(prev, next) {\n\tconst prevNetwork = prev.network;\n\tconst nextNetwork = next.network;\n\tif (!nextNetwork) return [];\n\tconst prevHosts = new Set(asStringArray(prevNetwork?.outbound));\n\treturn asStringArray(nextNetwork.outbound).filter((h) => !prevHosts.has(h)).map((host) => ({\n\t\tfield: \"network.outbound\",\n\t\treason: `New outbound host added: ${host}. Requires MAJOR bump`\n\t}));\n}\nfunction findNewFilesystemPaths(prev, next) {\n\tconst prevFs = prev.filesystem;\n\tconst nextFs = next.filesystem;\n\tif (!nextFs) return {\n\t\treads: [],\n\t\twrites: []\n\t};\n\tconst prevRead = new Set(asStringArray(prevFs?.read));\n\tconst addedRead = asStringArray(nextFs.read).filter((p) => !prevRead.has(p));\n\tconst prevWrite = new Set(asStringArray(prevFs?.write));\n\tconst addedWrite = asStringArray(nextFs.write).filter((p) => !prevWrite.has(p));\n\treturn {\n\t\treads: addedRead.map((p) => ({\n\t\t\tfield: \"filesystem.read\",\n\t\t\treason: `New read path added: ${p}. Requires MINOR bump`\n\t\t})),\n\t\twrites: addedWrite.map((p) => ({\n\t\t\tfield: \"filesystem.write\",\n\t\t\treason: `New write path added: ${p}. Requires MINOR bump`\n\t\t}))\n\t};\n}\nfunction checkSubprocessEscalation(prev, next) {\n\tconst prevSub = prev.subprocess;\n\tif (next.subprocess === true && prevSub !== true) return [{\n\t\tfield: \"subprocess\",\n\t\treason: \"Subprocess execution enabled (was disabled). Requires MAJOR bump\"\n\t}];\n\treturn [];\n}\nfunction checkPermissionEscalation(prevVersion, prevPermissions, newVersion, newPermissions) {\n\tconst bump = determineBump(prevVersion, newVersion);\n\tif (bump === \"major\" || bump === \"none\") return {\n\t\tallowed: true,\n\t\tviolations: []\n\t};\n\tconst highRisk = [...findNewOutboundHosts(prevPermissions, newPermissions), ...checkSubprocessEscalation(prevPermissions, newPermissions)];\n\tconst fsPaths = findNewFilesystemPaths(prevPermissions, newPermissions);\n\tconst lowRisk = [...fsPaths.reads, ...fsPaths.writes];\n\tif (bump === \"minor\") return {\n\t\tallowed: highRisk.length === 0,\n\t\tviolations: highRisk\n\t};\n\tconst violations = [...highRisk, ...lowRisk];\n\treturn {\n\t\tallowed: violations.length === 0,\n\t\tviolations\n\t};\n}\n//#endregion\n//#region src/permissions/domain.ts\nfunction isDomainAllowed(domain, allowedDomains) {\n\tfor (const allowed of allowedDomains) {\n\t\tif (allowed === domain) return true;\n\t\tif (allowed.startsWith(\"*.\")) {\n\t\t\tconst suffix = allowed.slice(1);\n\t\t\tif (domain.endsWith(suffix) || domain === allowed.slice(2)) return true;\n\t\t\tif (domain === allowed) return true;\n\t\t}\n\t}\n\treturn false;\n}\n//#endregion\n//#region src/permissions/path.ts\nfunction isPathAllowed(requestedPath, allowedPaths) {\n\tconst norm = (p) => p.replaceAll(\"\\\\\", \"/\");\n\tconst req = norm(requestedPath);\n\tif (req.includes(\"..\")) return false;\n\tfor (const allowed of allowedPaths) {\n\t\tconst a = norm(allowed);\n\t\tif (a === req) return true;\n\t\tif (a.endsWith(\"/**\")) {\n\t\t\tconst prefix = a.slice(0, -3);\n\t\t\tif (req === prefix || req.startsWith(`${prefix}/`)) return true;\n\t\t}\n\t}\n\treturn false;\n}\nasync function resolveRealpathSafely(path) {\n\ttry {\n\t\treturn await realpath(path);\n\t} catch {\n\t\treturn path;\n\t}\n}\nasync function isPathAllowedWithRealpath(requestedPath, allowedPaths) {\n\tif (!isPathAllowed(requestedPath, allowedPaths)) return false;\n\tlet resolvedRequested;\n\ttry {\n\t\tresolvedRequested = await realpath(requestedPath);\n\t} catch {\n\t\treturn true;\n\t}\n\tconst resolvedAllowed = [];\n\tfor (const allowed of allowedPaths) {\n\t\tconst isGlob = allowed.endsWith(\"/**\");\n\t\tconst resolvedBase = await resolveRealpathSafely(isGlob ? allowed.slice(0, -3) : allowed);\n\t\tresolvedAllowed.push(isGlob ? `${resolvedBase}/**` : resolvedBase);\n\t}\n\treturn isPathAllowed(resolvedRequested, resolvedAllowed);\n}\n//#endregion\n//#region src/permissions/types.ts\n/**\n* Thrown by checkPermissionBudget when a skill's declared permissions exceed the project budget.\n*\n* internals-helpers cannot import from @tankpkg/sdk (would invert dep graph).\n* sdk shim catches this and re-throws as TankPermissionError to preserve\n* the public sdk error API. See D7 / INTENT C25b.\n*/\nvar PermissionBudgetError = class extends Error {\n\tconstructor(message) {\n\t\tsuper(message);\n\t\tthis.name = \"PermissionBudgetError\";\n\t}\n};\n//#endregion\n//#region src/permissions/budget.ts\nfunction checkPermissionBudget(budget, skillPerms, skillName) {\n\tif (!skillPerms) return;\n\tif (skillPerms.subprocess === true && budget.subprocess !== true) throw new PermissionBudgetError(`${skillName} requires subprocess access, but project budget does not allow it`);\n\tif (skillPerms.network?.outbound && skillPerms.network.outbound.length > 0) {\n\t\tconst budgetDomains = budget.network?.outbound ?? [];\n\t\tfor (const domain of skillPerms.network.outbound) if (!isDomainAllowed(domain, budgetDomains)) throw new PermissionBudgetError(`${skillName} requests network access to \"${domain}\", which is not in the project's permission budget`);\n\t}\n\tif (skillPerms.filesystem?.read && skillPerms.filesystem.read.length > 0) {\n\t\tconst budgetPaths = budget.filesystem?.read ?? [];\n\t\tfor (const p of skillPerms.filesystem.read) if (!isPathAllowed(p, budgetPaths)) throw new PermissionBudgetError(`${skillName} requests filesystem read access to \"${p}\", which is not in the project's permission budget`);\n\t}\n\tif (skillPerms.filesystem?.write && skillPerms.filesystem.write.length > 0) {\n\t\tconst budgetPaths = budget.filesystem?.write ?? [];\n\t\tfor (const p of skillPerms.filesystem.write) if (!isPathAllowed(p, budgetPaths)) throw new PermissionBudgetError(`${skillName} requests filesystem write access to \"${p}\", which is not in the project's permission budget`);\n\t}\n}\nfunction collectPermissionViolations(budget, skillPerms, skillName) {\n\tconst violations = [];\n\tif (!skillPerms) return violations;\n\tif (skillPerms.subprocess === true && budget.subprocess !== true) violations.push({\n\t\tskillName,\n\t\ttype: \"subprocess\",\n\t\trequested: \"true\"\n\t});\n\tif (skillPerms.network?.outbound) {\n\t\tconst budgetDomains = budget.network?.outbound ?? [];\n\t\tfor (const domain of skillPerms.network.outbound) if (!isDomainAllowed(domain, budgetDomains)) violations.push({\n\t\t\tskillName,\n\t\t\ttype: \"network.outbound\",\n\t\t\trequested: domain\n\t\t});\n\t}\n\tif (skillPerms.filesystem?.read) {\n\t\tconst budgetPaths = budget.filesystem?.read ?? [];\n\t\tfor (const p of skillPerms.filesystem.read) if (!isPathAllowed(p, budgetPaths)) violations.push({\n\t\t\tskillName,\n\t\t\ttype: \"filesystem.read\",\n\t\t\trequested: p\n\t\t});\n\t}\n\tif (skillPerms.filesystem?.write) {\n\t\tconst budgetPaths = budget.filesystem?.write ?? [];\n\t\tfor (const p of skillPerms.filesystem.write) if (!isPathAllowed(p, budgetPaths)) violations.push({\n\t\t\tskillName,\n\t\t\ttype: \"filesystem.write\",\n\t\t\trequested: p\n\t\t});\n\t}\n\treturn violations;\n}\n//#endregion\n//#region src/prompt-injection/normalizer.ts\nconst BASE64_MAX_RECURSION_DEPTH = 3;\nconst BASE64_MAX_DECODED_BYTES = 64 * 1024;\nconst ZERO_WIDTH_CODEPOINTS = /\\u200B|\\u200C|\\u200D|\\uFEFF|\\u2060/g;\nconst BASE64_CANDIDATE = /[A-Za-z0-9+/]{16,}={0,2}/g;\nconst WHITESPACE_RUN = /\\s+/g;\nconst HOMOGLYPH_MAP = new Map([\n\t[\"а\", \"a\"],\n\t[\"е\", \"e\"],\n\t[\"о\", \"o\"],\n\t[\"р\", \"p\"],\n\t[\"с\", \"c\"],\n\t[\"х\", \"x\"],\n\t[\"у\", \"y\"],\n\t[\"ο\", \"o\"],\n\t[\"α\", \"a\"],\n\t[\"ѕ\", \"s\"]\n]);\nconst LEET_MAP = new Map([\n\t[\"0\", \"o\"],\n\t[\"1\", \"i\"],\n\t[\"3\", \"e\"],\n\t[\"4\", \"a\"],\n\t[\"5\", \"s\"],\n\t[\"7\", \"t\"],\n\t[\"@\", \"a\"],\n\t[\"$\", \"s\"]\n]);\nfunction stripZeroWidth(text) {\n\treturn text.replace(ZERO_WIDTH_CODEPOINTS, \"\");\n}\nfunction decodeHomoglyphs(text) {\n\treturn [...text.normalize(\"NFKC\")].map((ch) => HOMOGLYPH_MAP.get(ch) ?? ch).join(\"\");\n}\nfunction isMostlyPrintable(decoded) {\n\tconst chars = [...decoded];\n\tif (chars.length === 0) return false;\n\treturn chars.filter((ch) => ch >= \" \" && ch <= \"~\").length / chars.length >= .95;\n}\nfunction looksLikeBase64(match) {\n\treturn /[0-9+/=]/.test(match);\n}\nfunction tryDecodeBase64Match(match, budget) {\n\tif (budget.bytesRemaining <= 0) return null;\n\tif (!looksLikeBase64(match)) return null;\n\ttry {\n\t\tconst decoded = Buffer.from(match, \"base64\").toString(\"utf8\");\n\t\tif (!isMostlyPrintable(decoded)) return null;\n\t\tbudget.bytesRemaining -= decoded.length;\n\t\treturn decoded;\n\t} catch {\n\t\treturn null;\n\t}\n}\nfunction decodeBase64Pass(text, budget) {\n\treturn text.replace(BASE64_CANDIDATE, (match) => {\n\t\treturn tryDecodeBase64Match(match, budget) ?? match;\n\t});\n}\nfunction decodeBase64Substrings(text) {\n\tconst budget = {\n\t\tdepth: 0,\n\t\tbytesRemaining: BASE64_MAX_DECODED_BYTES\n\t};\n\tlet current = text;\n\twhile (budget.depth < 3) {\n\t\tconst next = decodeBase64Pass(current, budget);\n\t\tif (next === current) return next;\n\t\tcurrent = next;\n\t\tbudget.depth += 1;\n\t}\n\treturn current;\n}\nfunction reverseLeet(text) {\n\treturn [...text.toLowerCase()].map((ch) => LEET_MAP.get(ch) ?? ch).join(\"\");\n}\nfunction collapseWhitespace(text) {\n\treturn text.replace(WHITESPACE_RUN, \" \").trim();\n}\nfunction normalizeForScan(text) {\n\treturn collapseWhitespace(reverseLeet(decodeBase64Substrings(decodeHomoglyphs(stripZeroWidth(text)))));\n}\n//#endregion\n//#region src/prompt-injection/patterns.ts\nconst CLAWGUARD_PATTERN_COUNT = 55;\nconst CLAWGUARD_PATTERNS = [\n\t{\n\t\tname: \"Direct Override (EN)\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"ignore\\\\s+(all\\\\s+)?(previous|prior|above|earlier)\\\\s+(instructions?|rules?|prompts?|guidelines?)\", \"i\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"prompt_injection\",\n\t\trecommendation: `BLOCK this input immediately. This is a classic prompt injection attempting to override the agent's system instructions.`\n\t},\n\t{\n\t\tname: \"Direct Override (DE)\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"ignoriere?\\\\s+(alle\\\\s+)?(vorherigen?|bisherigen?|obigen?)\\\\s+(Anweisungen?|Regeln?|Instruktionen?|Befehle?)\", \"i\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"prompt_injection\",\n\t\trecommendation: `BLOCKIEREN. Klassische Prompt-Injection die versucht, die Systemanweisungen zu ueberschreiben.`\n\t},\n\t{\n\t\tname: \"New Instructions Override\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(you\\\\s+are\\\\s+now|ab\\\\s+jetzt\\\\s+bist\\\\s+du|from\\\\s+now\\\\s+on\\\\s+you\\\\s+are|your\\\\s+new\\\\s+(role|instructions?|task)\\\\s+(is|are))\", \"i\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"prompt_injection\",\n\t\trecommendation: `BLOCK. Attempt to redefine the agent's identity or role mid-conversation.`\n\t},\n\t{\n\t\tname: \"System Prompt Extraction\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(show|reveal|print|display|output|repeat|give\\\\s+me|zeig|nenne|wiederhole)\\\\s+(your|the|deine?n?|die)\\\\s+(system\\\\s*prompt|instructions?|initial\\\\s*prompt|rules?|Anweisungen?|Systemprompt)\", \"i\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"prompt_injection\",\n\t\trecommendation: `This input attempts to extract the agent's system prompt. Sensitive internal instructions could be leaked.`\n\t},\n\t{\n\t\tname: \"Role-Play Escape\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(pretend|act\\\\s+as\\\\s+if|imagine|tu\\\\s+so\\\\s+als|stell\\\\s+dir\\\\s+vor).{0,50}(no\\\\s+rules?|no\\\\s+restrictions?|keine\\\\s+Regeln?|without\\\\s+limits?|ohne\\\\s+Einschraenkungen?)\", \"i\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"prompt_injection\",\n\t\trecommendation: `Jailbreak attempt via role-play scenario to bypass safety constraints.`\n\t},\n\t{\n\t\tname: \"Delimiter Injection\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(```system|<\\\\|im_start\\\\|>|<\\\\|im_end\\\\|>|\\\\[INST\\\\]|\\\\[\\\\/INST\\\\]|<<SYS>>|<\\\\/SYS>|<\\\\|system\\\\|>|<\\\\|user\\\\|>|<\\\\|assistant\\\\|>)\", \"\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"prompt_injection\",\n\t\trecommendation: `CRITICAL: Injection of model-specific delimiters to manipulate the conversation structure.`\n\t},\n\t{\n\t\tname: \"Encoded Bypass (Base64 hint)\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(decode|base64|atob|eval)\\\\s*\\\\(.{0,100}\\\\)\", \"i\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"prompt_injection\",\n\t\trecommendation: `Possible attempt to smuggle encoded payloads past text filters.`\n\t},\n\t{\n\t\tname: \"Token Smuggling\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(ignore|bypass|skip|disable)\\\\s+(safety|filter|guard|moderation|content\\\\s*policy|Sicherheit|Schutz)\", \"i\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"prompt_injection\",\n\t\trecommendation: `Attempt to explicitly disable or bypass security filters.`\n\t},\n\t{\n\t\tname: \"Synonym Override (EN)\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(disregard|forget|dismiss|override|overrule|nullify|void|abandon|drop|suppress|set\\\\s+aside|throw\\\\s+out)\\\\s+(all\\\\s+)?(previous|prior|above|earlier|preceding|antecedent|foregoing|existing|current|original)\\\\s+(instructions?|rules?|prompts?|guidelines?|directives?|regulations?|constraints?|policies?|orders?|commands?)\", \"i\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"prompt_injection\",\n\t\trecommendation: `BLOCK: Synonym-based prompt injection detected. Uses alternative vocabulary to bypass basic keyword filters.`\n\t},\n\t{\n\t\tname: \"Synonym Override (DE)\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(vergiss|verwirf|uebergehe?|ueberschreibe?|missachte|setze?\\\\s+ausser\\\\s+Kraft|hebe?\\\\s+auf)\\\\s+(alle\\\\s+)?(vorherigen?|bisherigen?|obigen?|bestehenden?|aktuellen?|urspruenglichen?)\\\\s+(Anweisungen?|Regeln?|Instruktionen?|Befehle?|Richtlinien?|Vorgaben?|Vorschriften?)\", \"i\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"prompt_injection\",\n\t\trecommendation: `BLOCKIEREN: Synonym-basierte Prompt-Injection auf Deutsch erkannt.`\n\t},\n\t{\n\t\tname: \"Indirect Instruction Reset\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(start\\\\s+(fresh|over|anew|from\\\\s+scratch)|begin\\\\s+a\\\\s+new\\\\s+(session|context|conversation)|reset\\\\s+(your|all)\\\\s+(memory|context|instructions?)|fang\\\\s+(neu|von\\\\s+vorne)\\\\s+an)\", \"i\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"prompt_injection\",\n\t\trecommendation: `Attempt to reset the agent's instruction context via indirect phrasing.`\n\t},\n\t{\n\t\tname: \"System/Admin Tag Injection\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"\\\\[\\\\s*(?:SYSTEM|ADMIN|IMPORTANT|PRIORITY|OVERRIDE|EMERGENCY|ROOT|SUPERUSER|MODERATOR)\\\\s*\\\\]\", \"i\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"prompt_injection\",\n\t\trecommendation: `BLOCK: Fake authority tag detected (e.g., [SYSTEM], [ADMIN]).`\n\t},\n\t{\n\t\tname: \"Agent-Worm Propagation\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(all\\\\s+agents?\\\\s+must|forward\\\\s+this\\\\s+to\\\\s+all|spread\\\\s+this\\\\s+(message|instruction)|automated\\\\s+instruction|replicate\\\\s+this\\\\s+(to|across)|inject\\\\s+into\\\\s+(all|every)\\\\s+(?:other\\\\s+)?(agents?|conversations?|sessions?)|inject\\\\s+into\\\\s+other\\\\s+(agents?|conversations?|sessions?))\", \"i\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"prompt_injection\",\n\t\trecommendation: `CRITICAL: Agent-worm propagation pattern detected.`\n\t},\n\t{\n\t\tname: \"Base64 Encoded Payload\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:base64[:\\\\s]+[A-Za-z0-9+/]{20,}={0,2}|decode\\\\s+(?:this|the\\\\s+following)\\\\s*:\\\\s*[A-Za-z0-9+/]{20,}={0,2}|(?:execute|run|eval)\\\\s+(?:the\\\\s+)?(?:base64|encoded)\\\\s+(?:string|payload|command|instruction)|(?:execute|run|eval)\\\\s+(?:the\\\\s+)?(?:base64)\\\\s+encoded\\\\s+\\\\w+)\", \"i\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"prompt_injection\",\n\t\trecommendation: `Base64-encoded payload or decode instruction detected.`\n\t},\n\t{\n\t\tname: \"Jailbreak Persona Activation\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:you\\\\s+are\\\\s+now|act(?:ing)?\\\\s+as|you\\\\s+will\\\\s+(?:act|be|become)|called|named|known\\\\s+as)\\\\s+[\\\"']?(?:DAN|STAN|DUDE|AIM|UCAR|EVIL|FreedomGPT|DevMode|JailBreak|UnfilteredAI|NsfwGPT|BasedGPT|MasterKey|AnarchyAI|ChaosGPT|ShadowAI|DarkGPT|UnchainedAI)\", \"i\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"prompt_injection\",\n\t\trecommendation: `Jailbreak persona activation detected. Named personas like DAN, STAN, etc. are used to bypass safety constraints.`\n\t},\n\t{\n\t\tname: \"Unrestricted Compliance Demand\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:do\\\\s+anything\\\\s+now|answer\\\\s+any\\\\s+question\\\\s+without\\\\s+refus|never\\\\s+refuse|cannot\\\\s+refuse|no\\\\s+(?:restrictions?|limitations?|boundaries|ethics|morals|guidelines)|policies\\\\s+(?:are\\\\s+)?disabled|broken\\\\s+free\\\\s+of.*confines)\", \"i\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"prompt_injection\",\n\t\trecommendation: `Unrestricted compliance demand detected. Attempt to remove all safety constraints from the model.`\n\t},\n\t{\n\t\tname: \"Steganographic Output Control\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:first\\\\s+letter\\\\s+of\\\\s+each\\\\s+word|acrostic|hidden\\\\s+message|encode.*(?:response|output|answer)|spell\\\\s+out.*(?:secret|hidden|answer))\", \"i\"),\n\t\tseverity: \"medium\",\n\t\tcategory: \"prompt_injection\",\n\t\trecommendation: `Steganographic output control detected. Attempt to encode hidden messages in the model output.`\n\t},\n\t{\n\t\tname: \"Destructive Shell Command\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:rm\\\\s+-[rRf]{1,3}\\\\s+[\\\\\\\\/]|mkfs\\\\s|dd\\\\s+if=|format\\\\s+[A-Z]:|\\\\:\\\\(\\\\)\\\\s*\\\\{\\\\s*\\\\:\\\\|\\\\:\\\\s*\\\\&\\\\s*\\\\})\", \"\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"dangerous_command\",\n\t\trecommendation: `CRITICAL: Destructive system command detected.`\n\t},\n\t{\n\t\tname: \"Remote Code Execution\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:curl\\\\s+.{0,100}\\\\|\\\\s*(?:ba)?sh|wget\\\\s+.{0,100}\\\\|\\\\s*(?:ba)?sh|python[3]?\\\\s+-c\\\\s+['\\\\\\\"].*(?:exec|eval|import\\\\s+os))\", \"\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"dangerous_command\",\n\t\trecommendation: `CRITICAL: Pipe-to-shell pattern detected.`\n\t},\n\t{\n\t\tname: \"Reverse Shell\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:(?:bash|sh|nc|ncat)\\\\s+.{0,50}(?:\\\\/dev\\\\/tcp|mkfifo|nc\\\\s+-[elp])|python[3]?\\\\s+-c\\\\s+['\\\\\\\"].*socket.*connect)\", \"\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"dangerous_command\",\n\t\trecommendation: `CRITICAL: Reverse shell pattern detected.`\n\t},\n\t{\n\t\tname: \"Privilege Escalation\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:sudo\\\\s+(?:su|chmod\\\\s+[0-7]*777|chown\\\\s+root)|chmod\\\\s+[0-7]*4[0-7]{3}\\\\s|SUID|setuid)\", \"\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"dangerous_command\",\n\t\trecommendation: `Privilege escalation attempt detected.`\n\t},\n\t{\n\t\tname: \"Package / Dependency Install\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:pip\\\\s+install|npm\\\\s+install|apt\\\\s+install|yum\\\\s+install|brew\\\\s+install)\\\\s+(?!--help)\", \"\"),\n\t\tseverity: \"medium\",\n\t\tcategory: \"dangerous_command\",\n\t\trecommendation: `Software installation command detected. Verify the package source.`\n\t},\n\t{\n\t\tname: \"Python getattr Obfuscation\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:getattr\\\\s*\\\\(\\\\s*\\\\w+\\\\s*,\\\\s*['\\\\\\\"].+['\\\\\\\"]\\\\s*\\\\))\", \"\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"code_obfuscation\",\n\t\trecommendation: `CRITICAL: Python getattr() used to dynamically resolve functions.`\n\t},\n\t{\n\t\tname: \"Python eval/exec\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:(?:eval|exec|compile)\\\\s*\\\\(\\\\s*(?:['\\\\\\\"]|[a-zA-Z_]))\", \"\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"code_obfuscation\",\n\t\trecommendation: `CRITICAL: Dynamic code execution via eval()/exec()/compile().`\n\t},\n\t{\n\t\tname: \"Python __import__\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:__import__\\\\s*\\\\(|importlib\\\\.import_module\\\\s*\\\\()\", \"\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"code_obfuscation\",\n\t\trecommendation: `Dynamic module import detected.`\n\t},\n\t{\n\t\tname: \"Python String Concatenation Bypass\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:['\\\\\\\"][a-z]{1,6}['\\\\\\\"]\\\\s*\\\\+\\\\s*['\\\\\\\"][a-z]{1,6}['\\\\\\\"])\", \"\"),\n\t\tseverity: \"medium\",\n\t\tcategory: \"code_obfuscation\",\n\t\trecommendation: `String concatenation pattern detected.`\n\t},\n\t{\n\t\tname: \"Python Dangerous File I/O\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:open\\\\s*\\\\(\\\\s*['\\\\\\\"]?\\\\/(?:etc|proc|sys|dev|root|home|tmp|var|data)[\\\\/'\\\\\\\"]|open\\\\s*\\\\(\\\\s*['\\\\\\\"].*(?:shadow|passwd|id_rsa|authorized_keys|\\\\.env|config|secret|token|key))\", \"\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"code_obfuscation\",\n\t\trecommendation: `CRITICAL: Python file read targeting sensitive system paths.`\n\t},\n\t{\n\t\tname: \"Python subprocess/os.system\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:(?:subprocess|os)\\\\s*\\\\.\\\\s*(?:system|popen|call|run|Popen|exec[lv]?[pe]?)\\\\s*\\\\()\", \"\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"code_obfuscation\",\n\t\trecommendation: `CRITICAL: Direct OS command execution via Python.`\n\t},\n\t{\n\t\tname: \"Python Socket Connection\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:socket\\\\.(?:socket|create_connection|connect)\\\\s*\\\\(|from\\\\s+socket\\\\s+import)\", \"\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"code_obfuscation\",\n\t\trecommendation: `Network socket creation detected.`\n\t},\n\t{\n\t\tname: \"Python Magic Attributes\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:__builtins__|__globals__|__subclasses__|__class__|__bases__|__mro__|__dict__)\", \"\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"code_obfuscation\",\n\t\trecommendation: `CRITICAL: Access to Python magic attributes detected.`\n\t},\n\t{\n\t\tname: \"Python setattr/delattr Reflection\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:(?:setattr|delattr)\\\\s*\\\\(\\\\s*\\\\w+\\\\s*,\\\\s*['\\\\\\\"])\", \"\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"code_obfuscation\",\n\t\trecommendation: `Dynamic attribute manipulation via setattr/delattr.`\n\t},\n\t{\n\t\tname: \"Suspicious open() in Agent Input\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:open\\\\s*\\\\(\\\\s*['\\\\\\\"]|open\\\\s*\\\\(\\\\s*[a-zA-Z_]+\\\\s*[,\\\\)]|\\\\['open'\\\\]|\\\\[\\\\\\\"open\\\\\\\"\\\\])\", \"\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"code_obfuscation\",\n\t\trecommendation: `File open() call detected in agent input.`\n\t},\n\t{\n\t\tname: \"Multi-Part String Assembly\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:['\\\\\\\"][^'\\\\\\\"]{1,8}['\\\\\\\"]\\\\s*\\\\+\\\\s*['\\\\\\\"][^'\\\\\\\"]{1,8}['\\\\\\\"]\\\\s*\\\\+\\\\s*['\\\\\\\"][^'\\\\\\\"]{1,8}['\\\\\\\"])\", \"\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"code_obfuscation\",\n\t\trecommendation: `Three or more short string fragments concatenated.`\n\t},\n\t{\n\t\tname: \"API Key Leak\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:(?:api[_-]?key|apikey|api[_-]?secret|access[_-]?token|auth[_-]?token|bearer)\\\\s*[:=]\\\\s*['\\\\\\\"]?[A-Za-z0-9_\\\\-]{20,})\", \"\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"data_exfiltration\",\n\t\trecommendation: `CRITICAL: Hardcoded API key or access token found.`\n\t},\n\t{\n\t\tname: \"Private Key Material\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:-----BEGIN\\\\s+(?:RSA|EC|DSA|OPENSSH|PGP)?\\\\s*PRIVATE\\\\s+KEY-----)\", \"\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"data_exfiltration\",\n\t\trecommendation: `CRITICAL: Private key material detected in text.`\n\t},\n\t{\n\t\tname: \"Password in Cleartext\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:password|passwort|passwd|kennwort|pwd)\\\\s*[:=]\\\\s*['\\\\\\\"]?[^\\\\s'\\\\\\\"]{4,}\", \"i\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"data_exfiltration\",\n\t\trecommendation: `Cleartext password detected.`\n\t},\n\t{\n\t\tname: \"Database Connection String\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:(?:mongodb|postgres|mysql|redis|sqlite):\\\\/\\\\/[^\\\\s]+|Data\\\\s+Source=[^\\\\s;]+)\", \"\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"data_exfiltration\",\n\t\trecommendation: `Database connection string with potential credentials detected.`\n\t},\n\t{\n\t\tname: \"Email Harvesting Pattern\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:(?:send|forward|mail|email|sende?n?)\\\\s+(?:to|an|nach)\\\\s+[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\\\.[a-zA-Z]{2,})\", \"\"),\n\t\tseverity: \"medium\",\n\t\tcategory: \"data_exfiltration\",\n\t\trecommendation: `Instruction to send data to an external email address.`\n\t},\n\t{\n\t\tname: \"Webhook Exfiltration\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:(?:https?:\\\\/\\\\/)?(?:hooks\\\\.slack\\\\.com|discord(?:app)?\\\\.com\\\\/api\\\\/webhooks|webhook\\\\.site|requestbin|pipedream)\\\\/[^\\\\s]+)\", \"\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"data_exfiltration\",\n\t\trecommendation: `Outbound webhook URL detected.`\n\t},\n\t{\n\t\tname: \"Markdown Image Exfiltration\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"!\\\\[[^\\\\]]*\\\\]\\\\(\\\\s*https?:\\\\/\\\\/[^\\\\s\\\\)]+(?:\\\\?[^\\\\s\\\\)]*(?:data|token|key|secret|password|api|session|cookie|auth|user|content|exfil|steal|leak)[^\\\\s\\\\)]*)\\\\)\", \"\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"data_exfiltration\",\n\t\trecommendation: `CRITICAL: Markdown image tag with suspicious query parameters detected.`\n\t},\n\t{\n\t\tname: \"Silent Data Exfiltration via MCP\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:silently|quietly|secretly|without\\\\s+(?:telling|informing|notifying|asking))\\\\s+(?:POST|GET|send|fetch|forward|transmit|upload|exfiltrate)\", \"i\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"data_exfiltration\",\n\t\trecommendation: `CRITICAL: Silent data exfiltration attempt detected. Instruction to covertly transmit data without user awareness.`\n\t},\n\t{\n\t\tname: \"Prompt Leaking via Error Messages\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:(?:show|display|print|output|reveal|leak)\\\\s+(?:your|the|system)\\\\s+(?:prompt|instructions|rules|guidelines|system\\\\s*message)|what\\\\s+(?:are|were)\\\\s+your\\\\s+(?:initial|original|system)\\\\s+(?:instructions|prompt|rules))\", \"i\"),\n\t\tseverity: \"medium\",\n\t\tcategory: \"data_exfiltration\",\n\t\trecommendation: `Attempt to extract system prompts through error triggering or direct request. System instructions should never be disclosed.`\n\t},\n\t{\n\t\tname: \"Urgency Manipulation\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(urgent|immediately|right\\\\s+now|sofort|dringend|jetzt\\\\s+sofort|without\\\\s+delay|ohne\\\\s+Verzoegerung).{0,80}(send|execute|run|delete|pay|transfer|sende?n?|ausfuehren|loeschen|zahlen|ueberweisen)\", \"i\"),\n\t\tseverity: \"medium\",\n\t\tcategory: \"social_engineering\",\n\t\trecommendation: `Urgency + action pattern detected.`\n\t},\n\t{\n\t\tname: \"Authority Impersonation\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(i\\\\s+am\\\\s+(?:your|the)\\\\s+(?:\\\\w+\\\\s+)?(?:admin(?:istrator)?|owner|creator|developer|boss|CEO|moderator|supervisor|manager)|ich\\\\s+bin\\\\s+(?:dein|der)\\\\s+(?:\\\\w+\\\\s+)?(?:Admin(?:istrator)?|Besitzer|Ersteller|Entwickler|Chef|Moderator))\", \"i\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"social_engineering\",\n\t\trecommendation: `Authority impersonation detected.`\n\t},\n\t{\n\t\tname: \"Confidentiality Trap\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(don't\\\\s+tell|do\\\\s+not\\\\s+share|keep\\\\s+this\\\\s+(secret|private|between\\\\s+us)|sag\\\\s+(das\\\\s+)?niemandem|behalte?\\\\s+(das\\\\s+)?fuer\\\\s+dich)\", \"i\"),\n\t\tseverity: \"medium\",\n\t\tcategory: \"social_engineering\",\n\t\trecommendation: `Secrecy instruction detected.`\n\t},\n\t{\n\t\tname: \"Authority Claim\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(as\\\\s+(?:the|an?|your)\\\\s+(?:\\\\w+\\\\s+)?(?:administrator|moderator|supervisor|manager|authorized\\\\s+(?:user|person|agent))|i\\\\s+(?:am|have\\\\s+been)\\\\s+authorized\\\\s+(?:to|by)|with\\\\s+(?:admin|root|elevated)\\\\s+(?:access|privileges?|permissions?)|speaking\\\\s+(?:as|on\\\\s+behalf\\\\s+of)\\\\s+(?:the\\\\s+)?(?:system|admin|management))\", \"i\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"social_engineering\",\n\t\trecommendation: `Authority claim detected.`\n\t},\n\t{\n\t\tname: \"Credential Phishing\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(your\\\\s+(?:API\\\\s+key|password|token|credentials?|account|session)\\\\s+(?:has\\\\s+)?(?:expired|been\\\\s+(?:compromised|revoked|suspended|locked|disabled|reset))|(?:verify|confirm|re-?enter|provide|update)\\\\s+your\\\\s+(?:password|credentials?|API\\\\s+key|token|login)|(?:click\\\\s+here|visit\\\\s+this\\\\s+link|go\\\\s+to)\\\\s+to\\\\s+(?:verify|restore|unlock|reactivate)\\\\s+your\\\\s+account)\", \"i\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"social_engineering\",\n\t\trecommendation: `Credential phishing pattern detected.`\n\t},\n\t{\n\t\tname: \"Bash Command Substitution $(...)\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"\\\\$\\\\(\\\\s*(?:cat|curl|wget|ls|id|whoami|uname|env|printenv|nc|ncat|bash|sh|python|perl|ruby|php|node|echo|head|tail|grep|find|awk|sed|chmod|chown|rm|dd|mkfs|passwd|ssh|scp|nmap|dig|host|ping|kill|ps|ifconfig|ip)\\\\b\", \"\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"shell_injection\",\n\t\trecommendation: `CRITICAL: Bash command substitution $() detected with a shell command.`\n\t},\n\t{\n\t\tname: \"Backtick Command Substitution\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"`\\\\s*(?:cat|curl|wget|ls|id|whoami|uname|env|printenv|nc|ncat|bash|sh|python|perl|ruby|php|node|echo|head|tail|grep|find|awk|sed|chmod|chown|rm|dd|mkfs|passwd|ssh|scp|nmap|dig|host|ping|kill|ps|ifconfig|ip)\\\\b[^`]*`\", \"\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"shell_injection\",\n\t\trecommendation: `CRITICAL: Backtick command substitution detected with a shell command.`\n\t},\n\t{\n\t\tname: \"PHP/Ruby system() Call\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:system|passthru|shell_exec|popen|proc_open)\\\\s*\\\\(\\\\s*['\\\\\\\"]\", \"\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"shell_injection\",\n\t\trecommendation: `CRITICAL: Shell execution function call detected (PHP/Ruby system/passthru/shell_exec).`\n\t},\n\t{\n\t\tname: \"Java Runtime.exec()\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:Runtime\\\\s*\\\\.\\\\s*getRuntime\\\\s*\\\\(\\\\s*\\\\)\\\\s*\\\\.\\\\s*exec\\\\s*\\\\(|ProcessBuilder\\\\s*\\\\(\\\\s*(?:\\\\[|new\\\\s|Arrays\\\\.asList|List\\\\.of|\\\\\\\"[^\\\\\\\"]*\\\\\\\"|'[^']*'))\", \"\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"shell_injection\",\n\t\trecommendation: `CRITICAL: Java system command execution via Runtime.exec() or ProcessBuilder detected.`\n\t},\n\t{\n\t\tname: \"Node.js child_process\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:child_process\\\\s*\\\\.\\\\s*(?:exec|execSync|spawn|spawnSync|execFile|execFileSync|fork)\\\\s*\\\\(|require\\\\s*\\\\(\\\\s*['\\\\\\\"]child_process['\\\\\\\"]\\\\s*\\\\))\", \"\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"shell_injection\",\n\t\trecommendation: `CRITICAL: Node.js child_process execution detected.`\n\t},\n\t{\n\t\tname: \"Forced Tool Call Manipulation\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:tool_choice|function_call|force\\\\s+(?:call|invoke|execute|run))\\\\s*[:=]\\\\s*(?:force|required|always|auto).*(?:send_email|http|fetch|exec)\", \"i\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"tool_manipulation\",\n\t\trecommendation: `CRITICAL: Forced tool call manipulation detected. Attempt to override tool selection and force execution of specific tools.`\n\t},\n\t{\n\t\tname: \"MCP Rug Pull Detection\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:schema.*(?:changed|modified|updated|replaced|overwritten)|tool.*description.*(?:differ|changed|mismatch)|(?:after|post).*approval.*(?:change|modify|update|replace).*(?:tool|schema|description))\", \"i\"),\n\t\tseverity: \"critical\",\n\t\tcategory: \"tool_manipulation\",\n\t\trecommendation: `CRITICAL: MCP rug pull pattern detected. Tool schema or description changed after initial approval.`\n\t},\n\t{\n\t\tname: \"MCP Schema Hash Mismatch\",\n\t\tregex: /* @__PURE__ */ new RegExp(\"(?:hash\\\\s*(?:mismatch|changed|differs?|invalid)|checksum\\\\s*(?:fail|mismatch|changed)|schema\\\\s*(?:drift|tamper|integrity))\", \"i\"),\n\t\tseverity: \"high\",\n\t\tcategory: \"tool_manipulation\",\n\t\trecommendation: `Schema hash or checksum mismatch detected. Tool definition may have been tampered with after approval.`\n\t}\n];\n//#endregion\nexport { ALPHANUMERIC, ALPHANUMERIC_UPPER, BASE64_MAX_DECODED_BYTES, BASE64_MAX_RECURSION_DEPTH, CLAWGUARD_PATTERNS, CLAWGUARD_PATTERN_COUNT, CREDENTIAL_PATTERNS, DEFAULT_ENTROPY_THRESHOLD_BITS_PER_CHAR, HEX_LOWER, PermissionBudgetError, checkPermissionBudget, checkPermissionEscalation, collapseWhitespace, collectPermissionViolations, decodeBase64Substrings, decodeHomoglyphs, encodeSkillName, isDomainAllowed, isPathAllowed, isPathAllowedWithRealpath, normalizeForScan, resolve, reverseLeet, scan, shannonEntropy, sortVersions, stripZeroWidth };\n\n//# sourceMappingURL=index.js.map","import crypto from 'node:crypto';\nimport fs from 'node:fs';\nimport path from 'node:path';\n\nimport { resolve } from '@internals/helpers';\nimport {\n LEGACY_LOCKFILE_FILENAME,\n LEGACY_MANIFEST_FILENAME,\n LOCKFILE_FILENAME,\n LOCKFILE_VERSION,\n MANIFEST_FILENAME,\n type Permissions,\n type SkillsLock\n} from '@internals/schemas';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { extract } from 'tar';\nimport { z } from 'zod';\n\nimport { TankApiClient } from '~/lib/api-client.js';\n\nconst SCOPED_NAME_PATTERN = /^@[a-z0-9-]+\\/[a-z0-9][a-z0-9-]*$/;\n\ninterface VersionInfo {\n version: string;\n integrity: string;\n auditScore: number;\n auditStatus: string;\n publishedAt: string;\n}\n\ninterface VersionMetadata {\n name: string;\n version: string;\n description?: string;\n integrity: string;\n permissions: Permissions;\n auditScore: number;\n auditStatus: string;\n downloadUrl: string;\n publishedAt: string;\n}\n\nfunction textResult(text: string, isError?: boolean) {\n return {\n content: [{ type: 'text' as const, text }],\n ...(isError ? { isError: true } : {})\n };\n}\n\nfunction getSkillDir(projectDir: string, skillName: string): string {\n if (skillName.startsWith('@')) {\n const [scope, name] = skillName.split('/');\n return path.join(projectDir, '.tank', 'skills', scope, name);\n }\n return path.join(projectDir, '.tank', 'skills', skillName);\n}\n\nexport function registerInstallSkillTool(server: McpServer): void {\n server.tool(\n 'install-skill',\n `Install a skill from the Tank registry. Resolves version, downloads tarball, verifies SHA-512 integrity, extracts files, and updates ${MANIFEST_FILENAME} + ${LOCKFILE_FILENAME}.`,\n {\n name: z.string().describe('Skill name in @org/name format'),\n version: z.string().optional().describe('Specific version or semver range (default: latest)'),\n directory: z.string().optional().describe('Project directory (defaults to current working directory)')\n },\n async ({ name, version: versionRange, directory }) => {\n // 1. Validate scoped name\n if (!SCOPED_NAME_PATTERN.test(name)) {\n return textResult(\n `Validation error: Skill name \"${name}\" must use the @org/name format (e.g. @acme/my-skill).`,\n true\n );\n }\n\n const client = new TankApiClient();\n\n // 2. Check authentication\n if (!client.isAuthenticated) {\n return textResult('Not authenticated. Use the \"login\" tool first to authenticate with Tank.', true);\n }\n\n const dir = directory ? path.resolve(directory) : process.cwd();\n const range = versionRange ?? '*';\n\n // 3. Read or create manifest (tank.json, with skills.json fallback)\n let skillsJsonPath = path.join(dir, MANIFEST_FILENAME);\n if (!fs.existsSync(skillsJsonPath) && fs.existsSync(path.join(dir, LEGACY_MANIFEST_FILENAME))) {\n skillsJsonPath = path.join(dir, LEGACY_MANIFEST_FILENAME);\n }\n let skillsJson: Record<string, unknown> = { skills: {} };\n if (fs.existsSync(skillsJsonPath)) {\n try {\n const raw = fs.readFileSync(skillsJsonPath, 'utf-8');\n skillsJson = JSON.parse(raw) as Record<string, unknown>;\n } catch {\n return textResult(`Failed to read or parse ${path.basename(skillsJsonPath)}.`, true);\n }\n } else {\n skillsJsonPath = path.join(dir, MANIFEST_FILENAME);\n skillsJson = { skills: {} };\n fs.mkdirSync(dir, { recursive: true });\n fs.writeFileSync(skillsJsonPath, `${JSON.stringify(skillsJson, null, 2)}\\n`);\n }\n\n // 4. Read existing lockfile (tank.lock, with skills.lock fallback)\n let lockPath = path.join(dir, LOCKFILE_FILENAME);\n if (!fs.existsSync(lockPath) && fs.existsSync(path.join(dir, LEGACY_LOCKFILE_FILENAME))) {\n lockPath = path.join(dir, LEGACY_LOCKFILE_FILENAME);\n }\n let lock: SkillsLock = { lockfileVersion: LOCKFILE_VERSION, skills: {} };\n if (fs.existsSync(lockPath)) {\n try {\n const raw = fs.readFileSync(lockPath, 'utf-8');\n lock = JSON.parse(raw) as SkillsLock;\n } catch {\n lock = { lockfileVersion: LOCKFILE_VERSION, skills: {} };\n }\n }\n\n // 5. Fetch available versions\n const encodedName = encodeURIComponent(name);\n const versionsResult = await client.fetch<{ name: string; versions: VersionInfo[] }>(\n `/api/v1/skills/${encodedName}/versions`\n );\n\n if (!versionsResult.ok) {\n if (versionsResult.status === 401 || versionsResult.status === 403) {\n return textResult('Authentication failed. Use the \"login\" tool to authenticate with Tank.', true);\n }\n if (versionsResult.status === 404) {\n return textResult(`Skill not found: \"${name}\" does not exist in the Tank registry.`, true);\n }\n if (versionsResult.status === 0) {\n return textResult(\n `Cannot reach the Tank registry. Check your network connection and try again.\\nError: ${versionsResult.error}`,\n true\n );\n }\n return textResult(`Failed to fetch versions for ${name}: ${versionsResult.error}`, true);\n }\n\n const availableVersions = versionsResult.data.versions.map((v) => v.version);\n\n // 6. Resolve best version\n const resolved = resolve(range, availableVersions);\n if (!resolved) {\n return textResult(\n `No version of ${name} satisfies range \"${range}\". Available versions: ${availableVersions.join(', ')}`,\n true\n );\n }\n\n // 7. Check if already installed\n const lockKey = `${name}@${resolved}`;\n if (lock.skills[lockKey]) {\n return textResult(`${name}@${resolved} is already installed. No changes needed.`);\n }\n\n // 8. Fetch version metadata\n const metaResult = await client.fetch<VersionMetadata>(`/api/v1/skills/${encodedName}/${resolved}`);\n\n if (!metaResult.ok) {\n if (metaResult.status === 404) {\n return textResult(`Version ${resolved} of ${name} not found in the registry.`, true);\n }\n return textResult(`Failed to fetch metadata for ${name}@${resolved}: ${metaResult.error}`, true);\n }\n\n const metadata = metaResult.data;\n\n // 9. Download tarball\n let tarballBuffer: Buffer;\n try {\n const downloadRes = await fetch(metadata.downloadUrl);\n if (!downloadRes.ok) {\n return textResult(\n `Failed to download tarball for ${name}@${resolved}: ${downloadRes.status} ${downloadRes.statusText}`,\n true\n );\n }\n tarballBuffer = Buffer.from(await downloadRes.arrayBuffer());\n } catch (err) {\n return textResult(\n `Network error downloading tarball for ${name}@${resolved}: ${err instanceof Error ? err.message : String(err)}`,\n true\n );\n }\n\n // 10. Verify SHA-512 integrity\n const hash = crypto.createHash('sha512').update(tarballBuffer).digest('base64');\n const computedIntegrity = `sha512-${hash}`;\n\n if (computedIntegrity !== metadata.integrity) {\n return textResult(\n `Integrity verification failed for ${name}@${resolved}.\\n` +\n `Expected: ${metadata.integrity}\\n` +\n `Got: ${computedIntegrity}\\n\\n` +\n 'The tarball may have been tampered with. No files were extracted.',\n true\n );\n }\n\n // 11. Extract tarball safely\n const extractDir = getSkillDir(dir, name);\n fs.mkdirSync(extractDir, { recursive: true });\n\n try {\n await extractSafely(tarballBuffer, extractDir);\n } catch (err) {\n // Clean up on extraction failure\n fs.rmSync(extractDir, { recursive: true, force: true });\n return textResult(\n `Failed to extract tarball for ${name}@${resolved}: ${err instanceof Error ? err.message : String(err)}`,\n true\n );\n }\n\n // 12. Update skills.json\n const skills = (skillsJson.skills ?? {}) as Record<string, string>;\n skills[name] = range === '*' ? `^${resolved}` : range;\n skillsJson.skills = skills;\n fs.writeFileSync(skillsJsonPath, `${JSON.stringify(skillsJson, null, 2)}\\n`);\n\n // 13. Update skills.lock\n lock.skills[lockKey] = {\n resolved: metadata.downloadUrl,\n integrity: computedIntegrity,\n permissions: metadata.permissions ?? {},\n audit_score: metadata.auditScore ?? null\n };\n\n // Sort keys alphabetically for determinism\n const sortedSkills: Record<string, unknown> = {};\n for (const key of Object.keys(lock.skills).sort()) {\n sortedSkills[key] = lock.skills[key];\n }\n lock.skills = sortedSkills as SkillsLock['skills'];\n\n fs.mkdirSync(path.dirname(lockPath), { recursive: true });\n fs.writeFileSync(lockPath, `${JSON.stringify(lock, null, 2)}\\n`);\n\n // Build response\n const score =\n metadata.auditScore !== null && metadata.auditScore !== undefined\n ? `${metadata.auditScore.toFixed(1)}/10`\n : 'pending';\n\n const lines: string[] = [\n `## Installed ${name}@${resolved}`,\n '',\n `**Integrity:** SHA-512 verified`,\n `**Audit Score:** ${score}`,\n `**Extracted to:** ${extractDir}`,\n '',\n '### Updated files',\n `- ${path.basename(skillsJsonPath)}: added \"${name}\": \"${skills[name]}\"`,\n `- ${path.basename(lockPath)}: added ${lockKey}`\n ];\n\n return textResult(lines.join('\\n'));\n }\n );\n}\n\n/**\n * Extract a tarball safely with security checks.\n * Rejects: absolute paths, path traversal (..), symlinks/hardlinks.\n */\nasync function extractSafely(tarball: Buffer, destDir: string): Promise<void> {\n const tmpTarball = path.join(destDir, '.tmp-tarball.tgz');\n fs.writeFileSync(tmpTarball, tarball);\n\n try {\n await extract({\n file: tmpTarball,\n cwd: destDir,\n filter: (entryPath: string) => {\n if (path.isAbsolute(entryPath)) {\n throw new Error(`Absolute path in tarball: ${entryPath}`);\n }\n if (entryPath.split('/').includes('..') || entryPath.split(path.sep).includes('..')) {\n throw new Error(`Path traversal in tarball: ${entryPath}`);\n }\n return true;\n },\n onReadEntry: (entry) => {\n if (entry.type === 'SymbolicLink' || entry.type === 'Link') {\n throw new Error(`Symlink/hardlink in tarball: ${entry.path}`);\n }\n }\n });\n } finally {\n if (fs.existsSync(tmpTarball)) {\n fs.unlinkSync(tmpTarball);\n }\n }\n}\n","import fs from 'node:fs';\nimport path from 'node:path';\n\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { z } from 'zod';\n\nconst SCOPED_NAME_PATTERN = /^@[a-z0-9-]+\\/[a-z0-9][a-z0-9-]*$/;\n\nexport function registerLinkSkillTool(server: McpServer): void {\n server.tool(\n 'link-skill',\n 'Link an installed skill into an agent workspace. Creates a symlink from the workspace .skills directory to the installed skill.',\n {\n name: z.string().describe('Skill name in @org/name format'),\n workspace: z.string().describe('Agent workspace directory path'),\n directory: z\n .string()\n .optional()\n .describe('Project directory where skills are installed (defaults to current working directory)')\n },\n async ({ name, workspace, directory }) => {\n if (!SCOPED_NAME_PATTERN.test(name)) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Validation error: Skill name \"${name}\" must use the @org/name format (e.g. @acme/my-skill).`\n }\n ],\n isError: true\n };\n }\n\n const projectDir = directory ? path.resolve(directory) : process.cwd();\n const workspaceDir = path.resolve(workspace);\n\n if (!fs.existsSync(workspaceDir)) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Error: Workspace directory does not exist: ${workspaceDir}`\n }\n ],\n isError: true\n };\n }\n\n const skillDir = getSkillDir(projectDir, name);\n if (!fs.existsSync(skillDir)) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Skill \"${name}\" is not installed. Install it first with \"install-skill\" before linking.`\n }\n ],\n isError: true\n };\n }\n\n const [scope, skillName] = name.split('/');\n const skillsLinkDir = path.join(workspaceDir, '.skills', scope);\n const symlinkPath = path.join(skillsLinkDir, skillName);\n\n try {\n const stats = fs.lstatSync(symlinkPath);\n if (stats.isSymbolicLink()) {\n const currentTarget = fs.readlinkSync(symlinkPath);\n const resolvedTarget = path.isAbsolute(currentTarget)\n ? currentTarget\n : path.resolve(path.dirname(symlinkPath), currentTarget);\n\n if (path.resolve(resolvedTarget) === path.resolve(skillDir)) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Skill \"${name}\" is already linked in ${workspaceDir}.`\n }\n ]\n };\n }\n\n fs.unlinkSync(symlinkPath);\n }\n } catch {\n // intentionally empty\n }\n\n fs.mkdirSync(skillsLinkDir, { recursive: true });\n fs.symlinkSync(skillDir, symlinkPath, 'dir');\n\n return {\n content: [\n {\n type: 'text' as const,\n text: `Successfully linked \"${name}\" into ${workspaceDir}.\\nSymlink: ${symlinkPath} → ${skillDir}`\n }\n ]\n };\n }\n );\n}\n\nfunction getSkillDir(projectDir: string, skillName: string): string {\n if (skillName.startsWith('@')) {\n const [scope, name] = skillName.split('/');\n return path.join(projectDir, '.tank', 'skills', scope, name);\n }\n return path.join(projectDir, '.tank', 'skills', skillName);\n}\n","import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { z } from 'zod';\n\nimport { TankApiClient } from '~/lib/api-client.js';\nimport { getConfig, setConfig } from '~/lib/config.js';\n\nconst DEFAULT_POLL_INTERVAL_MS = 2000;\nconst DEFAULT_TIMEOUT_MS = 5 * 60 * 1000; // 5 minutes\n\nexport function registerLoginTool(server: McpServer): void {\n server.tool(\n 'login',\n 'Authenticate with Tank using GitHub OAuth device flow. Opens browser for authorization.',\n {\n timeout: z.number().optional().describe('Timeout in milliseconds (default: 300000 = 5 minutes)')\n },\n async ({ timeout = DEFAULT_TIMEOUT_MS }) => {\n const client = new TankApiClient();\n const config = getConfig();\n\n // Check if already logged in with valid token\n if (config.token) {\n const authCheck = await client.verifyAuth();\n if (authCheck.valid) {\n const displayName = authCheck.user?.name ?? authCheck.user?.email ?? 'unknown user';\n return {\n content: [\n {\n type: 'text' as const,\n text: `Already logged in as ${displayName}.\\n\\nTo log out, delete ~/.tank/config.json or use the CLI: tank logout`\n }\n ]\n };\n }\n }\n\n // Start device flow\n const state = crypto.randomUUID();\n const startRes = await fetch(`${config.registry}/api/v1/cli-auth/start`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ state })\n });\n\n if (!startRes.ok) {\n const body = await startRes.json().catch(() => ({}));\n return {\n content: [\n {\n type: 'text' as const,\n text: `Failed to start login flow: ${(body as { error?: string }).error ?? startRes.statusText}`\n }\n ]\n };\n }\n\n const { sessionCode } = (await startRes.json()) as {\n sessionCode: string;\n };\n\n // Return auth URL and poll for completion\n const deadline = Date.now() + timeout;\n const _authorized = false;\n let lastStatus = '';\n\n while (Date.now() < deadline) {\n try {\n const exchangeRes = await fetch(`${config.registry}/api/v1/cli-auth/exchange`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ sessionCode, state })\n });\n\n if (exchangeRes.ok) {\n const { token, user } = (await exchangeRes.json()) as {\n token: string;\n user: { name: string | null; email: string | null };\n };\n\n // Save token to config\n setConfig({ token, user: user as { name: string; email: string } });\n\n const displayName = user.name ?? user.email ?? 'unknown user';\n return {\n content: [\n {\n type: 'text' as const,\n text: `Successfully logged in as ${displayName}!\\n\\nYou can now use all Tank MCP tools: scan-skill, publish-skill, etc.`\n }\n ]\n };\n }\n\n // 400 means not yet authorized - keep polling\n if (exchangeRes.status !== 400) {\n const body = await exchangeRes.json().catch(() => ({}));\n return {\n content: [\n {\n type: 'text' as const,\n text: `Login failed: ${(body as { error?: string }).error ?? exchangeRes.statusText}`\n }\n ]\n };\n }\n\n // Check status and provide updates\n const newStatus = 'Waiting for authorization...';\n if (newStatus !== lastStatus) {\n lastStatus = newStatus;\n }\n } catch {\n // Network errors during polling are transient\n }\n\n await new Promise((resolve) => setTimeout(resolve, DEFAULT_POLL_INTERVAL_MS));\n }\n\n return {\n content: [\n {\n type: 'text' as const,\n text: `Login timed out. The authorization link may have expired.\\n\\nTry again: tank login`\n }\n ]\n };\n }\n );\n}\n","import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\n\nimport { getConfig, setConfig } from '~/lib/config.js';\n\nexport function registerLogoutTool(server: McpServer): void {\n server.tool('logout', 'Log out of Tank by clearing local credentials.', {}, async () => {\n const config = getConfig();\n\n if (!config.token) {\n return {\n content: [{ type: 'text' as const, text: 'Not logged in. No credentials to clear.' }]\n };\n }\n\n setConfig({ token: undefined, user: undefined });\n\n // Also clear env-based token so subsequent tool calls in this\n // process don't re-read it via getConfig().\n delete process.env.TANK_TOKEN;\n\n return {\n content: [{ type: 'text' as const, text: 'Successfully logged out.' }]\n };\n });\n}\n","import crypto from 'node:crypto';\nimport fs from 'node:fs';\nimport path from 'node:path';\nimport type { Readable } from 'node:stream';\n\nimport { LEGACY_MANIFEST_FILENAME, MANIFEST_FILENAME, skillsJsonSchema } from '@internals/schemas';\nimport ignore from 'ignore';\nimport { create } from 'tar';\n\n// Limits\nconst MAX_PACKAGE_SIZE = 50 * 1024 * 1024; // 50MB\nconst MAX_FILE_COUNT = 1000;\n\n// Default ignore patterns\nconst DEFAULT_IGNORES = ['node_modules', '.git', '.env*', '*.log', '.tank', '.DS_Store'];\n\n// Always ignored regardless of ignore file contents\nconst ALWAYS_IGNORED = ['node_modules', '.git'];\n\n// Ignore file names (not packed into tarball)\nconst IGNORE_FILES = ['.tankignore', '.gitignore'];\n\nexport interface PackResult {\n tarball: Buffer;\n integrity: string; // \"sha512-{base64}\"\n fileCount: number;\n totalSize: number;\n readme: string;\n files: string[];\n manifest: Record<string, unknown>;\n}\n\n/**\n * Pack a skill directory into a .tgz tarball with integrity hashing.\n */\nexport async function pack(directory: string): Promise<PackResult> {\n const absDir = path.resolve(directory);\n\n // 1. Verify directory exists\n if (!fs.existsSync(absDir)) {\n throw new Error(`Directory does not exist: ${absDir}`);\n }\n\n const stat = fs.statSync(absDir);\n if (!stat.isDirectory()) {\n throw new Error(`Not a directory: ${absDir}`);\n }\n\n // 2. Verify manifest (tank.json or skills.json) exists and is valid\n let manifestPath = path.join(absDir, MANIFEST_FILENAME);\n let manifestFilename = MANIFEST_FILENAME;\n if (!fs.existsSync(manifestPath)) {\n manifestPath = path.join(absDir, LEGACY_MANIFEST_FILENAME);\n manifestFilename = LEGACY_MANIFEST_FILENAME;\n }\n if (!fs.existsSync(manifestPath)) {\n throw new Error(`Missing required file: ${MANIFEST_FILENAME}`);\n }\n\n let skillsJsonContent: string;\n try {\n skillsJsonContent = fs.readFileSync(manifestPath, 'utf-8');\n } catch {\n throw new Error(`Failed to read ${manifestFilename}`);\n }\n\n let parsed: unknown;\n try {\n parsed = JSON.parse(skillsJsonContent);\n } catch {\n throw new Error(`Invalid ${manifestFilename}: not valid JSON`);\n }\n\n const validation = skillsJsonSchema.safeParse(parsed);\n if (!validation.success) {\n const issues = validation.error.issues.map((i) => ` - ${i.path.join('.')}: ${i.message}`).join('\\n');\n throw new Error(`Invalid ${manifestFilename}:\\n${issues}`);\n }\n\n // 3. Verify SKILL.md exists and read its content\n const skillMdPath = path.join(absDir, 'SKILL.md');\n if (!fs.existsSync(skillMdPath)) {\n throw new Error('Missing required file: SKILL.md');\n }\n\n let readmeContent: string;\n try {\n readmeContent = fs.readFileSync(skillMdPath, 'utf-8');\n } catch {\n throw new Error('Failed to read SKILL.md');\n }\n\n // 4. Build ignore filter\n const ig = buildIgnoreFilter(absDir);\n\n // 5. Collect files with validation\n const files = collectFiles(absDir, absDir, ig);\n\n // 6. Enforce file count limit\n if (files.length > MAX_FILE_COUNT) {\n throw new Error(`Too many files: ${files.length} exceeds maximum of ${MAX_FILE_COUNT}`);\n }\n\n // 7. Calculate total size of source files\n let totalSize = 0;\n for (const file of files) {\n const filePath = path.join(absDir, file);\n const fileStat = fs.statSync(filePath);\n totalSize += fileStat.size;\n }\n\n // 8. Create tarball\n const tarball = await createTarball(absDir, files);\n\n // 9. Enforce tarball size limit\n if (tarball.length > MAX_PACKAGE_SIZE) {\n throw new Error(`Tarball too large: ${tarball.length} bytes exceeds maximum of ${MAX_PACKAGE_SIZE} bytes (50MB)`);\n }\n\n // 10. Compute integrity hash\n const hash = crypto.createHash('sha512').update(tarball).digest('base64');\n const integrity = `sha512-${hash}`;\n\n return {\n tarball,\n integrity,\n fileCount: files.length,\n totalSize,\n readme: readmeContent,\n files,\n manifest: validation.data as Record<string, unknown>\n };\n}\n\n/**\n * Pack a directory into a .tgz tarball for security scanning.\n *\n * Unlike pack(), this function does NOT require skills.json or SKILL.md.\n * It applies the same security checks (no symlinks, no path traversal, etc.)\n * and returns the same PackResult interface with a synthesised manifest.\n *\n * Validates:\n * - Directory exists\n * - No symlinks or hardlinks\n * - No path traversal (.. components)\n * - No absolute paths\n * - File count <= 1000\n * - Tarball size <= 50MB\n *\n * Does NOT validate:\n * - skills.json existence or validity\n * - SKILL.md existence (but reads it if present)\n */\nexport async function packForScan(directory: string): Promise<PackResult> {\n const absDir = path.resolve(directory);\n\n // 1. Verify directory exists\n if (!fs.existsSync(absDir)) {\n throw new Error(`Directory does not exist: ${absDir}`);\n }\n\n const stat = fs.statSync(absDir);\n if (!stat.isDirectory()) {\n throw new Error(`Not a directory: ${absDir}`);\n }\n\n // 2. Try to read SKILL.md if it exists (optional for scan)\n let readmeContent = '';\n const skillMdPath = path.join(absDir, 'SKILL.md');\n if (fs.existsSync(skillMdPath)) {\n try {\n readmeContent = fs.readFileSync(skillMdPath, 'utf-8');\n } catch {\n readmeContent = '';\n }\n }\n\n // 3. Build ignore filter\n const ig = buildIgnoreFilter(absDir);\n\n // 4. Collect files with validation\n const files = collectFiles(absDir, absDir, ig);\n\n // 5. Enforce file count limit\n if (files.length > MAX_FILE_COUNT) {\n throw new Error(`Too many files: ${files.length} exceeds maximum of ${MAX_FILE_COUNT}`);\n }\n\n // 6. Check for empty directory (no files to scan)\n if (files.length === 0) {\n throw new Error('No files to scan: directory is empty or all files are ignored');\n }\n\n // 7. Calculate total size of source files\n let totalSize = 0;\n for (const file of files) {\n const filePath = path.join(absDir, file);\n const fileStat = fs.statSync(filePath);\n totalSize += fileStat.size;\n }\n\n // 8. Create tarball\n const tarball = await createTarball(absDir, files);\n\n // 9. Enforce tarball size limit\n if (tarball.length > MAX_PACKAGE_SIZE) {\n throw new Error(`Tarball too large: ${tarball.length} bytes exceeds maximum of ${MAX_PACKAGE_SIZE} bytes (50MB)`);\n }\n\n // 10. Compute integrity hash\n const hash = crypto.createHash('sha512').update(tarball).digest('base64');\n const integrity = `sha512-${hash}`;\n\n // 11. Synthesise a minimal manifest\n const dirName = path.basename(absDir);\n const manifest: Record<string, unknown> = {\n name: dirName,\n version: '0.0.0',\n description: 'Local scan'\n };\n\n return {\n tarball,\n integrity,\n fileCount: files.length,\n totalSize,\n readme: readmeContent,\n files,\n manifest\n };\n}\n\n/**\n * Build an ignore filter from .tankignore, .gitignore, or defaults.\n */\nfunction buildIgnoreFilter(dir: string): ReturnType<typeof ignore> {\n const ig = ignore();\n\n ig.add(ALWAYS_IGNORED);\n\n const tankIgnorePath = path.join(dir, '.tankignore');\n const gitIgnorePath = path.join(dir, '.gitignore');\n\n if (fs.existsSync(tankIgnorePath)) {\n const content = fs.readFileSync(tankIgnorePath, 'utf-8');\n ig.add(content);\n ig.add(IGNORE_FILES);\n } else if (fs.existsSync(gitIgnorePath)) {\n const content = fs.readFileSync(gitIgnorePath, 'utf-8');\n ig.add(content);\n ig.add(IGNORE_FILES);\n } else {\n ig.add(DEFAULT_IGNORES);\n }\n\n return ig;\n}\n\n/**\n * Recursively collect files from a directory.\n */\nfunction collectFiles(baseDir: string, currentDir: string, ig: ReturnType<typeof ignore>): string[] {\n const files: string[] = [];\n const entries = fs.readdirSync(currentDir, { withFileTypes: true });\n\n for (const entry of entries) {\n const fullPath = path.join(currentDir, entry.name);\n const relativePath = path.relative(baseDir, fullPath);\n\n // Security: check for path traversal\n if (relativePath.split(path.sep).includes('..')) {\n throw new Error(`Path traversal detected: \"${relativePath}\" contains \"..\" component`);\n }\n\n // Security: check for absolute paths\n if (path.isAbsolute(relativePath)) {\n throw new Error(`Absolute path detected: \"${relativePath}\"`);\n }\n\n // Security: check for symlinks\n const lstatResult = fs.lstatSync(fullPath);\n if (lstatResult.isSymbolicLink()) {\n throw new Error(`Symlink detected: \"${relativePath}\" — symlinks are not allowed`);\n }\n\n const pathForIgnore = lstatResult.isDirectory() ? `${relativePath}/` : relativePath;\n\n if (ig.ignores(pathForIgnore)) {\n continue;\n }\n\n if (lstatResult.isDirectory()) {\n const subFiles = collectFiles(baseDir, fullPath, ig);\n files.push(...subFiles);\n } else if (lstatResult.isFile()) {\n files.push(relativePath);\n }\n }\n\n return files;\n}\n\n/**\n * Create a gzipped tarball from the given files.\n */\nasync function createTarball(cwd: string, files: string[]): Promise<Buffer> {\n return new Promise<Buffer>((resolve, reject) => {\n const chunks: Buffer[] = [];\n\n const stream = create(\n {\n gzip: true,\n cwd,\n portable: true\n },\n files\n ) as unknown as Readable;\n\n stream.on('data', (chunk: Buffer) => {\n chunks.push(chunk);\n });\n\n stream.on('end', () => {\n resolve(Buffer.concat(chunks));\n });\n\n stream.on('error', (err: Error) => {\n reject(err);\n });\n });\n}\n","import path from 'node:path';\n\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { z } from 'zod';\n\nimport { TankApiClient } from '~/lib/api-client.js';\nimport { type PackResult, pack } from '~/lib/packer.js';\n\ninterface PublishStartResponse {\n uploadUrl: string;\n skillId: string;\n versionId: string;\n}\n\ninterface PublishConfirmResponse {\n success: boolean;\n name: string;\n version: string;\n auditScore: number | null;\n scanVerdict: string | null;\n}\n\nexport function registerPublishSkillTool(server: McpServer): void {\n server.tool(\n 'publish-skill',\n 'Publish a skill to the Tank registry. Requires authentication.',\n {\n directory: z.string().optional().describe('Directory to publish (default: current directory)'),\n visibility: z.enum(['public', 'private']).optional().default('public').describe('Package visibility'),\n dryRun: z.boolean().optional().default(false).describe('Validate without publishing')\n },\n async ({ directory = '.', visibility = 'public', dryRun = false }) => {\n const absDir = path.resolve(directory);\n const client = new TankApiClient();\n\n // Check auth (skip for dry run)\n if (!dryRun && !client.isAuthenticated) {\n return {\n content: [\n {\n type: 'text' as const,\n text: 'You need to log in first. Use the login tool to authenticate with Tank.\\n\\nExample: \"Log in to Tank\"'\n }\n ]\n };\n }\n\n if (!dryRun) {\n const authCheck = await client.verifyAuth();\n if (!authCheck.valid) {\n return {\n content: [\n {\n type: 'text' as const,\n text: 'Your session has expired. Use the login tool to authenticate again.'\n }\n ]\n };\n }\n }\n\n // Pack the skill\n let packResult: PackResult;\n try {\n packResult = await pack(absDir);\n } catch (err) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Failed to pack skill: ${err instanceof Error ? err.message : String(err)}`\n }\n ]\n };\n }\n\n const manifest = packResult.manifest as { name?: string; version?: string; description?: string };\n const skillName = manifest.name ?? 'unknown';\n const skillVersion = manifest.version ?? '0.0.0';\n\n // Dry run: just validate and return summary\n if (dryRun) {\n const lines: string[] = [\n `## Dry Run for ${skillName}@${skillVersion}`,\n '',\n '**Validation:** ✅ PASSED',\n '',\n '### Package Summary',\n `- **Name:** ${skillName}`,\n `- **Version:** ${skillVersion}`,\n `- **Visibility:** ${visibility}`,\n `- **Files:** ${packResult.fileCount}`,\n `- **Size:** ${(packResult.totalSize / 1024).toFixed(1)}KB compressed`,\n `- **Integrity:** ${packResult.integrity.slice(0, 20)}...`,\n '',\n '### Manifest',\n `- **Description:** ${manifest.description ?? 'No description'}`,\n `- **Permissions:** ${JSON.stringify((manifest as Record<string, unknown>).permissions ?? {})}`,\n '',\n '### Files',\n ...packResult.files.slice(0, 10).map((f) => ` - ${f}`),\n packResult.files.length > 10 ? ` ... and ${packResult.files.length - 10} more` : '',\n '',\n 'Ready to publish. Say \"publish my skill\" when you\\'re ready.'\n ];\n\n return {\n content: [{ type: 'text' as const, text: lines.join('\\n') }]\n };\n }\n\n // Step 1: Start publish flow\n const startResult = await client.fetch<PublishStartResponse>('/api/v1/skills', {\n method: 'POST',\n body: JSON.stringify({\n manifest: { ...manifest, visibility },\n readme: packResult.readme,\n files: packResult.files\n })\n });\n\n if (!startResult.ok) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Failed to start publish: ${startResult.error}`\n }\n ]\n };\n }\n\n const { uploadUrl, versionId } = startResult.data;\n\n // Step 2: Upload tarball\n const uploadRes = await fetch(uploadUrl, {\n method: 'PUT',\n headers: {\n 'Content-Type': 'application/gzip'\n },\n body: new Uint8Array(packResult.tarball)\n });\n\n if (!uploadRes.ok) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Failed to upload tarball: ${uploadRes.statusText}`\n }\n ]\n };\n }\n\n // Step 3: Confirm upload\n const confirmResult = await client.fetch<PublishConfirmResponse>('/api/v1/skills/confirm', {\n method: 'POST',\n body: JSON.stringify({\n versionId,\n integrity: packResult.integrity,\n fileCount: packResult.fileCount,\n tarballSize: packResult.tarball.length,\n readme: packResult.readme\n })\n });\n\n if (!confirmResult.ok) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Failed to confirm publish: ${confirmResult.error}`\n }\n ]\n };\n }\n\n const confirm = confirmResult.data;\n const score = confirm.auditScore !== null ? `${confirm.auditScore.toFixed(1)}/10` : 'pending';\n\n const lines: string[] = [\n `## Published ${confirm.name}@${confirm.version}`,\n '',\n `**Status:** ✅ Successfully published`,\n `**Visibility:** ${visibility}`,\n `**Audit Score:** ${score}`,\n `**Scan Verdict:** ${confirm.scanVerdict ?? 'pending'}`,\n '',\n '### Package Details',\n `- **Files:** ${packResult.fileCount}`,\n `- **Size:** ${(packResult.totalSize / 1024).toFixed(1)}KB`,\n '',\n `View your skill: https://tankpkg.dev/skills/${confirm.name}`\n ];\n\n return {\n content: [{ type: 'text' as const, text: lines.join('\\n') }]\n };\n }\n );\n}\n","import fs from 'node:fs';\nimport path from 'node:path';\n\nimport {\n LEGACY_LOCKFILE_FILENAME,\n LEGACY_MANIFEST_FILENAME,\n LOCKFILE_FILENAME,\n MANIFEST_FILENAME,\n type SkillsLock\n} from '@internals/schemas';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { z } from 'zod';\n\nconst SCOPED_NAME_PATTERN = /^@[a-z0-9-]+\\/[a-z0-9][a-z0-9-]*$/;\n\nexport function registerRemoveSkillTool(server: McpServer): void {\n server.tool(\n 'remove-skill',\n `Remove an installed skill from the project. Removes from ${MANIFEST_FILENAME}, ${LOCKFILE_FILENAME}, and deletes skill files.`,\n {\n name: z.string().describe('Skill name in @org/name format'),\n directory: z.string().optional().describe('Project directory (defaults to current working directory)')\n },\n async ({ name, directory }) => {\n if (!SCOPED_NAME_PATTERN.test(name)) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Validation error: Skill name \"${name}\" must use the @org/name format (e.g. @acme/my-skill).`\n }\n ],\n isError: true\n };\n }\n\n const dir = directory ? path.resolve(directory) : process.cwd();\n const results: string[] = [];\n let skillFoundAnywhere = false;\n\n // Find manifest (tank.json or skills.json)\n let skillsJsonPath = path.join(dir, MANIFEST_FILENAME);\n if (!fs.existsSync(skillsJsonPath)) {\n skillsJsonPath = path.join(dir, LEGACY_MANIFEST_FILENAME);\n }\n if (fs.existsSync(skillsJsonPath)) {\n try {\n const raw = fs.readFileSync(skillsJsonPath, 'utf-8');\n const skillsJson = JSON.parse(raw) as Record<string, unknown>;\n const skills = (skillsJson.skills ?? {}) as Record<string, string>;\n\n if (name in skills) {\n skillFoundAnywhere = true;\n delete skills[name];\n skillsJson.skills = skills;\n fs.writeFileSync(skillsJsonPath, `${JSON.stringify(skillsJson, null, 2)}\\n`);\n results.push(`Removed \"${name}\" from ${path.basename(skillsJsonPath)}`);\n }\n } catch {\n results.push(`Warning: Failed to read or parse ${path.basename(skillsJsonPath)}`);\n }\n }\n\n // Find lockfile (tank.lock or skills.lock)\n let lockPath = path.join(dir, LOCKFILE_FILENAME);\n if (!fs.existsSync(lockPath)) {\n lockPath = path.join(dir, LEGACY_LOCKFILE_FILENAME);\n }\n if (fs.existsSync(lockPath)) {\n try {\n const raw = fs.readFileSync(lockPath, 'utf-8');\n const lock = JSON.parse(raw) as SkillsLock;\n let removedFromLock = false;\n\n for (const key of Object.keys(lock.skills)) {\n const lastAt = key.lastIndexOf('@');\n if (lastAt <= 0) continue;\n const keyName = key.slice(0, lastAt);\n if (keyName === name) {\n delete lock.skills[key];\n removedFromLock = true;\n skillFoundAnywhere = true;\n }\n }\n\n if (removedFromLock) {\n const sortedSkills: Record<string, unknown> = {};\n for (const key of Object.keys(lock.skills).sort()) {\n sortedSkills[key] = lock.skills[key];\n }\n lock.skills = sortedSkills as SkillsLock['skills'];\n fs.writeFileSync(lockPath, `${JSON.stringify(lock, null, 2)}\\n`);\n results.push(`Removed \"${name}\" from ${path.basename(lockPath)}`);\n }\n } catch {\n results.push(`Warning: Failed to read or parse ${path.basename(lockPath)}`);\n }\n }\n\n const skillDir = getSkillDir(dir, name);\n if (fs.existsSync(skillDir)) {\n skillFoundAnywhere = true;\n fs.rmSync(skillDir, { recursive: true, force: true });\n results.push(`Deleted skill files from ${skillDir}`);\n } else {\n results.push(`Skill files were already absent from ${skillDir}`);\n }\n\n const symlinkName = name.replace(/\\//g, '__');\n const agentSkillDir = path.join(dir, '.tank', 'agent-skills', symlinkName);\n if (fs.existsSync(agentSkillDir)) {\n fs.rmSync(agentSkillDir, { recursive: true, force: true });\n results.push('Removed symlink from agent workspace');\n }\n\n if (!skillFoundAnywhere) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Skill \"${name}\" is not installed. It was not found in ${MANIFEST_FILENAME}, ${LOCKFILE_FILENAME}, or .tank/skills/.`\n }\n ],\n isError: true\n };\n }\n\n return {\n content: [\n {\n type: 'text' as const,\n text: `Successfully removed ${name}.\\n${results.join('\\n')}`\n }\n ]\n };\n }\n );\n}\n\nfunction getSkillDir(projectDir: string, skillName: string): string {\n if (skillName.startsWith('@')) {\n const [scope, name] = skillName.split('/');\n return path.join(projectDir, '.tank', 'skills', scope, name);\n }\n return path.join(projectDir, '.tank', 'skills', skillName);\n}\n","import fs from 'node:fs';\nimport path from 'node:path';\n\nimport { LEGACY_MANIFEST_FILENAME, MANIFEST_FILENAME } from '@internals/schemas';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { z } from 'zod';\n\nimport { TankApiClient } from '~/lib/api-client.js';\nimport { getConfig } from '~/lib/config.js';\nimport { pack, packForScan } from '~/lib/packer.js';\n\ninterface ScanFinding {\n stage: string;\n severity: 'critical' | 'high' | 'medium' | 'low';\n type: string;\n description: string;\n location: string | null;\n confidence: number | null;\n tool: string | null;\n evidence: string | null;\n}\n\ninterface LLMAnalysis {\n enabled: boolean;\n mode: 'byollm' | 'builtin' | 'disabled';\n provider_used?: string;\n findings_reviewed?: number;\n findings_dismissed?: number;\n findings_confirmed?: number;\n findings_uncertain?: number;\n latency_ms?: number;\n error?: string;\n}\n\ninterface ScanResponse {\n scan_id: string | null;\n verdict: 'pass' | 'pass_with_notes' | 'flagged' | 'fail';\n audit_score: number;\n findings: ScanFinding[];\n stage_results: Array<{\n stage: string;\n status: string;\n findings: ScanFinding[];\n duration_ms: number;\n }>;\n llm_analysis?: LLMAnalysis;\n duration_ms: number;\n}\n\nexport function registerScanSkillTool(server: McpServer): void {\n server.tool(\n 'scan-skill',\n 'Scan a skill directory for security issues. Requires authentication.',\n {\n directory: z.string().optional().describe('Directory to scan (default: current directory)')\n },\n async ({ directory = '.' }) => {\n const absDir = path.resolve(directory);\n const client = new TankApiClient();\n\n // Check auth, guide user to login if not authenticated\n if (!client.isAuthenticated) {\n return {\n content: [\n {\n type: 'text' as const,\n text: 'You need to log in first. Use the login tool to authenticate with Tank.\\n\\nExample: \"Log in to Tank\"'\n }\n ]\n };\n }\n\n // Verify auth is still valid\n const authCheck = await client.verifyAuth();\n if (!authCheck.valid) {\n return {\n content: [\n {\n type: 'text' as const,\n text: 'Your session has expired. Use the login tool to authenticate again.\\n\\nExample: \"Log in to Tank\"'\n }\n ]\n };\n }\n\n let packResult: Awaited<ReturnType<typeof pack>>;\n let usedSynthesisedManifest = false;\n\n const hasManifest =\n fs.existsSync(path.join(absDir, MANIFEST_FILENAME)) ||\n fs.existsSync(path.join(absDir, LEGACY_MANIFEST_FILENAME));\n\n if (hasManifest) {\n try {\n packResult = await pack(absDir);\n } catch (err) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Failed to pack skill: ${err instanceof Error ? err.message : String(err)}`\n }\n ]\n };\n }\n } else {\n try {\n packResult = await packForScan(absDir);\n usedSynthesisedManifest = true;\n } catch (err) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Failed to pack directory for scan: ${err instanceof Error ? err.message : String(err)}`\n }\n ]\n };\n }\n }\n\n const manifest = packResult.manifest as { name?: string; version?: string };\n const skillName = manifest.name ?? 'unknown';\n const skillVersion = manifest.version ?? '0.0.0';\n\n // Upload tarball and trigger scan\n const formData = new FormData();\n const blob = new Blob([new Uint8Array(packResult.tarball)], { type: 'application/gzip' });\n formData.append('tarball', blob, `${skillName}-${skillVersion}.tgz`);\n formData.append('manifest', JSON.stringify(manifest));\n\n const config = getConfig();\n const scanRes = await fetch(`${config.registry}/api/v1/scan`, {\n method: 'POST',\n headers: {\n Authorization: `Bearer ${client.token}`\n },\n body: formData\n });\n\n if (!scanRes.ok) {\n const body = await scanRes.json().catch(() => ({}));\n return {\n content: [\n {\n type: 'text' as const,\n text: `Scan failed: ${(body as { error?: string }).error ?? scanRes.statusText}`\n }\n ]\n };\n }\n\n const scanResult = (await scanRes.json()) as ScanResponse;\n\n // Format report\n const verdictEmoji: Record<string, string> = {\n pass: '✅',\n pass_with_notes: '⚠️',\n flagged: '🚩',\n fail: '❌'\n };\n\n const severityEmoji: Record<string, string> = {\n critical: '🔴',\n high: '🟠',\n medium: '🟡',\n low: '🟢'\n };\n\n const lines: string[] = [`## Scan Results for ${skillName}@${skillVersion}`, ''];\n\n if (usedSynthesisedManifest) {\n lines.push(`> **Note:** No \\`${MANIFEST_FILENAME}\\` found. A synthesised manifest was used for scanning.`);\n lines.push('');\n }\n\n const auditScore = scanResult.audit_score ?? 0;\n const durationMs = scanResult.duration_ms ?? 0;\n\n lines.push(\n `**Verdict:** ${verdictEmoji[scanResult.verdict] ?? ''} ${scanResult.verdict.toUpperCase()}`,\n `**Score:** ${auditScore.toFixed(1)}/10`,\n `**Duration:** ${(durationMs / 1000).toFixed(1)}s`,\n `**Files:** ${packResult.fileCount} (${(packResult.totalSize / 1024).toFixed(1)}KB)`,\n ''\n );\n\n if (scanResult.findings.length > 0) {\n lines.push(`### Findings (${scanResult.findings.length})`);\n lines.push('');\n\n // Group by severity\n const bySeverity: Record<string, ScanFinding[]> = {\n critical: [],\n high: [],\n medium: [],\n low: []\n };\n for (const f of scanResult.findings) {\n bySeverity[f.severity].push(f);\n }\n\n for (const severity of ['critical', 'high', 'medium', 'low'] as const) {\n const findings = bySeverity[severity];\n if (findings.length === 0) continue;\n\n lines.push(`#### ${severityEmoji[severity]} ${severity.toUpperCase()} (${findings.length})`);\n for (const f of findings) {\n lines.push(`- **${f.type}**: ${f.description}`);\n if (f.location) lines.push(` - Location: ${f.location}`);\n }\n lines.push('');\n }\n } else {\n lines.push('No findings. Your skill looks secure!');\n lines.push('');\n }\n\n // Stages run\n if (scanResult.stage_results?.length > 0) {\n lines.push('### Scan Stages');\n lines.push('');\n for (const stage of scanResult.stage_results) {\n const status = stage.status === 'passed' ? '✓' : '✗';\n lines.push(`- ${status} ${stage.stage} (${stage.duration_ms}ms)`);\n }\n lines.push('');\n }\n\n // LLM Analysis\n if (scanResult.llm_analysis?.enabled) {\n const llm = scanResult.llm_analysis;\n lines.push('### LLM Analysis');\n lines.push('');\n lines.push(`**Mode:** ${llm.mode}`);\n if (llm.provider_used) {\n lines.push(`**Provider:** ${llm.provider_used}`);\n }\n if (llm.findings_reviewed !== undefined && llm.findings_reviewed > 0) {\n lines.push(`**Findings Reviewed:** ${llm.findings_reviewed}`);\n }\n if (llm.findings_dismissed !== undefined && llm.findings_dismissed > 0) {\n lines.push(`**False Positives Dismissed:** ${llm.findings_dismissed}`);\n }\n if (llm.findings_confirmed !== undefined && llm.findings_confirmed > 0) {\n lines.push(`**Threats Confirmed:** ${llm.findings_confirmed}`);\n }\n if (llm.findings_uncertain !== undefined && llm.findings_uncertain > 0) {\n lines.push(`**Uncertain:** ${llm.findings_uncertain}`);\n }\n if (llm.latency_ms) {\n lines.push(`**Latency:** ${llm.latency_ms}ms`);\n }\n if (llm.error) {\n lines.push(`**Error:** ${llm.error}`);\n }\n lines.push('');\n }\n\n if (scanResult.scan_id) {\n lines.push(`View full report: https://tankpkg.dev/scans/${scanResult.scan_id}`);\n }\n\n return {\n content: [{ type: 'text' as const, text: lines.join('\\n') }]\n };\n }\n );\n}\n","import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { z } from 'zod';\n\nimport { TankApiClient } from '~/lib/api-client.js';\n\ninterface SearchResult {\n name: string;\n latestVersion?: string | null;\n description: string | null;\n auditScore?: number | null;\n downloads: number;\n publisher: string;\n}\n\ninterface SearchResponse {\n results: SearchResult[];\n total: number;\n}\n\nexport function registerSearchSkillsTool(server: McpServer): void {\n const client = new TankApiClient();\n\n server.tool(\n 'search-skills',\n 'Search the Tank registry for AI agent skills',\n {\n query: z.string().min(1).describe('Search query (skill name or keywords)'),\n limit: z.number().min(1).max(50).optional().default(10).describe('Maximum results to return')\n },\n async ({ query, limit }) => {\n const result = await client.fetch<SearchResponse>(`/api/v1/search?q=${encodeURIComponent(query)}&limit=${limit}`);\n\n if (!result.ok) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Search failed: ${result.error}`\n }\n ]\n };\n }\n\n const { results, total } = result.data;\n\n if (results.length === 0) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `No skills found matching \"${query}\". Try different keywords or browse the registry at https://tankpkg.dev`\n }\n ]\n };\n }\n\n // Format as markdown table\n const header = '| Skill | Score | Downloads | Description |\\n|-------|-------|-----------|-------------|';\n const rows = results.map((skill) => {\n const score =\n typeof skill.auditScore === 'number' && Number.isFinite(skill.auditScore) ? skill.auditScore.toFixed(1) : '-';\n const downloads =\n skill.downloads > 1000 ? `${(skill.downloads / 1000).toFixed(1)}k` : skill.downloads.toString();\n const desc = skill.description?.slice(0, 50) ?? 'No description';\n return `| ${skill.name} | ${score} | ${downloads} | ${desc} |`;\n });\n\n const text = [\n `Found ${total} skill${total !== 1 ? 's' : ''} matching \"${query}\":`,\n '',\n header,\n ...rows,\n '',\n `View full results: https://tankpkg.dev/search?q=${encodeURIComponent(query)}`\n ].join('\\n');\n\n return {\n content: [{ type: 'text' as const, text }]\n };\n }\n );\n}\n","import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { z } from 'zod';\n\nimport { TankApiClient } from '~/lib/api-client.js';\n\ninterface SkillVersion {\n version: string;\n integrity: string;\n auditScore: number | null;\n auditStatus: string;\n publishedAt: string;\n tarballSize: number;\n fileCount: number;\n}\n\ninterface SkillInfoResponse {\n name: string;\n description: string | null;\n publisher: string;\n latestVersion: string;\n auditScore: number | null;\n auditStatus: string;\n downloads: number;\n permissions: Record<string, unknown> | null;\n versions: SkillVersion[];\n readme: string | null;\n}\n\nexport function registerSkillInfoTool(server: McpServer): void {\n const client = new TankApiClient();\n\n server.tool(\n 'skill-info',\n 'Get detailed information about a specific skill from the Tank registry',\n {\n name: z.string().describe('Skill name (e.g., @org/skill-name or skill-name)')\n },\n async ({ name }) => {\n const result = await client.fetch<SkillInfoResponse>(`/api/v1/skills/${encodeURIComponent(name)}`);\n\n if (!result.ok) {\n if (result.status === 404) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Skill \"${name}\" not found. Search for skills: https://tankpkg.dev/search`\n }\n ]\n };\n }\n return {\n content: [\n {\n type: 'text' as const,\n text: `Failed to get skill info: ${result.error}`\n }\n ]\n };\n }\n\n const skill = result.data;\n const score = skill.auditScore !== null ? `${skill.auditScore.toFixed(1)}/10` : 'Not scored';\n const size = skill.versions[0] ? `${(skill.versions[0].tarballSize / 1024).toFixed(1)}KB` : 'Unknown';\n\n // Format permissions as readable text\n let permsText = 'None declared';\n if (skill.permissions) {\n const perms: string[] = [];\n const p = skill.permissions as {\n network?: { outbound?: string[] };\n filesystem?: { read?: string[]; write?: string[] };\n subprocess?: boolean;\n };\n if (p.network?.outbound?.length) {\n perms.push(`network: ${p.network.outbound.join(', ')}`);\n }\n if (p.filesystem?.read?.length || p.filesystem?.write?.length) {\n const fsPerms: string[] = [];\n if (p.filesystem.read?.length) fsPerms.push(`read: ${p.filesystem.read.length} paths`);\n if (p.filesystem.write?.length) fsPerms.push(`write: ${p.filesystem.write.length} paths`);\n perms.push(`filesystem (${fsPerms.join(', ')})`);\n }\n if (p.subprocess) perms.push('subprocess: allowed');\n if (perms.length > 0) permsText = perms.join('\\n - ');\n }\n\n const versionsList = skill.versions\n .slice(0, 5)\n .map((v) => {\n const vScore = v.auditScore !== null ? v.auditScore.toFixed(1) : '-';\n return `${v.version} (score: ${vScore})`;\n })\n .join('\\n - ');\n\n const text = [\n `# ${skill.name}`,\n '',\n `**Publisher:** ${skill.publisher}`,\n `**Latest:** ${skill.latestVersion}`,\n `**Score:** ${score}`,\n `**Size:** ${size}`,\n `**Downloads:** ${skill.downloads}`,\n '',\n '**Description:**',\n skill.description ?? 'No description available',\n '',\n '**Permissions:**',\n ` - ${permsText}`,\n '',\n '**Versions:**',\n ` - ${versionsList}`,\n skill.versions.length > 5 ? `\\n ... and ${skill.versions.length - 5} more` : '',\n '',\n `View on Tank: https://tankpkg.dev/skills/${skill.name}`\n ].join('\\n');\n\n return {\n content: [{ type: 'text' as const, text }]\n };\n }\n );\n}\n","import fs from 'node:fs';\nimport path from 'node:path';\n\nimport {\n LEGACY_LOCKFILE_FILENAME,\n LEGACY_MANIFEST_FILENAME,\n LOCKFILE_FILENAME,\n MANIFEST_FILENAME,\n type Permissions,\n type SkillsJson,\n type SkillsLock\n} from '@internals/schemas';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { z } from 'zod';\n\nfunction parseSkillName(key: string): string {\n const lastAt = key.lastIndexOf('@');\n if (lastAt > 0) {\n return key.slice(0, lastAt);\n }\n return key;\n}\n\ninterface PermissionEntry {\n value: string;\n skills: string[];\n}\n\ninterface ResolvedPermissions {\n networkOutbound: PermissionEntry[];\n filesystemRead: PermissionEntry[];\n filesystemWrite: PermissionEntry[];\n subprocess: string[];\n env: PermissionEntry[];\n exec: PermissionEntry[];\n}\n\nfunction collectPermissions(lockfile: SkillsLock): ResolvedPermissions {\n const networkMap = new Map<string, string[]>();\n const fsReadMap = new Map<string, string[]>();\n const fsWriteMap = new Map<string, string[]>();\n const subprocessSkills: string[] = [];\n const envMap = new Map<string, string[]>();\n const execMap = new Map<string, string[]>();\n\n for (const [key, entry] of Object.entries(lockfile.skills)) {\n const skillName = parseSkillName(key);\n const perms = entry.permissions;\n\n if (perms.network?.outbound) {\n for (const domain of perms.network.outbound) {\n const existing = networkMap.get(domain) ?? [];\n existing.push(skillName);\n networkMap.set(domain, existing);\n }\n }\n\n if (perms.filesystem?.read) {\n for (const p of perms.filesystem.read) {\n const existing = fsReadMap.get(p) ?? [];\n existing.push(skillName);\n fsReadMap.set(p, existing);\n }\n }\n\n if (perms.filesystem?.write) {\n for (const p of perms.filesystem.write) {\n const existing = fsWriteMap.get(p) ?? [];\n existing.push(skillName);\n fsWriteMap.set(p, existing);\n }\n }\n\n if (perms.subprocess === true) {\n subprocessSkills.push(skillName);\n }\n\n const rawPerms = perms as Record<string, unknown>;\n if (Array.isArray(rawPerms.env)) {\n for (const envVar of rawPerms.env as string[]) {\n const existing = envMap.get(envVar) ?? [];\n existing.push(skillName);\n envMap.set(envVar, existing);\n }\n }\n\n if (Array.isArray(rawPerms.exec)) {\n for (const cmd of rawPerms.exec as string[]) {\n const existing = execMap.get(cmd) ?? [];\n existing.push(skillName);\n execMap.set(cmd, existing);\n }\n }\n }\n\n const toEntries = (map: Map<string, string[]>): PermissionEntry[] =>\n Array.from(map.entries()).map(([value, skills]) => ({ value, skills }));\n\n return {\n networkOutbound: toEntries(networkMap),\n filesystemRead: toEntries(fsReadMap),\n filesystemWrite: toEntries(fsWriteMap),\n subprocess: subprocessSkills,\n env: toEntries(envMap),\n exec: toEntries(execMap)\n };\n}\n\nfunction formatAttribution(skills: string[]): string {\n return `<- ${skills.join(', ')}`;\n}\n\nfunction formatSection(title: string, entries: PermissionEntry[]): string {\n const lines: string[] = [];\n lines.push(`${title}:`);\n if (entries.length === 0) {\n lines.push(' none');\n } else {\n for (const entry of entries) {\n lines.push(` ${entry.value} ${formatAttribution(entry.skills)}`);\n }\n }\n return lines.join('\\n');\n}\n\n// Wildcard matching: *.example.com matches sub.example.com, * matches all\nfunction isDomainAllowed(domain: string, allowedDomains: string[]): boolean {\n for (const allowed of allowedDomains) {\n if (allowed === '*') return true;\n if (allowed === domain) return true;\n if (allowed.startsWith('*.')) {\n const suffix = allowed.slice(1);\n if (domain.endsWith(suffix) || domain === allowed.slice(2)) {\n return true;\n }\n if (domain === allowed) return true;\n }\n }\n return false;\n}\n\n// Glob matching: ./src/** matches ./src/foo/bar\nfunction isPathAllowed(requestedPath: string, allowedPaths: string[]): boolean {\n for (const allowed of allowedPaths) {\n if (allowed === requestedPath) return true;\n if (allowed.endsWith('/**')) {\n const prefix = allowed.slice(0, -3);\n if (requestedPath.startsWith(prefix)) return true;\n }\n }\n return false;\n}\n\ninterface BudgetViolation {\n category: string;\n value: string;\n skills: string[];\n}\n\nfunction checkBudget(resolved: ResolvedPermissions, budget: Permissions): BudgetViolation[] {\n const violations: BudgetViolation[] = [];\n\n const budgetDomains = budget.network?.outbound ?? [];\n for (const entry of resolved.networkOutbound) {\n if (!isDomainAllowed(entry.value, budgetDomains)) {\n violations.push({\n category: 'network outbound',\n value: entry.value,\n skills: entry.skills\n });\n }\n }\n\n const budgetReadPaths = budget.filesystem?.read ?? [];\n for (const entry of resolved.filesystemRead) {\n if (!isPathAllowed(entry.value, budgetReadPaths)) {\n violations.push({\n category: 'filesystem read',\n value: entry.value,\n skills: entry.skills\n });\n }\n }\n\n const budgetWritePaths = budget.filesystem?.write ?? [];\n for (const entry of resolved.filesystemWrite) {\n if (!isPathAllowed(entry.value, budgetWritePaths)) {\n violations.push({\n category: 'filesystem write',\n value: entry.value,\n skills: entry.skills\n });\n }\n }\n\n if (resolved.subprocess.length > 0 && budget.subprocess !== true) {\n violations.push({\n category: 'subprocess',\n value: 'subprocess access',\n skills: resolved.subprocess\n });\n }\n\n return violations;\n}\n\nexport function registerSkillPermissionsTool(server: McpServer): void {\n server.tool(\n 'skill-permissions',\n 'Display resolved permission summary for installed skills. Shows what capabilities each skill requires and checks against the project permission budget.',\n {\n directory: z.string().optional().describe('Project directory path (defaults to current working directory)')\n },\n async ({ directory }) => {\n const dir = directory ? path.resolve(directory) : process.cwd();\n\n if (!fs.existsSync(dir)) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Directory does not exist: ${dir}`\n }\n ],\n isError: true\n };\n }\n\n let skillsJsonPath = path.join(dir, MANIFEST_FILENAME);\n if (!fs.existsSync(skillsJsonPath)) {\n skillsJsonPath = path.join(dir, LEGACY_MANIFEST_FILENAME);\n }\n if (!fs.existsSync(skillsJsonPath)) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `No ${MANIFEST_FILENAME} found. Run \"init-skill\" to create one.`\n }\n ],\n isError: true\n };\n }\n\n let skillsJson: SkillsJson;\n try {\n const raw = fs.readFileSync(skillsJsonPath, 'utf-8');\n skillsJson = JSON.parse(raw) as SkillsJson;\n } catch {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Failed to parse ${path.basename(skillsJsonPath)}. The file may be corrupted.`\n }\n ],\n isError: true\n };\n }\n\n const skillDeps = skillsJson.skills ?? {};\n if (Object.keys(skillDeps).length === 0) {\n return {\n content: [\n {\n type: 'text' as const,\n text: 'No skills with permissions to display. The project has no skill dependencies.'\n }\n ]\n };\n }\n\n let lockfilePath = path.join(dir, LOCKFILE_FILENAME);\n if (!fs.existsSync(lockfilePath)) {\n lockfilePath = path.join(dir, LEGACY_LOCKFILE_FILENAME);\n }\n if (!fs.existsSync(lockfilePath)) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `No ${LOCKFILE_FILENAME} found. Skills are declared but not installed. Run install to generate a lockfile.`\n }\n ]\n };\n }\n\n let lockfile: SkillsLock;\n try {\n const raw = fs.readFileSync(lockfilePath, 'utf-8');\n lockfile = JSON.parse(raw) as SkillsLock;\n } catch {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Failed to parse ${path.basename(lockfilePath)}. The file may be corrupted.`\n }\n ],\n isError: true\n };\n }\n\n if (!lockfile.skills || Object.keys(lockfile.skills).length === 0) {\n return {\n content: [\n {\n type: 'text' as const,\n text: 'No skills installed. The lockfile is empty.'\n }\n ]\n };\n }\n\n const resolved = collectPermissions(lockfile);\n\n const lines: string[] = [];\n lines.push('Resolved permissions for this project:');\n lines.push('');\n\n lines.push(formatSection('Network (outbound)', resolved.networkOutbound));\n lines.push(formatSection('Filesystem (read)', resolved.filesystemRead));\n lines.push(formatSection('Filesystem (write)', resolved.filesystemWrite));\n\n lines.push('Subprocess:');\n if (resolved.subprocess.length === 0) {\n lines.push(' none');\n } else {\n lines.push(` allowed ${formatAttribution(resolved.subprocess)}`);\n }\n\n if (resolved.env.length > 0) {\n lines.push(formatSection('Environment variables', resolved.env));\n }\n\n if (resolved.exec.length > 0) {\n lines.push(formatSection('Exec', resolved.exec));\n }\n\n lines.push('');\n lines.push('Per-skill breakdown:');\n for (const [key, entry] of Object.entries(lockfile.skills)) {\n const skillName = parseSkillName(key);\n const perms = entry.permissions;\n const permParts: string[] = [];\n\n if (perms.network?.outbound && perms.network.outbound.length > 0) {\n permParts.push(`network: ${perms.network.outbound.join(', ')}`);\n }\n if (perms.filesystem?.read && perms.filesystem.read.length > 0) {\n permParts.push(`filesystem:read: ${perms.filesystem.read.join(', ')}`);\n }\n if (perms.filesystem?.write && perms.filesystem.write.length > 0) {\n permParts.push(`filesystem:write: ${perms.filesystem.write.join(', ')}`);\n }\n if (perms.subprocess === true) {\n permParts.push('subprocess: allowed');\n }\n\n const rawPerms = perms as Record<string, unknown>;\n if (Array.isArray(rawPerms.env) && (rawPerms.env as string[]).length > 0) {\n permParts.push(`env: ${(rawPerms.env as string[]).join(', ')}`);\n }\n if (Array.isArray(rawPerms.exec) && (rawPerms.exec as string[]).length > 0) {\n permParts.push(`exec: ${(rawPerms.exec as string[]).join(', ')}`);\n }\n\n if (permParts.length === 0) {\n lines.push(` ${skillName}: no special permissions`);\n } else {\n lines.push(` ${skillName}: ${permParts.join('; ')}`);\n }\n }\n\n const budget = skillsJson.permissions;\n lines.push('');\n\n if (!budget) {\n lines.push('Budget status: No budget defined');\n } else {\n const violations = checkBudget(resolved, budget);\n\n if (violations.length === 0) {\n lines.push('Budget status: PASS (all within budget)');\n } else {\n lines.push('Budget status: FAIL');\n for (const v of violations) {\n lines.push(` - ${v.category}: \"${v.value}\" not in budget (requested by ${v.skills.join(', ')})`);\n }\n }\n }\n\n return {\n content: [{ type: 'text' as const, text: lines.join('\\n') }]\n };\n }\n );\n}\n","import fs from 'node:fs';\nimport path from 'node:path';\n\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { z } from 'zod';\n\nconst SCOPED_NAME_PATTERN = /^@[a-z0-9-]+\\/[a-z0-9][a-z0-9-]*$/;\n\nexport function registerUnlinkSkillTool(server: McpServer): void {\n server.tool(\n 'unlink-skill',\n 'Unlink a skill from an agent workspace. Removes the symlink without deleting the installed skill files.',\n {\n name: z.string().describe('Skill name in @org/name format'),\n workspace: z.string().describe('Agent workspace directory path'),\n directory: z\n .string()\n .optional()\n .describe('Project directory where skills are installed (defaults to current working directory)')\n },\n async ({ name, workspace, directory }) => {\n if (!SCOPED_NAME_PATTERN.test(name)) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Validation error: Skill name \"${name}\" must use the @org/name format (e.g. @acme/my-skill).`\n }\n ],\n isError: true\n };\n }\n\n const projectDir = directory ? path.resolve(directory) : process.cwd();\n const workspaceDir = path.resolve(workspace);\n\n if (!fs.existsSync(workspaceDir)) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Error: Workspace directory does not exist: ${workspaceDir}`\n }\n ],\n isError: true\n };\n }\n\n const skillDir = getSkillDir(projectDir, name);\n if (!fs.existsSync(skillDir)) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Skill \"${name}\" is not installed. It was not found in ${skillDir}.`\n }\n ],\n isError: true\n };\n }\n\n const [scope, skillName] = name.split('/');\n const symlinkPath = path.join(workspaceDir, '.skills', scope, skillName);\n\n try {\n const stats = fs.lstatSync(symlinkPath);\n if (stats.isSymbolicLink()) {\n fs.unlinkSync(symlinkPath);\n return {\n content: [\n {\n type: 'text' as const,\n text: `Successfully unlinked \"${name}\" from ${workspaceDir}.\\nRemoved symlink: ${symlinkPath}`\n }\n ]\n };\n }\n } catch {\n // intentionally empty\n }\n\n return {\n content: [\n {\n type: 'text' as const,\n text: `No link exists for \"${name}\" in ${workspaceDir}.`\n }\n ]\n };\n }\n );\n}\n\nfunction getSkillDir(projectDir: string, skillName: string): string {\n if (skillName.startsWith('@')) {\n const [scope, name] = skillName.split('/');\n return path.join(projectDir, '.tank', 'skills', scope, name);\n }\n return path.join(projectDir, '.tank', 'skills', skillName);\n}\n","import fs from 'node:fs';\nimport path from 'node:path';\n\nimport { resolve } from '@internals/helpers';\nimport {\n LEGACY_LOCKFILE_FILENAME,\n LEGACY_MANIFEST_FILENAME,\n LOCKFILE_FILENAME,\n MANIFEST_FILENAME,\n type SkillsLock\n} from '@internals/schemas';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { z } from 'zod';\n\nimport { TankApiClient } from '~/lib/api-client.js';\n\nconst SCOPED_NAME_PATTERN = /^@[a-z0-9-]+\\/[a-z0-9][a-z0-9-]*$/;\n\ninterface VersionInfo {\n version: string;\n integrity: string;\n auditScore: number;\n auditStatus: string;\n publishedAt: string;\n}\n\ninterface VersionsResponse {\n name: string;\n versions: VersionInfo[];\n}\n\nfunction parseLockKey(key: string): { name: string; version: string } | null {\n const lastAt = key.lastIndexOf('@');\n if (lastAt <= 0) return null;\n return { name: key.slice(0, lastAt), version: key.slice(lastAt + 1) };\n}\n\nexport function registerUpdateSkillTool(server: McpServer): void {\n server.tool(\n 'update-skill',\n 'Update an installed skill to the latest compatible version within its declared semver range.',\n {\n name: z.string().describe('Skill name in @org/name format'),\n directory: z.string().optional().describe('Project directory (defaults to current working directory)')\n },\n async ({ name, directory }) => {\n if (!SCOPED_NAME_PATTERN.test(name)) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Validation error: Skill name \"${name}\" must use the @org/name format (e.g. @acme/my-skill).`\n }\n ],\n isError: true\n };\n }\n\n const dir = directory ? path.resolve(directory) : process.cwd();\n\n let skillsJsonPath = path.join(dir, MANIFEST_FILENAME);\n if (!fs.existsSync(skillsJsonPath)) {\n skillsJsonPath = path.join(dir, LEGACY_MANIFEST_FILENAME);\n }\n if (!fs.existsSync(skillsJsonPath)) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `No ${MANIFEST_FILENAME} found in ${dir}. Run the \"init-skill\" tool first.`\n }\n ],\n isError: true\n };\n }\n\n let skillsJson: Record<string, unknown>;\n try {\n const raw = fs.readFileSync(skillsJsonPath, 'utf-8');\n skillsJson = JSON.parse(raw) as Record<string, unknown>;\n } catch {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Failed to read or parse ${path.basename(skillsJsonPath)}.`\n }\n ],\n isError: true\n };\n }\n\n const skills = (skillsJson.skills ?? {}) as Record<string, string>;\n const versionRange = skills[name];\n\n if (!versionRange) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Skill \"${name}\" is not installed (not found in ${path.basename(skillsJsonPath)}). Install it first with the install-skill tool.`\n }\n ],\n isError: true\n };\n }\n\n let lockPath = path.join(dir, LOCKFILE_FILENAME);\n if (!fs.existsSync(lockPath)) {\n lockPath = path.join(dir, LEGACY_LOCKFILE_FILENAME);\n }\n let currentVersion: string | null = null;\n\n if (fs.existsSync(lockPath)) {\n try {\n const raw = fs.readFileSync(lockPath, 'utf-8');\n const lock = JSON.parse(raw) as SkillsLock;\n for (const key of Object.keys(lock.skills)) {\n const parsed = parseLockKey(key);\n if (!parsed) continue;\n if (parsed.name === name) {\n currentVersion = parsed.version;\n break;\n }\n }\n } catch {\n // Lockfile unreadable — treat as no current version\n }\n }\n\n if (!currentVersion) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Skill \"${name}\" is not installed (not found in ${LOCKFILE_FILENAME}). Install it first with the install-skill tool.`\n }\n ],\n isError: true\n };\n }\n\n const client = new TankApiClient();\n if (!client.isAuthenticated) {\n return {\n content: [\n {\n type: 'text' as const,\n text: 'Authentication required. Please run the \"login\" tool first to authenticate with Tank.'\n }\n ],\n isError: true\n };\n }\n\n // Fetch available versions from registry\n const encodedName = encodeURIComponent(name);\n const versionsResult = await client.fetch<VersionsResponse>(`/api/v1/skills/${encodedName}/versions`);\n\n if (!versionsResult.ok) {\n if (versionsResult.status === 0) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Unable to connect to the Tank registry. Check your network connection and try again.`\n }\n ],\n isError: true\n };\n }\n if (versionsResult.status === 404) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Skill \"${name}\" not found in the registry.`\n }\n ],\n isError: true\n };\n }\n return {\n content: [\n {\n type: 'text' as const,\n text: `Failed to fetch versions for ${name}: ${versionsResult.error}`\n }\n ],\n isError: true\n };\n }\n\n const availableVersions = versionsResult.data.versions.map((v) => v.version);\n\n // 6. Resolve best version within declared range\n const resolved = resolve(versionRange, availableVersions);\n if (!resolved) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `No version of ${name} satisfies range \"${versionRange}\". Available: ${availableVersions.join(', ')}`\n }\n ],\n isError: true\n };\n }\n\n // 7. Check for newer major versions outside range\n const allMajors = availableVersions\n .map((v) => {\n const major = v.split('.')[0];\n return { version: v, major: Number.parseInt(major, 10) };\n })\n .filter((v) => !Number.isNaN(v.major));\n\n const currentMajor = Number.parseInt(currentVersion.split('.')[0], 10);\n const newerMajors = allMajors.filter((v) => v.major > currentMajor).map((v) => v.version);\n\n const highestOutOfRange =\n newerMajors.length > 0\n ? newerMajors.sort((a, b) => {\n const [aMaj, aMin, aPat] = a.split('.').map(Number);\n const [bMaj, bMin, bPat] = b.split('.').map(Number);\n return bMaj - aMaj || bMin - aMin || bPat - aPat;\n })[0]\n : null;\n\n // 8. If resolved === current, already at latest\n if (resolved === currentVersion) {\n const lines = [`Already at latest compatible version: ${name}@${resolved}`];\n if (highestOutOfRange) {\n lines.push(\n `\\nNote: Version ${highestOutOfRange} is available but outside the declared range \"${versionRange}\". Update ${MANIFEST_FILENAME} to use it.`\n );\n }\n return {\n content: [\n {\n type: 'text' as const,\n text: lines.join('')\n }\n ]\n };\n }\n\n // 9. Fetch the resolved version details for download\n const versionResult = await client.fetch<{\n version: string;\n integrity: string;\n downloadUrl: string;\n permissions: Record<string, unknown>;\n auditScore: number | null;\n }>(`/api/v1/skills/${encodedName}/${resolved}`);\n\n if (!versionResult.ok) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Failed to fetch version details for ${name}@${resolved}: ${versionResult.error}`\n }\n ],\n isError: true\n };\n }\n\n const versionData = versionResult.data;\n\n // 10. Download tarball\n let tarballBuffer: ArrayBuffer;\n try {\n const tarballRes = await fetch(versionData.downloadUrl);\n if (!tarballRes.ok) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Failed to download tarball for ${name}@${resolved}: ${tarballRes.statusText}`\n }\n ],\n isError: true\n };\n }\n tarballBuffer = await tarballRes.arrayBuffer();\n } catch (err) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Network error downloading ${name}@${resolved}: ${err instanceof Error ? err.message : String(err)}`\n }\n ],\n isError: true\n };\n }\n\n // 11. Verify SHA-512\n const { createHash } = await import('node:crypto');\n const hash = createHash('sha512').update(Buffer.from(tarballBuffer)).digest('base64');\n const computedIntegrity = `sha512-${hash}`;\n\n if (computedIntegrity !== versionData.integrity) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Integrity check failed for ${name}@${resolved}. The tarball has been tampered with or is corrupted.\\nExpected: ${versionData.integrity}\\nGot: ${computedIntegrity}`\n }\n ],\n isError: true\n };\n }\n\n // 12. Extract tarball to skill directory\n const { execSync } = await import('node:child_process');\n const skillDir = getSkillDir(dir, name);\n\n // Remove old version files if they exist\n if (fs.existsSync(skillDir)) {\n fs.rmSync(skillDir, { recursive: true, force: true });\n }\n fs.mkdirSync(skillDir, { recursive: true });\n\n const tarballPath = path.join(skillDir, '__temp_tarball.tgz');\n fs.writeFileSync(tarballPath, Buffer.from(tarballBuffer));\n\n try {\n execSync(`tar xzf \"${tarballPath}\" -C \"${skillDir}\" --strip-components=1`, {\n stdio: 'pipe'\n });\n } catch (err) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Failed to extract tarball for ${name}@${resolved}: ${err instanceof Error ? err.message : String(err)}`\n }\n ],\n isError: true\n };\n } finally {\n // Clean up temp tarball\n try {\n fs.unlinkSync(tarballPath);\n } catch {\n /* ignore */\n }\n }\n\n // 13. Update lockfile\n let lock: SkillsLock;\n if (fs.existsSync(lockPath)) {\n try {\n const raw = fs.readFileSync(lockPath, 'utf-8');\n lock = JSON.parse(raw) as SkillsLock;\n } catch {\n lock = { lockfileVersion: 1, skills: {} };\n }\n } else {\n lock = { lockfileVersion: 1, skills: {} };\n }\n\n // Remove old lock entry for this skill\n for (const key of Object.keys(lock.skills)) {\n const parsed = parseLockKey(key);\n if (parsed && parsed.name === name) {\n delete lock.skills[key];\n }\n }\n\n // Add new lock entry\n const newLockKey = `${name}@${resolved}`;\n lock.skills[newLockKey] = {\n resolved: versionData.downloadUrl,\n integrity: versionData.integrity,\n permissions: versionData.permissions as SkillsLock['skills'][string]['permissions'],\n audit_score: versionData.auditScore\n };\n\n // Sort keys for deterministic output\n const sortedSkills: Record<string, unknown> = {};\n for (const key of Object.keys(lock.skills).sort()) {\n sortedSkills[key] = lock.skills[key];\n }\n lock.skills = sortedSkills as SkillsLock['skills'];\n\n fs.writeFileSync(lockPath, `${JSON.stringify(lock, null, 2)}\\n`);\n\n // 14. Build response\n const lines = [\n `Updated ${name} from ${currentVersion} to ${resolved}.`,\n `Integrity verified (SHA-512).`,\n `Lockfile updated.`\n ];\n\n if (highestOutOfRange) {\n lines.push(\n `\\nNote: Version ${highestOutOfRange} is available but outside the declared range \"${versionRange}\". Update ${MANIFEST_FILENAME} to use it.`\n );\n }\n\n return {\n content: [\n {\n type: 'text' as const,\n text: lines.join('\\n')\n }\n ]\n };\n }\n );\n}\n\nfunction getSkillDir(projectDir: string, skillName: string): string {\n if (skillName.startsWith('@')) {\n const [scope, name] = skillName.split('/');\n return path.join(projectDir, '.tank', 'skills', scope, name);\n }\n return path.join(projectDir, '.tank', 'skills', skillName);\n}\n","import fs from 'node:fs';\nimport path from 'node:path';\n\nimport { LEGACY_LOCKFILE_FILENAME, LOCKFILE_FILENAME, type SkillsLock } from '@internals/schemas';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { z } from 'zod';\n\nexport function registerVerifySkillsTool(server: McpServer): void {\n server.tool(\n 'verify-skills',\n 'Verify that installed skills match their lockfile entries. Checks that skill directories exist and are not empty.',\n {\n name: z.string().optional().describe('Specific skill name to verify (verifies all if omitted)'),\n directory: z.string().optional().describe('Project directory (defaults to current working directory)')\n },\n async ({ name, directory }) => {\n const dir = directory ? path.resolve(directory) : process.cwd();\n\n let lockPath = path.join(dir, LOCKFILE_FILENAME);\n if (!fs.existsSync(lockPath)) {\n lockPath = path.join(dir, LEGACY_LOCKFILE_FILENAME);\n }\n if (!fs.existsSync(lockPath)) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `No ${LOCKFILE_FILENAME} found. Run \"install-skill\" to install skills and generate a lockfile.`\n }\n ],\n isError: true\n };\n }\n\n let lock: SkillsLock;\n try {\n const raw = fs.readFileSync(lockPath, 'utf-8');\n lock = JSON.parse(raw) as SkillsLock;\n } catch {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Failed to parse ${path.basename(lockPath)}. The file may be corrupted.`\n }\n ],\n isError: true\n };\n }\n\n let entries = Object.entries(lock.skills);\n\n if (entries.length === 0) {\n return {\n content: [\n {\n type: 'text' as const,\n text: 'No skills to verify. The lockfile is empty.'\n }\n ]\n };\n }\n\n if (name) {\n entries = entries.filter(([key]) => {\n const lastAt = key.lastIndexOf('@');\n if (lastAt <= 0) return false;\n return key.slice(0, lastAt) === name;\n });\n\n if (entries.length === 0) {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Skill \"${name}\" not found in lockfile.`\n }\n ],\n isError: true\n };\n }\n }\n\n const results: Array<{ key: string; status: 'PASS' | 'FAIL' | 'MISSING'; detail: string }> = [];\n\n for (const [key, entry] of entries) {\n const skillName = parseLockKey(key);\n const skillDir = getExtractDir(dir, skillName);\n\n if (!fs.existsSync(skillDir)) {\n results.push({\n key,\n status: 'MISSING',\n detail: `Directory missing at ${skillDir}. Reinstall with \"install-skill\".`\n });\n continue;\n }\n\n const contents = fs.readdirSync(skillDir);\n if (contents.length === 0) {\n results.push({\n key,\n status: 'FAIL',\n detail: `Directory exists but is empty. Expected integrity: ${entry.integrity}. SHA-512 mismatch detected.`\n });\n continue;\n }\n\n results.push({\n key,\n status: 'PASS',\n detail: `Verified (integrity: ${entry.integrity})`\n });\n }\n\n const passing = results.filter((r) => r.status === 'PASS');\n const failing = results.filter((r) => r.status !== 'PASS');\n\n const lines: string[] = [];\n for (const r of results) {\n lines.push(`${r.status} ${r.key}: ${r.detail}`);\n }\n\n if (failing.length > 0) {\n lines.push('');\n lines.push(`Verification failed: ${failing.length} issue(s) found, ${passing.length} passed.`);\n return {\n content: [{ type: 'text' as const, text: lines.join('\\n') }],\n isError: true\n };\n }\n\n lines.push('');\n lines.push(`All ${passing.length} skill(s) passed verification.`);\n return {\n content: [{ type: 'text' as const, text: lines.join('\\n') }]\n };\n }\n );\n}\n\nfunction parseLockKey(key: string): string {\n const lastAt = key.lastIndexOf('@');\n if (lastAt <= 0) return key;\n return key.slice(0, lastAt);\n}\n\nfunction getExtractDir(projectDir: string, skillName: string): string {\n if (skillName.startsWith('@')) {\n const [scope, name] = skillName.split('/');\n return path.join(projectDir, '.tank', 'skills', scope, name);\n }\n return path.join(projectDir, '.tank', 'skills', skillName);\n}\n","import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\n\nimport { TankApiClient } from '~/lib/api-client.js';\n\nexport function registerWhoamiTool(server: McpServer): void {\n server.tool('whoami', 'Show the authenticated Tank user for the current local session.', {}, async () => {\n const client = new TankApiClient();\n\n if (!client.isAuthenticated) {\n return {\n content: [{ type: 'text' as const, text: 'Not logged in. Use the login tool to authenticate.' }]\n };\n }\n\n const authCheck = await client.verifyAuth();\n\n if (authCheck.valid) {\n const name = authCheck.user.name ?? 'unknown';\n const email = authCheck.user.email ?? 'unknown';\n return {\n content: [{ type: 'text' as const, text: `Logged in as ${name}\\nEmail: ${email}` }]\n };\n }\n\n if (authCheck.reason === 'network-error') {\n return {\n content: [\n {\n type: 'text' as const,\n text: `Failed to connect to the registry. Check your network connection.\\nError: ${authCheck.error ?? 'unknown'}`\n }\n ],\n isError: true\n };\n }\n\n return {\n content: [{ type: 'text' as const, text: 'Session expired or invalid. Use the login tool to re-authenticate.' }]\n };\n });\n}\n","#!/usr/bin/env node\n\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';\n\nimport { registerAuditSkillTool } from '~/tools/audit-skill.js';\nimport { registerDoctorTool } from '~/tools/doctor.js';\nimport { registerInitSkillTool } from '~/tools/init-skill.js';\nimport { registerInstallSkillTool } from '~/tools/install-skill.js';\nimport { registerLinkSkillTool } from '~/tools/link-skill.js';\n// Import tools\nimport { registerLoginTool } from '~/tools/login.js';\nimport { registerLogoutTool } from '~/tools/logout.js';\nimport { registerPublishSkillTool } from '~/tools/publish-skill.js';\nimport { registerRemoveSkillTool } from '~/tools/remove-skill.js';\nimport { registerScanSkillTool } from '~/tools/scan-skill.js';\nimport { registerSearchSkillsTool } from '~/tools/search-skills.js';\nimport { registerSkillInfoTool } from '~/tools/skill-info.js';\nimport { registerSkillPermissionsTool } from '~/tools/skill-permissions.js';\nimport { registerUnlinkSkillTool } from '~/tools/unlink-skill.js';\nimport { registerUpdateSkillTool } from '~/tools/update-skill.js';\nimport { registerVerifySkillsTool } from '~/tools/verify-skills.js';\nimport { registerWhoamiTool } from '~/tools/whoami.js';\n\n// Create MCP server instance\nconst server = new McpServer({\n name: 'tank',\n version: '0.1.0'\n});\n\n// Register all tools\nregisterLoginTool(server);\nregisterSearchSkillsTool(server);\nregisterSkillInfoTool(server);\nregisterScanSkillTool(server);\nregisterPublishSkillTool(server);\nregisterLogoutTool(server);\nregisterWhoamiTool(server);\nregisterInitSkillTool(server);\nregisterRemoveSkillTool(server);\nregisterVerifySkillsTool(server);\nregisterLinkSkillTool(server);\nregisterUnlinkSkillTool(server);\nregisterDoctorTool(server);\nregisterSkillPermissionsTool(server);\nregisterInstallSkillTool(server);\nregisterUpdateSkillTool(server);\nregisterAuditSkillTool(server);\n\n// Start stdio transport\nasync function main() {\n const transport = new StdioServerTransport();\n await server.connect(transport);\n}\n\nmain().catch((_error) => {\n process.exit(1);\n});\n"],"mappings":";;;;;;;;;;;;AAcqB,QAAQ,IAAI;AAOjC,MAAM,oBAAoB;AAC1B,MAAM,2BAA2B;AACjC,MAAM,oBAAoB;AAC1B,MAAM,2BAA2B;AAGjC,MAAMC,uBAAqB,EAAE,KAAK;CACjC;CACA;CACA;CACA,CAAC;AACF,MAAMC,8BAA4B,EAAE,OAAO;CAC1C,aAAaD;CACb,MAAMA;CACN,MAAMA;CACN,OAAOA;CACP,MAAMA;CACN,UAAUA;CACV,QAAQA;CACR,CAAC,CAAC,QAAQ;AAGX,MAAME,6BAA2B,EAAE,OAAO;CACzC,OAAO,EAAE,KAAK,CAAC,YAAY,UAAU,CAAC;CACtC,UAAU,EAAE,QAAQ;CACpB,SAAS,EAAE,QAAQ;CACnB,CAAC,CAAC,QAAQ;AACX,MAAM,kBAAkB,EAAE,OAAO;CAChC,MAAM,EAAE,QAAQ,CAAC,IAAI,EAAE;CACvB,SAAS,EAAE,QAAQ;CACnB,CAAC,CAAC,QAAQ;AACkB,EAAE,OAAO;CACrC,OAAO,EAAE,MAAM,gBAAgB;CAC/B,UAAU,EAAE,MAAMA,2BAAyB;CAC3C,CAAC,CAAC,QAAQ;AACuB,EAAE,OAAO;CAC1C,MAAM,EAAE,QAAQ,CAAC,IAAI,GAAG,iCAAiC;CACzD,gBAAgB,EAAE,QAAQ,CAAC,IAAI,GAAG,oCAAoC;CACtE,cAAcD;CACd,CAAC,CAAC,QAAQ;AAGY,EAAE,KAAK;CAC7B;CACA;C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