@cortexkit/pi-magic-context 0.39.0 → 0.40.0

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.
@@ -8283,11 +8283,380 @@ function migrateMagicContextConfigLocations(directory, logger) {
8283
8283
  return warnings;
8284
8284
  }
8285
8285
 
8286
+ // ../plugin/src/shared/redaction.ts
8287
+ import { homedir as homedir2, userInfo } from "node:os";
8288
+ function escapeRegex(value) {
8289
+ return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
8290
+ }
8291
+ var SECRET_WORDS = [
8292
+ "key",
8293
+ "token",
8294
+ "secret",
8295
+ "password",
8296
+ "auth",
8297
+ "authorization",
8298
+ "bearer",
8299
+ "credential"
8300
+ ];
8301
+ var SECRET_SEGMENT_PATTERN = new RegExp(`^(?:${SECRET_WORDS.map((w) => `${w}s?`).join("|")})$`, "i");
8302
+ var TRAILING_DESCRIPTORS = new Set(["id", "ids", "value", "values", "header", "headers"]);
8303
+ function redactionTypeForKey(key) {
8304
+ const normalized = key.trim().toLowerCase().replace(/[^a-z0-9_.-]+/g, "_");
8305
+ const suffix = normalized.split(".").filter(Boolean).at(-1) ?? normalized;
8306
+ return suffix || "secret";
8307
+ }
8308
+ function isNonSecretScalarValue(value) {
8309
+ const v = value.trim();
8310
+ if (v === "true" || v === "false" || v === "null" || v === "undefined")
8311
+ return true;
8312
+ return /^[+-]?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/.test(v);
8313
+ }
8314
+ var SECRET_QUALIFIERS = new Set([
8315
+ "api",
8316
+ "access",
8317
+ "private",
8318
+ "client",
8319
+ "auth",
8320
+ "authorization",
8321
+ "secret",
8322
+ "bearer",
8323
+ "session",
8324
+ "refresh",
8325
+ "service",
8326
+ "x",
8327
+ "openai",
8328
+ "anthropic",
8329
+ "google",
8330
+ "github",
8331
+ "huggingface",
8332
+ "aws",
8333
+ "azure"
8334
+ ]);
8335
+ function sanitizePathString(value) {
8336
+ const home = homedir2();
8337
+ const username = userInfo().username;
8338
+ let sanitized = value;
8339
+ if (home) {
8340
+ sanitized = sanitized.replace(new RegExp(escapeRegex(home), "g"), "~");
8341
+ }
8342
+ sanitized = sanitized.replace(/\/Users\/[^/]+\//g, "/Users/<USER>/");
8343
+ sanitized = sanitized.replace(/\/home\/[^/]+\//g, "/home/<USER>/");
8344
+ sanitized = sanitized.replace(/C:\\Users\\[^\\]+\\/g, "C:\\Users\\<USER>\\");
8345
+ if (username) {
8346
+ sanitized = sanitized.replace(new RegExp(escapeRegex(username), "g"), "<USER>");
8347
+ }
8348
+ return sanitized;
8349
+ }
8350
+ var SECRET_TEXT_PATTERNS = [
8351
+ {
8352
+ pattern: /\bsk-ant-(?:api03-)?[A-Za-z0-9_-]{32,}/g,
8353
+ replacement: "<ANTHROPIC_API_KEY_REDACTED>"
8354
+ },
8355
+ {
8356
+ pattern: /\bsk-(?:proj-)?[A-Za-z0-9_-]{32,}/g,
8357
+ replacement: "<OPENAI_API_KEY_REDACTED>"
8358
+ },
8359
+ {
8360
+ pattern: /\bgithub_pat_[A-Za-z0-9_]{20,}/g,
8361
+ replacement: "<GITHUB_PAT_REDACTED>"
8362
+ },
8363
+ {
8364
+ pattern: /\b(?:gh[opsu]|ghr)_[A-Za-z0-9]{30,}/g,
8365
+ replacement: "<GITHUB_TOKEN_REDACTED>"
8366
+ },
8367
+ {
8368
+ pattern: /\bhf_[A-Za-z0-9]{30,}/g,
8369
+ replacement: "<HUGGINGFACE_TOKEN_REDACTED>"
8370
+ },
8371
+ {
8372
+ pattern: /\b(?:AKIA|ASIA)[0-9A-Z]{16}\b/g,
8373
+ replacement: "<AWS_ACCESS_KEY_ID_REDACTED>"
8374
+ },
8375
+ {
8376
+ pattern: /\bxox[abprsuvc]-[A-Za-z0-9-]{10,}/g,
8377
+ replacement: "<SLACK_TOKEN_REDACTED>"
8378
+ },
8379
+ {
8380
+ pattern: /\bAIza[A-Za-z0-9_-]{35}\b/g,
8381
+ replacement: "<GOOGLE_API_KEY_REDACTED>"
8382
+ },
8383
+ {
8384
+ pattern: /\b(Authorization\s*:\s*Bearer\s+)([A-Za-z0-9._~+/=-]{8,})/gi,
8385
+ replacement: (_full, prefix) => `${prefix}<REDACTED:bearer>`
8386
+ },
8387
+ {
8388
+ pattern: /\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g,
8389
+ replacement: "<JWT_REDACTED>"
8390
+ },
8391
+ {
8392
+ pattern: /(["'])([^"']*(?:key|token|secret|password|auth|bearer|credential)[^"']*)\1(\s*:\s*)(["'])([^"']*)\4/gi,
8393
+ replacement: (full, quote, key, separator, valueQuote, value) => isNonSecretScalarValue(value) ? full : `${quote}${key}${quote}${separator}${valueQuote}<REDACTED:${redactionTypeForKey(key)}>${valueQuote}`
8394
+ },
8395
+ {
8396
+ pattern: /\b([A-Za-z0-9_.-]*(?:key|token|secret|password|auth|bearer|credential)[A-Za-z0-9_.-]*)\s*=\s*([^\s'"`]+)/gi,
8397
+ replacement: (full, key, value) => isNonSecretScalarValue(value) ? full : `${key}=<REDACTED:${redactionTypeForKey(key)}>`
8398
+ }
8399
+ ];
8400
+ function redactSecretText(value) {
8401
+ let redacted = value;
8402
+ for (const { pattern, replacement } of SECRET_TEXT_PATTERNS) {
8403
+ if (typeof replacement === "string") {
8404
+ redacted = redacted.replace(pattern, replacement);
8405
+ } else {
8406
+ redacted = redacted.replace(pattern, replacement);
8407
+ }
8408
+ }
8409
+ return redacted;
8410
+ }
8411
+ function sanitizeDiagnosticText(value) {
8412
+ return redactSecretText(sanitizePathString(value));
8413
+ }
8414
+ var SHAREABILITY_SENSITIVE_PATTERNS = [
8415
+ /\bC:\/Users\/[^/\s]+/i,
8416
+ /(?:^|\s)~\/[^\s]+/,
8417
+ /\b(?:api[_-]?key|secret|token|password|passwd|pwd|client[_-]?secret|access[_-]?key)\b\s*[:=]\s*\S+/i,
8418
+ /\b(?:localhost|127\.0\.0\.1|0\.0\.0\.0|\[::1\])(?::\d+)?\b/i,
8419
+ /\b(?:10|127)\.\d{1,3}\.\d{1,3}\.\d{1,3}\b/,
8420
+ /\b192\.168\.\d{1,3}\.\d{1,3}\b/,
8421
+ /\b172\.(?:1[6-9]|2\d|3[01])\.\d{1,3}\.\d{1,3}\b/
8422
+ ];
8423
+ function hasShareabilitySensitiveText(text) {
8424
+ try {
8425
+ if (sanitizeDiagnosticText(text) !== text)
8426
+ return true;
8427
+ return SHAREABILITY_SENSITIVE_PATTERNS.some((pattern) => pattern.test(text));
8428
+ } catch {
8429
+ return true;
8430
+ }
8431
+ }
8432
+
8433
+ // ../plugin/src/features/magic-context/fail-closed-block.ts
8434
+ var FAIL_CLOSED_DOCTOR_COMMAND = "npx @cortexkit/magic-context@latest doctor";
8435
+ var FAIL_CLOSED_REPROBE_EVERY_N = 5;
8436
+ function attachFailClosedBlockingProcessEvidence(process2, evidence) {
8437
+ Object.defineProperties(process2, {
8438
+ startTime: { configurable: true, value: evidence.startTime },
8439
+ commandLine: { configurable: true, value: evidence.commandLine }
8440
+ });
8441
+ return process2;
8442
+ }
8443
+
8444
+ class FailClosedBlockingError extends Error {
8445
+ code = "FAIL_CLOSED_BLOCKING";
8446
+ reason;
8447
+ constructor(message, reason, options) {
8448
+ super(message, options);
8449
+ this.name = "FailClosedBlockingError";
8450
+ this.reason = reason;
8451
+ }
8452
+ }
8453
+ var OPENCODE_INTERNAL_AGENT_NAMES = new Set(["title", "summary", "compaction"]);
8454
+ function isMagicContextHiddenAgentName(agent) {
8455
+ if (agent === "sidekick" || agent === "smart-note-compiler" || agent.startsWith("smart-note-")) {
8456
+ return true;
8457
+ }
8458
+ if (agent === "historian" || agent.startsWith("historian-"))
8459
+ return true;
8460
+ if (agent === "dreamer" || agent.startsWith("dreamer-"))
8461
+ return true;
8462
+ return false;
8463
+ }
8464
+ var MAX_FORMATTED_BLOCKING_PROCESSES = 8;
8465
+ var MAX_FORMATTED_COMMAND_LINE_LENGTH = 80;
8466
+ function normalizeFailClosedProcessKind(process2) {
8467
+ switch (process2.kind) {
8468
+ case "OpenCode server":
8469
+ case "OpenCode instance (TUI/CLI)":
8470
+ case "Pi":
8471
+ case "process":
8472
+ return process2.kind;
8473
+ }
8474
+ switch (process2.harness?.trim().toLowerCase()) {
8475
+ case "opencode server":
8476
+ return "OpenCode server";
8477
+ case "opencode instance (tui/cli)":
8478
+ case "opencode instance":
8479
+ return "OpenCode instance (TUI/CLI)";
8480
+ case "pi":
8481
+ case "pi harness":
8482
+ case "omp":
8483
+ return "Pi";
8484
+ default:
8485
+ return "process";
8486
+ }
8487
+ }
8488
+ function formatFailClosedProcessStartTime(startTime) {
8489
+ if (!Number.isFinite(startTime) || startTime <= 0)
8490
+ return "unverified";
8491
+ try {
8492
+ const parts = new Intl.DateTimeFormat("en-US", {
8493
+ day: "numeric",
8494
+ hour: "2-digit",
8495
+ minute: "2-digit",
8496
+ month: "short",
8497
+ hour12: false
8498
+ }).formatToParts(new Date(startTime));
8499
+ const values = Object.fromEntries(parts.map(({ type, value }) => [type, value]));
8500
+ if (!values.month || !values.day || !values.hour || !values.minute)
8501
+ return "unverified";
8502
+ return `${values.month} ${values.day} ${values.hour}:${values.minute}`;
8503
+ } catch {
8504
+ return "unverified";
8505
+ }
8506
+ }
8507
+ function formatFailClosedCommandLine(commandLine) {
8508
+ if (typeof commandLine !== "string" || commandLine.trim().length === 0)
8509
+ return "unverified";
8510
+ try {
8511
+ const normalized = commandLine.replaceAll("\x00", " ").replace(/\s+/g, " ").trim();
8512
+ if (normalized.length === 0)
8513
+ return "unverified";
8514
+ const sanitized = sanitizeDiagnosticText(normalized).trim();
8515
+ if (sanitized.length === 0)
8516
+ return "unverified";
8517
+ return sanitized.length > MAX_FORMATTED_COMMAND_LINE_LENGTH ? `${sanitized.slice(0, MAX_FORMATTED_COMMAND_LINE_LENGTH - 3)}...` : sanitized;
8518
+ } catch {
8519
+ return "unverified";
8520
+ }
8521
+ }
8522
+ function formatFailClosedBlockingProcesses(processes) {
8523
+ const uniqueProcesses = new Map;
8524
+ for (const process2 of processes) {
8525
+ if (!Number.isInteger(process2.pid) || process2.pid <= 0)
8526
+ continue;
8527
+ const candidate = {
8528
+ kind: normalizeFailClosedProcessKind(process2),
8529
+ pid: process2.pid,
8530
+ startTime: process2.startTime,
8531
+ commandLine: process2.commandLine
8532
+ };
8533
+ const previous = uniqueProcesses.get(process2.pid);
8534
+ if (!previous || previous.kind === "process" && candidate.kind !== "process") {
8535
+ uniqueProcesses.set(process2.pid, candidate);
8536
+ } else {
8537
+ uniqueProcesses.set(process2.pid, {
8538
+ ...previous,
8539
+ startTime: previous.startTime ?? candidate.startTime,
8540
+ commandLine: previous.commandLine ?? candidate.commandLine
8541
+ });
8542
+ }
8543
+ }
8544
+ const entries = [...uniqueProcesses.values()];
8545
+ const visible = entries.slice(0, MAX_FORMATTED_BLOCKING_PROCESSES);
8546
+ const rendered = visible.map(({ kind, pid }) => `${kind} (PID ${pid})`);
8547
+ const omitted = entries.length - visible.length;
8548
+ if (omitted > 0)
8549
+ rendered.push(`${omitted} more blocking process(es)`);
8550
+ if (rendered.length === 0)
8551
+ return "a live process";
8552
+ const summary = rendered.length === 1 ? rendered[0] : `${rendered.slice(0, -1).join(", ")}, and ${rendered.at(-1)}`;
8553
+ const evidence = entries.map(({ kind, pid, startTime, commandLine }) => `- PID ${pid}: ${kind}, started ${formatFailClosedProcessStartTime(startTime)}, cmd: ${formatFailClosedCommandLine(commandLine)}`).join(`
8554
+ `);
8555
+ return `${summary}
8556
+ Blocking process evidence:
8557
+ ${evidence}`;
8558
+ }
8559
+ function formatFailClosedBlockingMessage(reason) {
8560
+ if (reason.kind === "migration_guard") {
8561
+ if (reason.unreadableFile) {
8562
+ const arm = reason.unreadableArm ?? "io";
8563
+ const recovery = arm === "io" ? `If none of these processes are running, it is safe to delete ${reason.unreadableFile} and retry.` : `The file may be a recent incomplete write; retry after the file is older than the ten-minute grace window, or stop the relevant process before deleting it.`;
8564
+ return [
8565
+ `Magic Context cannot migrate the shared database because RPC discovery file ${reason.unreadableFile} is uncertain (${arm} arm), so the absence of a live process cannot be proven.`,
8566
+ recovery,
8567
+ `Recovery: ${FAIL_CLOSED_DOCTOR_COMMAND}`
8568
+ ].join(" ");
8569
+ }
8570
+ return [
8571
+ `Magic Context cannot migrate the shared database because ${formatFailClosedBlockingProcesses(reason.blockingProcesses)} may be running an older Magic Context build that would fail against the migrated database.`,
8572
+ "Restart the blocking process (it will pick up the new build and migrate on start), or shut it down and retry.",
8573
+ `Recovery: ${FAIL_CLOSED_DOCTOR_COMMAND}`
8574
+ ].join(" ");
8575
+ }
8576
+ if (reason.kind === "schema_fence") {
8577
+ return [
8578
+ `Magic Context cannot operate: this Magic Context build is older than the database; upgrade/restart this harness (upstream migration lane v${reason.persistedVersion}, build supports through v${reason.supportedVersion}).`,
8579
+ `Recovery: ${FAIL_CLOSED_DOCTOR_COMMAND}`
8580
+ ].join(" ");
8581
+ }
8582
+ const cause = reason.cause.trim().length > 0 ? reason.cause.trim() : "unknown storage error";
8583
+ return [
8584
+ `Magic Context cannot operate: persistent storage failed (${cause}).`,
8585
+ "The plugin will not silently degrade to native compaction while enabled.",
8586
+ `Recovery: ${FAIL_CLOSED_DOCTOR_COMMAND}`
8587
+ ].join(" ");
8588
+ }
8589
+ function createFailClosedBlockingError(reason, options) {
8590
+ return new FailClosedBlockingError(formatFailClosedBlockingMessage(reason), reason, options);
8591
+ }
8592
+ function isFailClosedBlockingError(error) {
8593
+ return error instanceof FailClosedBlockingError || typeof error === "object" && error !== null && error.name === "FailClosedBlockingError" && error.code === "FAIL_CLOSED_BLOCKING";
8594
+ }
8595
+ function shouldBypassFailClosedBlock(input) {
8596
+ if (input.isPiSubagentEnv === true)
8597
+ return true;
8598
+ if (input.isInternalChildSession === true)
8599
+ return true;
8600
+ const agent = typeof input.agent === "string" ? input.agent.trim() : "";
8601
+ if (agent.length === 0)
8602
+ return false;
8603
+ if (OPENCODE_INTERNAL_AGENT_NAMES.has(agent))
8604
+ return true;
8605
+ if (isMagicContextHiddenAgentName(agent))
8606
+ return true;
8607
+ return false;
8608
+ }
8609
+ function createFailClosedController(options) {
8610
+ const reprobeEveryN = Math.max(1, options?.reprobeEveryN ?? FAIL_CLOSED_REPROBE_EVERY_N);
8611
+ let reason = null;
8612
+ let blockedPassCount = 0;
8613
+ return {
8614
+ arm(next) {
8615
+ reason = next;
8616
+ blockedPassCount = 0;
8617
+ },
8618
+ clear() {
8619
+ reason = null;
8620
+ blockedPassCount = 0;
8621
+ },
8622
+ isArmed() {
8623
+ return reason !== null;
8624
+ },
8625
+ getReason() {
8626
+ return reason;
8627
+ },
8628
+ async enforce(input) {
8629
+ if (!reason)
8630
+ return;
8631
+ if (!input.blockingEnabled)
8632
+ return;
8633
+ if (input.exempt)
8634
+ return;
8635
+ blockedPassCount += 1;
8636
+ const shouldReprobe = typeof input.tryReopen === "function" && (blockedPassCount === 1 || blockedPassCount % reprobeEveryN === 0);
8637
+ if (shouldReprobe) {
8638
+ try {
8639
+ const healed = await input.tryReopen?.();
8640
+ if (healed) {
8641
+ reason = null;
8642
+ blockedPassCount = 0;
8643
+ return;
8644
+ }
8645
+ } catch {}
8646
+ }
8647
+ const blockedReason = reason;
8648
+ if (!blockedReason)
8649
+ return;
8650
+ throw createFailClosedBlockingError(blockedReason);
8651
+ }
8652
+ };
8653
+ }
8654
+
8286
8655
  // ../plugin/src/features/magic-context/memory/project-identity.ts
8287
8656
  import { execFileSync } from "node:child_process";
8288
8657
  import { createHash } from "node:crypto";
8289
8658
  import { existsSync as existsSync2, realpathSync, statSync as statSync2 } from "node:fs";
8290
- import { homedir as homedir2 } from "node:os";
8659
+ import { homedir as homedir3 } from "node:os";
8291
8660
  import path from "node:path";
8292
8661
  var GIT_TIMEOUT_MS = 5000;
8293
8662
  var TRANSIENT_FAILURE_COOLDOWN_MS = 5 * 60 * 1000;
@@ -8301,7 +8670,7 @@ var dubiousOwnershipLoggedDirectories = new Set;
8301
8670
  var dubiousOwnershipWarnedDirectories = new Set;
8302
8671
  var transientGitIdentityReuseLoggedDirectories = new Set;
8303
8672
  var execFileSyncForIdentity = execFileSync;
8304
- var userHomeDirectoryForIdentity = () => homedir2();
8673
+ var userHomeDirectoryForIdentity = () => homedir3();
8305
8674
  var nowMs = () => Date.now();
8306
8675
 
8307
8676
  class ProjectIdentityError extends Error {
@@ -8657,7 +9026,7 @@ function scheduleAfterBootQuiet(task, additionalDelayMs = 0) {
8657
9026
  // ../plugin/src/hooks/magic-context/read-session-formatting.ts
8658
9027
  import { existsSync as existsSync3, readFileSync as readFileSync2, realpathSync as realpathSync2 } from "node:fs";
8659
9028
  import { createRequire } from "node:module";
8660
- import { homedir as homedir3 } from "node:os";
9029
+ import { homedir as homedir4 } from "node:os";
8661
9030
  import { dirname as dirname2, join as join2, resolve } from "node:path";
8662
9031
  import { pathToFileURL } from "node:url";
8663
9032
 
@@ -8774,7 +9143,7 @@ var tokenizerLoadPromise;
8774
9143
  var tokenizerWarningSent = false;
8775
9144
  function tokenizerPackageRoots() {
8776
9145
  const cwd = process.cwd();
8777
- const openCodeCache = join2(process.env.XDG_CACHE_HOME ?? join2(homedir3(), ".cache"), "opencode");
9146
+ const openCodeCache = join2(process.env.XDG_CACHE_HOME ?? join2(homedir4(), ".cache"), "opencode");
8778
9147
  const roots = [cwd, openCodeCache];
8779
9148
  const candidates = [];
8780
9149
  for (const root of roots) {
@@ -9173,6 +9542,17 @@ function readPsProcessStartTime(pid) {
9173
9542
  return null;
9174
9543
  }
9175
9544
  }
9545
+ function readProcessStartTime(pid) {
9546
+ if (!Number.isInteger(pid) || pid <= 0)
9547
+ return null;
9548
+ return rpcIdentityPlatform === "linux" ? readLinuxProcessStartTime(pid) : rpcIdentityPlatform === "win32" ? null : readPsProcessStartTime(pid);
9549
+ }
9550
+ function readProcessProbeEvidence(pid) {
9551
+ return {
9552
+ startTime: readProcessStartTime(pid),
9553
+ commandLine: readProcessCommand(pid)
9554
+ };
9555
+ }
9176
9556
  function parseCsvLine(line) {
9177
9557
  const fields = [];
9178
9558
  let field = "";
@@ -9305,16 +9685,16 @@ function commandLooksLikeOpenCode(command) {
9305
9685
  const normalized = command.toLowerCase();
9306
9686
  return OPEN_CODE_COMMAND_MARKERS.some((marker) => normalized.includes(marker));
9307
9687
  }
9308
- function isPidIdentityPlausible(record) {
9688
+ function isPidIdentityPlausible(record, evidence) {
9309
9689
  if (!Number.isInteger(record.pid) || record.pid <= 0)
9310
9690
  return "implausible";
9311
9691
  if (Number.isFinite(record.started_at) && record.started_at > 0) {
9312
- const processStartTime = rpcIdentityPlatform === "linux" ? readLinuxProcessStartTime(record.pid) : rpcIdentityPlatform === "win32" ? null : readPsProcessStartTime(record.pid);
9692
+ const processStartTime = evidence ? evidence.startTime : readProcessStartTime(record.pid);
9313
9693
  if (processStartTime === null)
9314
9694
  return "inconclusive";
9315
9695
  return processStartTime <= record.started_at + RPC_IDENTITY_SKEW_TOLERANCE_MS ? "plausible" : "implausible";
9316
9696
  }
9317
- const command = rpcIdentityPlatform === "linux" ? readLinuxProcessCommand(record.pid) : rpcIdentityPlatform === "win32" ? readWindowsProcess(record.pid).command ?? null : readPsProcessCommand(record.pid);
9697
+ const command = evidence ? evidence.commandLine : rpcIdentityPlatform === "linux" ? readLinuxProcessCommand(record.pid) : rpcIdentityPlatform === "win32" ? readWindowsProcess(record.pid).command ?? null : readPsProcessCommand(record.pid);
9318
9698
  if (command === null)
9319
9699
  return "inconclusive";
9320
9700
  return commandLooksLikeOpenCode(command) ? "plausible" : "implausible";
@@ -12929,8 +13309,8 @@ function classifyDiscoveryRecordKind(record) {
12929
13309
  }
12930
13310
  return null;
12931
13311
  }
12932
- function classifyRpcProcess(record) {
12933
- return classifyDiscoveryRecordKind(record) ?? classifyProcessKind(readProcessCommand(record.pid));
13312
+ function classifyRpcProcess(record, commandLine) {
13313
+ return classifyDiscoveryRecordKind(record) ?? classifyProcessKind(commandLine === undefined ? readProcessProbeEvidence(record.pid).commandLine : commandLine);
12934
13314
  }
12935
13315
  function classifyJunkDiscovery(portFile, raw, staleFiles) {
12936
13316
  let mtimeMs;
@@ -13007,18 +13387,23 @@ function inspectRpcServerDiscovery(storageDir) {
13007
13387
  continue;
13008
13388
  }
13009
13389
  const liveness = isPidAlive(record.pid);
13010
- const identity = liveness === "dead" ? "implausible" : isPidIdentityPlausible(record);
13011
- if (liveness === "alive" && identity === "plausible") {
13390
+ if (liveness === "dead") {
13391
+ staleFiles.push(portFile);
13392
+ continue;
13393
+ }
13394
+ const evidence = readProcessProbeEvidence(record.pid);
13395
+ const identity = isPidIdentityPlausible(record, evidence);
13396
+ if (identity === "plausible") {
13012
13397
  pids.add(record.pid);
13013
- const detected = {
13014
- kind: classifyRpcProcess(record),
13398
+ const detected = attachFailClosedBlockingProcessEvidence({
13399
+ kind: classifyRpcProcess(record, evidence.commandLine),
13015
13400
  pid: record.pid
13016
- };
13401
+ }, evidence);
13017
13402
  const previous = processByPid.get(record.pid);
13018
13403
  if (!previous || previous.kind === "process" && detected.kind !== "process") {
13019
13404
  processByPid.set(record.pid, detected);
13020
13405
  }
13021
- } else if (liveness === "dead" || identity === "implausible") {
13406
+ } else if (identity === "implausible") {
13022
13407
  staleFiles.push(portFile);
13023
13408
  } else {
13024
13409
  inconclusivePids.add(record.pid);
@@ -13051,6 +13436,9 @@ function inspectRpcServerDiscovery(storageDir) {
13051
13436
  }
13052
13437
  return { state: "stale", serverPids: [], staleFiles };
13053
13438
  }
13439
+ function createPiBlockingProcess(pid) {
13440
+ return attachFailClosedBlockingProcessEvidence({ kind: "Pi", pid }, readProcessProbeEvidence(pid));
13441
+ }
13054
13442
  function formatInconclusiveOpenCodeMigrationWarning(dbPath, pids) {
13055
13443
  return `[magic-context] storage warning: continuing migration for ${dbPath}; OpenCode server PID ${pids.join(", ")} was not confirmed because its liveness or identity check could not run. This commonly means an OS sandbox denied kill(0) or ps. No live OpenCode server was confirmed.`;
13056
13444
  }
@@ -13092,10 +13480,7 @@ function enforceMigrationOnOpenGuard(db, dbPath, dbDir, latestSupportedVersion)
13092
13480
  const piDiscovery = inspectLivePiProcesses();
13093
13481
  const piPids = migrationBlockingPiPids(dbPath, discovery, piDiscovery.processIds);
13094
13482
  const serverProcesses = discovery.serverProcesses ?? (discovery.state === "live" ? discovery.serverPids.map((pid) => ({ kind: "process", pid })) : []);
13095
- const blockingProcesses = [
13096
- ...serverProcesses,
13097
- ...piPids.map((pid) => ({ kind: "Pi", pid }))
13098
- ];
13483
+ const blockingProcesses = [...serverProcesses, ...piPids.map(createPiBlockingProcess)];
13099
13484
  if ((discovery.state === "absent" || discovery.state === "stale" || discovery.state === "inconclusive") && piPids.length === 0) {
13100
13485
  lastMigrationOnOpenRefusal = null;
13101
13486
  logInconclusiveMigrationProbes(dbPath, discovery, piDiscovery.state);
@@ -21398,7 +21783,7 @@ function migrateLegacyExperimental(rawConfig, warnings) {
21398
21783
  }
21399
21784
 
21400
21785
  // ../plugin/src/config/schema/magic-context.ts
21401
- import { homedir as homedir4 } from "node:os";
21786
+ import { homedir as homedir5 } from "node:os";
21402
21787
 
21403
21788
  // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/external.js
21404
21789
  var exports_external = {};
@@ -22025,7 +22410,7 @@ __export(exports_util, {
22025
22410
  createTransparentProxy: () => createTransparentProxy,
22026
22411
  defineLazy: () => defineLazy,
22027
22412
  esc: () => esc,
22028
- escapeRegex: () => escapeRegex,
22413
+ escapeRegex: () => escapeRegex2,
22029
22414
  explicitlyAborted: () => explicitlyAborted,
22030
22415
  extend: () => extend,
22031
22416
  finalizeIssue: () => finalizeIssue,
@@ -22302,7 +22687,7 @@ var primitiveTypes = /* @__PURE__ */ new Set([
22302
22687
  "symbol",
22303
22688
  "undefined"
22304
22689
  ]);
22305
- function escapeRegex(str) {
22690
+ function escapeRegex2(str) {
22306
22691
  return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
22307
22692
  }
22308
22693
  function clone(inst, def, params) {
@@ -23012,7 +23397,7 @@ function emoji() {
23012
23397
  var 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])$/;
23013
23398
  var 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}|:))$/;
23014
23399
  var mac = (delimiter) => {
23015
- const escapedDelim = escapeRegex(delimiter ?? ":");
23400
+ const escapedDelim = escapeRegex2(delimiter ?? ":");
23016
23401
  return new RegExp(`^(?:[0-9A-F]{2}${escapedDelim}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${escapedDelim}){5}[0-9a-f]{2}$`);
23017
23402
  };
23018
23403
  var 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])$/;
@@ -23513,7 +23898,7 @@ var $ZodCheckUpperCase = /* @__PURE__ */ $constructor("$ZodCheckUpperCase", (ins
23513
23898
  });
23514
23899
  var $ZodCheckIncludes = /* @__PURE__ */ $constructor("$ZodCheckIncludes", (inst, def) => {
23515
23900
  $ZodCheck.init(inst, def);
23516
- const escapedRegex = escapeRegex(def.includes);
23901
+ const escapedRegex = escapeRegex2(def.includes);
23517
23902
  const pattern = new RegExp(typeof def.position === "number" ? `^.{${def.position}}${escapedRegex}` : escapedRegex);
23518
23903
  def.pattern = pattern;
23519
23904
  inst._zod.onattach.push((inst2) => {
@@ -23537,7 +23922,7 @@ var $ZodCheckIncludes = /* @__PURE__ */ $constructor("$ZodCheckIncludes", (inst,
23537
23922
  });
23538
23923
  var $ZodCheckStartsWith = /* @__PURE__ */ $constructor("$ZodCheckStartsWith", (inst, def) => {
23539
23924
  $ZodCheck.init(inst, def);
23540
- const pattern = new RegExp(`^${escapeRegex(def.prefix)}.*`);
23925
+ const pattern = new RegExp(`^${escapeRegex2(def.prefix)}.*`);
23541
23926
  def.pattern ?? (def.pattern = pattern);
23542
23927
  inst._zod.onattach.push((inst2) => {
23543
23928
  const bag = inst2._zod.bag;
@@ -23560,7 +23945,7 @@ var $ZodCheckStartsWith = /* @__PURE__ */ $constructor("$ZodCheckStartsWith", (i
23560
23945
  });
23561
23946
  var $ZodCheckEndsWith = /* @__PURE__ */ $constructor("$ZodCheckEndsWith", (inst, def) => {
23562
23947
  $ZodCheck.init(inst, def);
23563
- const pattern = new RegExp(`.*${escapeRegex(def.suffix)}$`);
23948
+ const pattern = new RegExp(`.*${escapeRegex2(def.suffix)}$`);
23564
23949
  def.pattern ?? (def.pattern = pattern);
23565
23950
  inst._zod.onattach.push((inst2) => {
23566
23951
  const bag = inst2._zod.bag;
@@ -25207,7 +25592,7 @@ var $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
25207
25592
  const values = getEnumValues(def.entries);
25208
25593
  const valuesSet = new Set(values);
25209
25594
  inst._zod.values = valuesSet;
25210
- inst._zod.pattern = new RegExp(`^(${values.filter((k) => propertyKeyTypes.has(typeof k)).map((o) => typeof o === "string" ? escapeRegex(o) : o.toString()).join("|")})$`);
25595
+ inst._zod.pattern = new RegExp(`^(${values.filter((k) => propertyKeyTypes.has(typeof k)).map((o) => typeof o === "string" ? escapeRegex2(o) : o.toString()).join("|")})$`);
25211
25596
  inst._zod.parse = (payload, _ctx) => {
25212
25597
  const input = payload.value;
25213
25598
  if (valuesSet.has(input)) {
@@ -25229,7 +25614,7 @@ var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
25229
25614
  }
25230
25615
  const values = new Set(def.values);
25231
25616
  inst._zod.values = values;
25232
- inst._zod.pattern = new RegExp(`^(${def.values.map((o) => typeof o === "string" ? escapeRegex(o) : o ? escapeRegex(o.toString()) : String(o)).join("|")})$`);
25617
+ inst._zod.pattern = new RegExp(`^(${def.values.map((o) => typeof o === "string" ? escapeRegex2(o) : o ? escapeRegex2(o.toString()) : String(o)).join("|")})$`);
25233
25618
  inst._zod.parse = (payload, _ctx) => {
25234
25619
  const input = payload.value;
25235
25620
  if (values.has(input)) {
@@ -25594,7 +25979,7 @@ var $ZodTemplateLiteral = /* @__PURE__ */ $constructor("$ZodTemplateLiteral", (i
25594
25979
  const end = source.endsWith("$") ? source.length - 1 : source.length;
25595
25980
  regexParts.push(source.slice(start, end));
25596
25981
  } else if (part === null || primitiveTypes.has(typeof part)) {
25597
- regexParts.push(escapeRegex(`${part}`));
25982
+ regexParts.push(escapeRegex2(`${part}`));
25598
25983
  } else {
25599
25984
  throw new Error(`Invalid template literal part: ${part}`);
25600
25985
  }
@@ -36052,6 +36437,37 @@ var DreamerPiHarnessBlockSchema = exports_external.object({
36052
36437
  thinking_level: PiThinkingLevelSchema.describe("Pi thinking level for the primary entry when it declares none. Fallback entries declare thinking levels per-entry."),
36053
36438
  tasks: exports_external.record(exports_external.string(), PiTaskExecutionSchema).optional().describe("Pi task execution overrides. Each named task accepts only model, fallback_models, thinking_level, and timeout_minutes.")
36054
36439
  }).strict().describe("Strict Pi dreamer model-resolution block. It accepts no OpenCode vocabulary.");
36440
+ var ProfileOpenCodeModelBlockSchema = exports_external.object({
36441
+ model: OcEntrySchema.optional().describe("Primary OpenCode model entry."),
36442
+ fallback_models: exports_external.array(OcEntrySchema).optional().describe("Ordered fallback OpenCode model entries."),
36443
+ variant: exports_external.string().optional().describe("OpenCode reasoning variant for the primary model entry.")
36444
+ }).strict().describe("Strict profile-only OpenCode model-selection block.");
36445
+ var ProfilePiModelBlockSchema = exports_external.object({
36446
+ model: PiEntrySchema.optional().describe("Primary Pi model entry."),
36447
+ fallback_models: exports_external.array(PiEntrySchema).optional().describe("Ordered fallback Pi model entries."),
36448
+ thinking_level: PiThinkingLevelSchema.describe("Pi thinking level for the primary model entry.")
36449
+ }).strict().describe("Strict profile-only Pi model-selection block.");
36450
+ var ProfileHistorianSchema = exports_external.object({
36451
+ opencode: ProfileOpenCodeModelBlockSchema.optional(),
36452
+ pi: ProfilePiModelBlockSchema.optional()
36453
+ }).strict();
36454
+ var ProfileDreamerSchema = exports_external.object({
36455
+ opencode: ProfileOpenCodeModelBlockSchema.optional(),
36456
+ pi: ProfilePiModelBlockSchema.optional()
36457
+ }).strict();
36458
+ var ProfileSidekickSchema = AgentOverrideConfigSchema.pick({
36459
+ model: true,
36460
+ fallback_models: true,
36461
+ variant: true
36462
+ }).extend({
36463
+ thinking_level: PiThinkingLevelSchema.describe("Pi thinking level for the sidekick model selection.")
36464
+ }).strict();
36465
+ var ConfigProfileSchema = exports_external.object({
36466
+ historian: ProfileHistorianSchema.optional(),
36467
+ dreamer: ProfileDreamerSchema.optional(),
36468
+ sidekick: ProfileSidekickSchema.optional()
36469
+ }).strict().describe("User-owned model-selection overlay. Only historian/dreamer harness model blocks and sidekick model-selection fields are allowed.");
36470
+ var ConfigProfilesSchema = exports_external.record(exports_external.string().trim().min(1, "Profile names must not be empty or whitespace-only."), ConfigProfileSchema);
36055
36471
  var CronScheduleSchema = exports_external.string().refine((s) => s.trim() === "" || isValidCron(s), {
36056
36472
  message: 'Invalid schedule: use a 5-field cron expression (e.g. "0 3 * * *" for 3am daily, "0 3 * * 0" for Sunday 3am, "0 */6 * * *" every 6h) or "" to disable.'
36057
36473
  }).describe('5-field cron schedule (e.g. "0 3 * * *"), or "" to disable this task.');
@@ -36139,9 +36555,9 @@ var EmbeddingFallbackProviderSchema = exports_external.enum(["local", "openai-co
36139
36555
  function expandConfigPath(value) {
36140
36556
  const trimmed = value.trim();
36141
36557
  if (trimmed === "~")
36142
- return homedir4();
36558
+ return homedir5();
36143
36559
  if (trimmed.startsWith("~/"))
36144
- return `${homedir4()}/${trimmed.slice(2)}`;
36560
+ return `${homedir5()}/${trimmed.slice(2)}`;
36145
36561
  return trimmed;
36146
36562
  }
36147
36563
  var BaseEmbeddingConfigSchema = exports_external.object({
@@ -36242,6 +36658,8 @@ var MagicContextConfigSchema = exports_external.object({
36242
36658
  transform_mode: exports_external.enum(["ts", "rust"]).default("ts").describe('Experimental: routes the entire Magic Context runtime for the project through the ck-mc Rust module over subc (requires user-level `subc` config); "ts" is the current TypeScript pipeline.'),
36243
36659
  auto_update: exports_external.boolean().optional().describe("Enable automatic npm self-update checks for the OpenCode plugin. Security: USER-only in config loader, so hostile project configs cannot suppress updates."),
36244
36660
  language: exports_external.string().trim().toLowerCase().refine((s) => isValidLanguageCode(s), 'language must be a 2-letter ISO 639-1 code (e.g. "tr", "es", "de")').optional().describe("Output language for Magic Context's generated content and guidance, as a " + '2-letter ISO 639-1 code (e.g. "tr", "es", "de", "ja", "pt"). When set, the ' + "historian, dreamer, sidekick, and the agent-guidance block instruct the model to " + "write its PROSE in this language while keeping all structural tokens (XML tags, " + "the five memory category names, code identifiers, file paths) in English. " + "USER-LEVEL ONLY (ignored in project config for security). Unset = today's " + "behavior (model mirrors the conversation; English scaffolding). Changing it " + "triggers one cache re-materialization; existing compartments/memories keep their " + "original language until naturally rewritten."),
36661
+ profile: exports_external.string().trim().min(1).optional().describe("Select a named user-owned model profile. A valid project name overrides this user default; an empty string, null, or other non-string project value is ignored with a warning so the user selection still applies. Unknown names warn and use the base configuration."),
36662
+ profiles: ConfigProfilesSchema.optional().describe("User-level named model profiles. A profile may contain only historian/dreamer model, fallback_models, OpenCode variant, and Pi thinking_level fields plus sidekick model-selection fields; task execution policy (including timeout_minutes) is excluded. Project configs may select a name but cannot define profiles."),
36245
36663
  historian: HistorianConfigSchema.describe("Historian metadata plus independent strict OpenCode and Pi execution blocks. Retained metadata stays at historian; model, fallback_models, variant, and thinking_level belong only in historian.opencode or historian.pi."),
36246
36664
  dreamer: DreamerConfigSchema.optional().describe("Dreamer metadata and scheduling plus independent strict OpenCode and Pi execution blocks. schedule and promotion_threshold stay at dreamer.tasks; model, fallback_models, variant, thinking_level, and timeout_minutes belong only in the matching harness block."),
36247
36665
  smart_notes: exports_external.object({
@@ -36343,6 +36761,69 @@ var MagicContextConfigSchema = exports_external.object({
36343
36761
  };
36344
36762
  });
36345
36763
 
36764
+ // ../plugin/src/config/profiles.ts
36765
+ function withoutProfileFields(raw) {
36766
+ const copy = { ...raw };
36767
+ delete copy.profile;
36768
+ delete copy.profiles;
36769
+ return copy;
36770
+ }
36771
+ function readProfileSelection(raw) {
36772
+ if (!Object.hasOwn(raw, "profile"))
36773
+ return { declared: false };
36774
+ const value = raw.profile;
36775
+ if (typeof value !== "string")
36776
+ return { declared: true };
36777
+ const name = value.trim();
36778
+ return name.length > 0 ? { declared: true, name } : { declared: true };
36779
+ }
36780
+ function resolveConfigProfile(args) {
36781
+ const warnings = [];
36782
+ const userSelection = readProfileSelection(args.userRaw);
36783
+ const projectSelection = readProfileSelection(args.projectRaw);
36784
+ const selection = projectSelection.name ? { name: projectSelection.name, source: "project" } : userSelection.name ? { name: userSelection.name, source: "user" } : undefined;
36785
+ if (projectSelection.declared && !projectSelection.name) {
36786
+ warnings.push("Ignoring invalid profile selection from project config; expected a non-empty string.");
36787
+ }
36788
+ if (!projectSelection.declared && userSelection.declared && !userSelection.name) {
36789
+ warnings.push("Ignoring invalid profile selection from user config; expected a non-empty string.");
36790
+ }
36791
+ let profiles = {};
36792
+ if (Object.hasOwn(args.userRaw, "profiles")) {
36793
+ const parsed = ConfigProfilesSchema.safeParse(args.userRaw.profiles);
36794
+ if (parsed.success) {
36795
+ profiles = parsed.data;
36796
+ } else {
36797
+ warnings.push("Ignoring profiles from user config: invalid profile configuration; profiles may contain only historian/dreamer harness model blocks and sidekick model-selection fields.");
36798
+ }
36799
+ }
36800
+ if (!selection) {
36801
+ return {
36802
+ userBase: withoutProfileFields(args.userRaw),
36803
+ projectBase: withoutProfileFields(args.projectRaw),
36804
+ overlay: {},
36805
+ warnings
36806
+ };
36807
+ }
36808
+ if (!Object.hasOwn(profiles, selection.name)) {
36809
+ warnings.push(`Unknown profile "${selection.name}" selected by ${selection.source} config; using base config without a profile.`);
36810
+ return {
36811
+ userBase: withoutProfileFields(args.userRaw),
36812
+ projectBase: withoutProfileFields(args.projectRaw),
36813
+ overlay: {},
36814
+ warnings
36815
+ };
36816
+ }
36817
+ const overlay = profiles[selection.name];
36818
+ return {
36819
+ userBase: withoutProfileFields(args.userRaw),
36820
+ projectBase: withoutProfileFields(args.projectRaw),
36821
+ overlay,
36822
+ activeProfile: selection.name,
36823
+ warnings
36824
+ };
36825
+ }
36826
+
36346
36827
  // ../plugin/src/config/project-security.ts
36347
36828
  var HIDDEN_AGENT_KEYS = ["historian", "dreamer", "sidekick"];
36348
36829
  var HARNESS_KEYS = ["opencode", "pi"];
@@ -36481,6 +36962,10 @@ function makeProjectThresholdWarning(field, reason) {
36481
36962
  }
36482
36963
  function stripUnsafeProjectConfigFields(projectRaw) {
36483
36964
  const warnings = [];
36965
+ if ("profiles" in projectRaw) {
36966
+ delete projectRaw.profiles;
36967
+ warnings.push("Ignoring profiles from project config (security: profile definitions are user-level only; a repository may select a named user profile with profile).");
36968
+ }
36484
36969
  if ("auto_update" in projectRaw) {
36485
36970
  delete projectRaw.auto_update;
36486
36971
  warnings.push("Ignoring auto_update from project config (security: this setting only honors user-level config).");
@@ -38513,12 +38998,12 @@ function loadRawConfigFile(options) {
38513
38998
 
38514
38999
  // ../plugin/src/config/variable.ts
38515
39000
  import { existsSync as existsSync10, readFileSync as readFileSync9 } from "node:fs";
38516
- import { homedir as homedir5 } from "node:os";
39001
+ import { homedir as homedir6 } from "node:os";
38517
39002
  import { dirname as dirname6, isAbsolute as isAbsolute3, resolve as resolve4 } from "node:path";
38518
39003
  var ENV_PATTERN = /\{env:([^}]+)\}/g;
38519
39004
  var FILE_PATTERN = /\{file:([^}]+)\}/g;
38520
39005
  function sensitiveFilePathReason(resolvedPath) {
38521
- const home = homedir5();
39006
+ const home = homedir6();
38522
39007
  const sensitiveDirs = [
38523
39008
  { dir: resolve4(home, ".ssh"), label: "SSH keys" },
38524
39009
  { dir: resolve4(home, ".aws"), label: "AWS credentials" },
@@ -38581,7 +39066,7 @@ function substituteConfigVariables(input) {
38581
39066
  }
38582
39067
  let filePath = rawPath.trim();
38583
39068
  if (filePath.startsWith("~/")) {
38584
- filePath = resolve4(homedir5(), filePath.slice(2));
39069
+ filePath = resolve4(homedir6(), filePath.slice(2));
38585
39070
  } else if (!isAbsolute3(filePath)) {
38586
39071
  filePath = resolve4(configDir, filePath);
38587
39072
  }
@@ -39375,38 +39860,45 @@ function loadPiConfig(opts = {}) {
39375
39860
  } else if (legacyProjectUnmigrated) {
39376
39861
  warnings.push("[project config] legacy Magic Context config exists but the shared CortexKit config is absent; embedding registration is paused until config migration completes.");
39377
39862
  }
39378
- let rawConfig = {};
39379
39863
  const mergeFiles = [...loadedFiles].sort((a, b) => {
39380
39864
  if (a.scope === b.scope)
39381
39865
  return 0;
39382
39866
  return a.scope === "user" ? -1 : 1;
39383
39867
  });
39384
- const userRaw = mergeFiles.find((f) => f.scope === "user")?.config;
39385
- const trustedBaseConfig = parsePiConfig(userRaw ?? {}).config;
39868
+ const userRaw = mergeFiles.find((f) => f.scope === "user")?.config ?? {};
39869
+ const projectLoaded = mergeFiles.find((f) => f.scope === "project");
39870
+ let projectRaw = {};
39386
39871
  for (const loaded of mergeFiles) {
39387
39872
  const prefix = loaded.scope === "user" ? "[user config]" : "[project config]";
39388
39873
  warnings.push(...loaded.warnings.map((warning) => `${prefix} ${warning}`));
39389
- if (loaded.scope === "project") {
39390
- const projectRaw = { ...loaded.config };
39391
- for (const warning of stripUnsafeProjectConfigFields(projectRaw)) {
39392
- warnings.push(`${prefix} ${warning}`);
39393
- }
39394
- rawConfig = mergeRawConfigs(rawConfig, projectRaw);
39395
- for (const warning of dropInheritedEmbeddingKeyOnRedirect(projectRaw, rawConfig, userRaw)) {
39396
- warnings.push(`${prefix} ${warning}`);
39397
- }
39398
- for (const warning of constrainProjectThresholdOverrides({
39399
- mergedRaw: rawConfig,
39400
- projectRaw,
39401
- trustedBaseConfig
39402
- })) {
39403
- warnings.push(`${prefix} ${warning}`);
39404
- }
39405
- } else {
39406
- rawConfig = mergeRawConfigs(rawConfig, loaded.config);
39874
+ if (loaded.scope !== "project")
39875
+ continue;
39876
+ projectRaw = { ...loaded.config };
39877
+ for (const warning of stripUnsafeProjectConfigFields(projectRaw)) {
39878
+ warnings.push(`${prefix} ${warning}`);
39879
+ }
39880
+ }
39881
+ const profileResolution = resolveConfigProfile({ userRaw, projectRaw });
39882
+ warnings.push(...profileResolution.warnings.map((warning) => `[config] ${warning}`));
39883
+ const trustedProfiledRaw = mergeRawConfigs(profileResolution.userBase, profileResolution.overlay);
39884
+ let rawConfig = trustedProfiledRaw;
39885
+ const trustedBaseConfig = parsePiConfig(trustedProfiledRaw).config;
39886
+ if (projectLoaded) {
39887
+ rawConfig = mergeRawConfigs(rawConfig, profileResolution.projectBase);
39888
+ for (const warning of dropInheritedEmbeddingKeyOnRedirect(projectRaw, rawConfig, profileResolution.userBase)) {
39889
+ warnings.push(`[project config] ${warning}`);
39890
+ }
39891
+ for (const warning of constrainProjectThresholdOverrides({
39892
+ mergedRaw: rawConfig,
39893
+ projectRaw: profileResolution.projectBase,
39894
+ trustedBaseConfig
39895
+ })) {
39896
+ warnings.push(`[project config] ${warning}`);
39407
39897
  }
39408
39898
  }
39409
39899
  const parsed = parsePiConfig(rawConfig);
39900
+ if (profileResolution.activeProfile)
39901
+ parsed.config.profile = profileResolution.activeProfile;
39410
39902
  setOutputReserveConfig(parsed.config.output_reserve);
39411
39903
  setWindowOverlayPath(parsed.config.models?.window_overlay_path);
39412
39904
  warnings.push(...parsed.warnings.map((warning) => `[merged config] ${warning}`));
@@ -39496,39 +39988,46 @@ function loadPiConfigDetailed(opts = {}) {
39496
39988
  } else if (legacyProjectUnmigrated) {
39497
39989
  warnings.push("[project config] legacy Magic Context config exists but the shared CortexKit config is absent; embedding registration is paused until config migration completes.");
39498
39990
  }
39499
- let rawConfig = {};
39500
39991
  const mergeFiles = [...loadedFiles].sort((a, b) => {
39501
39992
  if (a.scope === b.scope)
39502
39993
  return 0;
39503
39994
  return a.scope === "user" ? -1 : 1;
39504
39995
  });
39505
- const userRaw = mergeFiles.find((f) => f.scope === "user")?.config;
39506
- const trustedBaseConfig = parsePiConfig(userRaw ?? {}).config;
39996
+ const userRaw = mergeFiles.find((f) => f.scope === "user")?.config ?? {};
39997
+ const projectLayer = mergeFiles.find((f) => f.scope === "project");
39998
+ let projectRaw = {};
39507
39999
  for (const loaded of mergeFiles) {
39508
40000
  const prefix = loaded.scope === "user" ? "[user config]" : "[project config]";
39509
40001
  warnings.push(...loaded.warnings.map((warning) => `${prefix} ${warning}`));
39510
- if (loaded.scope === "project") {
39511
- const projectRaw = { ...loaded.config };
39512
- for (const warning of stripUnsafeProjectConfigFields(projectRaw)) {
39513
- warnings.push(`${prefix} ${warning}`);
39514
- }
39515
- rawConfig = mergeRawConfigs(rawConfig, projectRaw);
39516
- for (const warning of dropInheritedEmbeddingKeyOnRedirect(projectRaw, rawConfig, userRaw)) {
39517
- warnings.push(`${prefix} ${warning}`);
39518
- }
39519
- for (const warning of constrainProjectThresholdOverrides({
39520
- mergedRaw: rawConfig,
39521
- projectRaw,
39522
- trustedBaseConfig
39523
- })) {
39524
- warnings.push(`${prefix} ${warning}`);
39525
- }
39526
- } else {
39527
- rawConfig = mergeRawConfigs(rawConfig, loaded.config);
40002
+ if (loaded.scope !== "project")
40003
+ continue;
40004
+ projectRaw = { ...loaded.config };
40005
+ for (const warning of stripUnsafeProjectConfigFields(projectRaw)) {
40006
+ warnings.push(`${prefix} ${warning}`);
40007
+ }
40008
+ }
40009
+ const profileResolution = resolveConfigProfile({ userRaw, projectRaw });
40010
+ warnings.push(...profileResolution.warnings.map((warning) => `[config] ${warning}`));
40011
+ const trustedProfiledRaw = mergeRawConfigs(profileResolution.userBase, profileResolution.overlay);
40012
+ let rawConfig = trustedProfiledRaw;
40013
+ const trustedBaseConfig = parsePiConfig(trustedProfiledRaw).config;
40014
+ if (projectLayer) {
40015
+ rawConfig = mergeRawConfigs(rawConfig, profileResolution.projectBase);
40016
+ for (const warning of dropInheritedEmbeddingKeyOnRedirect(projectRaw, rawConfig, profileResolution.userBase)) {
40017
+ warnings.push(`[project config] ${warning}`);
40018
+ }
40019
+ for (const warning of constrainProjectThresholdOverrides({
40020
+ mergedRaw: rawConfig,
40021
+ projectRaw: profileResolution.projectBase,
40022
+ trustedBaseConfig
40023
+ })) {
40024
+ warnings.push(`[project config] ${warning}`);
39528
40025
  }
39529
40026
  }
39530
40027
  const recoveredTopLevelKeys = [];
39531
40028
  const parsed = parsePiConfig(rawConfig, recoveredTopLevelKeys);
40029
+ if (profileResolution.activeProfile)
40030
+ parsed.config.profile = profileResolution.activeProfile;
39532
40031
  setOutputReserveConfig(parsed.config.output_reserve);
39533
40032
  setWindowOverlayPath(parsed.config.models?.window_overlay_path);
39534
40033
  warnings.push(...parsed.warnings.map((warning) => `[merged config] ${warning}`));
@@ -42640,6 +43139,7 @@ class OpenAICompatibleEmbeddingProvider {
42640
43139
  circuitOpenUntil = 0;
42641
43140
  openLogged = false;
42642
43141
  modelMismatchLogged = false;
43142
+ lastFailureReason = null;
42643
43143
  halfOpenProbeInFlight = false;
42644
43144
  constructor(options) {
42645
43145
  this.endpoint = normalizeEndpoint3(options.endpoint);
@@ -42729,41 +43229,59 @@ class OpenAICompatibleEmbeddingProvider {
42729
43229
  signal: internalController.signal
42730
43230
  });
42731
43231
  if (!response.ok) {
42732
- log(`[magic-context] openai-compatible embedding request failed: ${response.status} ${response.statusText}`);
42733
- this.recordFailure(isProbe);
43232
+ const excerpt = await response.text().catch(() => "");
43233
+ const failure = this.failure("http_error", `HTTP ${response.status} from endpoint${this.bodyExcerpt(excerpt)}`, response.status >= 500 || response.status === 408 || response.status === 429);
43234
+ log(`[magic-context] openai-compatible embedding request failed: ${failure.reason}`);
43235
+ this.recordFailure(isProbe, failure);
42734
43236
  return Array.from({ length: texts.length }, () => null);
42735
43237
  }
42736
43238
  const rawBody = await response.text();
42737
43239
  if (rawBody.trim().length === 0) {
42738
- log(`[magic-context] openai-compatible embedding request returned empty body (status=${response.status}, content-type=${response.headers.get("content-type") ?? "none"})`);
42739
- this.recordFailure(isProbe);
43240
+ const failure = this.failure("invalid_envelope", "response body was empty", false);
43241
+ log(`[magic-context] openai-compatible embedding request failed: ${failure.reason}`);
43242
+ this.recordFailure(isProbe, failure);
42740
43243
  return Array.from({ length: texts.length }, () => null);
42741
43244
  }
42742
43245
  let body;
42743
43246
  try {
42744
43247
  body = JSON.parse(rawBody);
42745
- } catch (parseError) {
42746
- const snippet = rawBody.slice(0, 200).replace(/\s+/g, " ");
42747
- log(`[magic-context] openai-compatible embedding response was not JSON (status=${response.status}, ${rawBody.length}B body, snippet="${snippet}"):`, parseError instanceof Error ? parseError.message : parseError);
42748
- this.recordFailure(isProbe);
43248
+ } catch {
43249
+ const failure = this.failure("invalid_envelope", `response body was not valid JSON${this.bodyExcerpt(rawBody)}`, false);
43250
+ log(`[magic-context] openai-compatible embedding request failed: ${failure.reason}`);
43251
+ this.recordFailure(isProbe, failure);
42749
43252
  return Array.from({ length: texts.length }, () => null);
42750
43253
  }
42751
43254
  const servedModel = typeof body.model === "string" ? body.model : "";
42752
43255
  if (this.model && servedModel && !embeddingModelsMatch(servedModel, this.model)) {
42753
43256
  if (!this.modelMismatchLogged) {
42754
- log(`[magic-context] embedding endpoint served a DIFFERENT model than requested — refusing the substituted vectors (they have the wrong dimensions/space). requested="${this.model}" served="${servedModel}". Check that the endpoint serves the requested model; variant suffixes and vendor prefixes are matched automatically.`);
43257
+ log(`[magic-context] embedding endpoint served a DIFFERENT model than requested — refusing the substituted vectors (they have the wrong dimensions/space). requested="${sanitizeDiagnosticText(this.model)}" served="${sanitizeDiagnosticText(servedModel)}". Check that the endpoint serves the requested model; variant suffixes and vendor prefixes are matched automatically.`);
42755
43258
  this.modelMismatchLogged = true;
42756
43259
  }
42757
- this.recordFailure(isProbe);
43260
+ this.recordFailure(isProbe, this.failure("substitution_rejected", `served model '${sanitizeDiagnosticText(servedModel)}' does not match requested '${sanitizeDiagnosticText(this.model)}' (substitution guard)`, false));
43261
+ return Array.from({ length: texts.length }, () => null);
43262
+ }
43263
+ const responseKeys = Object.keys(body).sort();
43264
+ if (!Array.isArray(body.data)) {
43265
+ const failure = this.failure("invalid_envelope", `response had keys [${responseKeys.join(", ")}] but data[] was absent`, false);
43266
+ log(`[magic-context] openai-compatible embedding request failed: ${failure.reason}`);
43267
+ this.recordFailure(isProbe, failure);
43268
+ return Array.from({ length: texts.length }, () => null);
43269
+ }
43270
+ if (body.data.length === 0) {
43271
+ const failure = this.failure("empty_result", "response data[] was empty", true);
43272
+ log(`[magic-context] openai-compatible embedding request failed: ${failure.reason}`);
43273
+ this.recordFailure(isProbe, failure);
42758
43274
  return Array.from({ length: texts.length }, () => null);
42759
43275
  }
42760
- const items = Array.isArray(body.data) ? body.data : [];
43276
+ const items = body.data;
42761
43277
  const results = Array.from({ length: texts.length }, (_, index) => {
42762
43278
  const embedding = items[index]?.embedding;
42763
43279
  return Array.isArray(embedding) ? Float32Array.from(embedding) : null;
42764
43280
  });
42765
43281
  if (results.every((r) => r === null)) {
42766
- this.recordFailure(isProbe);
43282
+ const failure = this.failure("invalid_envelope", `response had keys [${responseKeys.join(", ")}] but data[].embedding was absent`, false);
43283
+ log(`[magic-context] openai-compatible embedding request failed: ${failure.reason}`);
43284
+ this.recordFailure(isProbe, failure);
42767
43285
  } else {
42768
43286
  this.recordSuccess();
42769
43287
  }
@@ -42773,11 +43291,14 @@ class OpenAICompatibleEmbeddingProvider {
42773
43291
  if (isAbort) {
42774
43292
  if (signal?.aborted) {} else {
42775
43293
  log(`[magic-context] openai-compatible embedding request timed out after ${FETCH_TIMEOUT_MS}ms`);
42776
- this.recordFailure(isProbe);
43294
+ const failure = this.failure("transport_error", `request timed out after ${FETCH_TIMEOUT_MS}ms`, true);
43295
+ this.recordFailure(isProbe, failure);
42777
43296
  }
42778
43297
  } else {
42779
- log("[magic-context] openai-compatible embedding request failed:", error51);
42780
- this.recordFailure(isProbe);
43298
+ const detail = error51 instanceof Error ? error51.message : String(error51);
43299
+ const failure = this.failure("transport_error", `transport error: ${sanitizeDiagnosticText(detail)}`, true);
43300
+ log(`[magic-context] openai-compatible embedding request failed: ${failure.reason}`);
43301
+ this.recordFailure(isProbe, failure);
42781
43302
  }
42782
43303
  return Array.from({ length: texts.length }, () => null);
42783
43304
  } finally {
@@ -42809,14 +43330,23 @@ class OpenAICompatibleEmbeddingProvider {
42809
43330
  return "short_circuit";
42810
43331
  }
42811
43332
  this.halfOpenProbeInFlight = true;
42812
- log("[magic-context] openai-compatible embedding: circuit half-open, probing endpoint");
43333
+ log(`[magic-context] openai-compatible embedding: circuit half-open, probing endpoint after ${this.lastFailureReason?.reason ?? "unknown failure"}`);
42813
43334
  return "probe";
42814
43335
  }
42815
- recordFailure(isProbe) {
43336
+ failure(failureClass, reason, retryable) {
43337
+ return { class: failureClass, reason, retryable };
43338
+ }
43339
+ bodyExcerpt(body) {
43340
+ const excerpt = sanitizeDiagnosticText(body).replace(/\s+/g, " ").trim().slice(0, 200);
43341
+ return excerpt ? `: ${excerpt}` : "";
43342
+ }
43343
+ recordFailure(isProbe, failure) {
43344
+ if (failure)
43345
+ this.lastFailureReason = failure;
42816
43346
  if (isProbe) {
42817
43347
  this.circuitOpenUntil = Date.now() + OPEN_DURATION_MS;
42818
43348
  if (!this.openLogged) {
42819
- log(`[magic-context] openai-compatible embedding: probe failed, re-opening circuit for ${OPEN_DURATION_MS / 60000}min`);
43349
+ log(`[magic-context] openai-compatible embedding: probe failed (${failure?.reason ?? this.lastFailureReason?.reason ?? "unknown failure"}), re-opening circuit for ${OPEN_DURATION_MS / 60000}min`);
42820
43350
  this.openLogged = true;
42821
43351
  }
42822
43352
  this.failureTimes = [];
@@ -42829,7 +43359,7 @@ class OpenAICompatibleEmbeddingProvider {
42829
43359
  if (this.failureTimes.length >= FAILURE_THRESHOLD) {
42830
43360
  this.circuitOpenUntil = now + OPEN_DURATION_MS;
42831
43361
  if (!this.openLogged) {
42832
- log(`[magic-context] openai-compatible embedding: opening circuit for ${OPEN_DURATION_MS / 60000}min after ${this.failureTimes.length} failures in ${FAILURE_WINDOW_MS / 1000}s`);
43362
+ log(`[magic-context] openai-compatible embedding: opening circuit for ${OPEN_DURATION_MS / 60000}min after ${this.failureTimes.length} failures in ${FAILURE_WINDOW_MS / 1000}s (${failure?.reason ?? this.lastFailureReason?.reason ?? "unknown failure"})`);
42833
43363
  this.openLogged = true;
42834
43364
  }
42835
43365
  this.failureTimes = [];
@@ -42842,6 +43372,10 @@ class OpenAICompatibleEmbeddingProvider {
42842
43372
  this.failureTimes = [];
42843
43373
  this.circuitOpenUntil = 0;
42844
43374
  this.openLogged = false;
43375
+ this.lastFailureReason = null;
43376
+ }
43377
+ getLastFailureReason() {
43378
+ return this.lastFailureReason;
42845
43379
  }
42846
43380
  _getCircuitState() {
42847
43381
  if (this.circuitOpenUntil === 0)
@@ -42859,6 +43393,7 @@ class OpenAICompatibleEmbeddingProvider {
42859
43393
  this.circuitOpenUntil = 0;
42860
43394
  this.openLogged = false;
42861
43395
  this.halfOpenProbeInFlight = false;
43396
+ this.lastFailureReason = null;
42862
43397
  }
42863
43398
  }
42864
43399
 
@@ -43315,6 +43850,25 @@ function invalidateMemory(projectPath, memoryId) {
43315
43850
  }
43316
43851
  }
43317
43852
 
43853
+ // ../plugin/src/features/magic-context/memory/embedding-failure.ts
43854
+ function dominantEmbeddingFailure(failures) {
43855
+ const counts = new Map;
43856
+ for (const failure of failures) {
43857
+ const key = `${failure.class}\x00${failure.reason}`;
43858
+ const current = counts.get(key);
43859
+ if (current)
43860
+ current.count += 1;
43861
+ else
43862
+ counts.set(key, { failure, count: 1 });
43863
+ }
43864
+ let dominant;
43865
+ for (const candidate of counts.values()) {
43866
+ if (!dominant || candidate.count > dominant.count)
43867
+ dominant = candidate;
43868
+ }
43869
+ return dominant?.failure;
43870
+ }
43871
+
43318
43872
  // ../plugin/src/features/magic-context/session-project-storage.ts
43319
43873
  var SESSION_CHUNK_REPAIR_BATCH_SIZE = 100;
43320
43874
  var upsertSessionProjectStatements = new WeakMap;
@@ -44426,11 +44980,16 @@ async function drainCommitBacklogForProject(db, projectIdentity, deadline) {
44426
44980
  }
44427
44981
  return total;
44428
44982
  }
44983
+ function getLastEmbeddingFailureForProject(projectIdentity) {
44984
+ const registration = projectRegistrations.get(projectIdentity);
44985
+ return registration?.provider?.getLastFailureReason?.() ?? null;
44986
+ }
44429
44987
  async function embedCandidateChunkBatch(db, projectIdentity, modelId, candidates, signal) {
44430
44988
  const noWork = [];
44431
44989
  const failed = [];
44990
+ const failureReasons = [];
44432
44991
  if (candidates.length === 0)
44433
- return { embedded: 0, noWork, failed };
44992
+ return { embedded: 0, noWork, failed, failureReasons };
44434
44993
  const maxInputTokens = getProjectEmbeddingMaxInputTokens(projectIdentity);
44435
44994
  const prepared = [];
44436
44995
  for (const candidate of candidates) {
@@ -44447,7 +45006,7 @@ async function embedCandidateChunkBatch(db, projectIdentity, modelId, candidates
44447
45006
  prepared.push({ candidate, windows });
44448
45007
  }
44449
45008
  if (prepared.length === 0)
44450
- return { embedded: 0, noWork, failed };
45009
+ return { embedded: 0, noWork, failed, failureReasons };
44451
45010
  let embedded = 0;
44452
45011
  let i = 0;
44453
45012
  while (i < prepared.length) {
@@ -44479,6 +45038,11 @@ async function embedCandidateChunkBatch(db, projectIdentity, modelId, candidates
44479
45038
  }
44480
45039
  if (signal?.aborted)
44481
45040
  break;
45041
+ if (!result || result.vectors.size === 0) {
45042
+ const failure = getLastEmbeddingFailureForProject(projectIdentity);
45043
+ if (failure)
45044
+ failureReasons.push(failure);
45045
+ }
44482
45046
  if (result) {
44483
45047
  for (const item of slice) {
44484
45048
  if (persistedIds.has(item.candidate.id))
@@ -44520,7 +45084,7 @@ async function embedCandidateChunkBatch(db, projectIdentity, modelId, candidates
44520
45084
  }
44521
45085
  }
44522
45086
  }
44523
- return { embedded, noWork, failed };
45087
+ return { embedded, noWork, failed, failureReasons };
44524
45088
  }
44525
45089
  async function embedSessionCompartmentChunks(db, projectIdentity, sessionId, options) {
44526
45090
  const snapshot = getProjectEmbeddingSnapshot(projectIdentity);
@@ -44558,6 +45122,7 @@ async function embedSessionCompartmentChunks(db, projectIdentity, sessionId, opt
44558
45122
  let aborted2 = false;
44559
45123
  let providerDown = false;
44560
45124
  let consecutiveFailedBatches = 0;
45125
+ const failureReasons = [];
44561
45126
  try {
44562
45127
  options?.onProgress?.({ embedded, total });
44563
45128
  for (;; ) {
@@ -44571,7 +45136,8 @@ async function embedSessionCompartmentChunks(db, projectIdentity, sessionId, opt
44571
45136
  const {
44572
45137
  embedded: n,
44573
45138
  noWork,
44574
- failed
45139
+ failed,
45140
+ failureReasons: batchFailureReasons
44575
45141
  } = await embedCandidateChunkBatch(db, projectIdentity, snapshot.chunkModelId, candidates, drainAbort.signal);
44576
45142
  if (leaseLost || !renewGitSweepLease(db, projectIdentity, holderId)) {
44577
45143
  leaseLost = true;
@@ -44579,6 +45145,7 @@ async function embedSessionCompartmentChunks(db, projectIdentity, sessionId, opt
44579
45145
  aborted2 = true;
44580
45146
  break;
44581
45147
  }
45148
+ failureReasons.push(...batchFailureReasons);
44582
45149
  for (const id of noWork)
44583
45150
  skipIds.push(id);
44584
45151
  for (const id of failed)
@@ -44610,7 +45177,14 @@ async function embedSessionCompartmentChunks(db, projectIdentity, sessionId, opt
44610
45177
  if (providerDown || failedIds.length > 0) {
44611
45178
  const remaining = Math.max(0, countUnembeddedSessionCompartments(db, projectIdentity, sessionId, snapshot.chunkModelId) - skipIds.length);
44612
45179
  if (remaining > 0) {
44613
- return { status: "stalled", embedded, total, remaining, failed: failedIds.length };
45180
+ return {
45181
+ status: "stalled",
45182
+ embedded,
45183
+ total,
45184
+ remaining,
45185
+ failed: failedIds.length,
45186
+ failure: dominantEmbeddingFailure(failureReasons)
45187
+ };
44614
45188
  }
44615
45189
  }
44616
45190
  return { status: "done", embedded, total, failed: failedIds.length };
@@ -45561,7 +46135,7 @@ function unwrapImitatedReducedArgs(args, primaryFields, schema) {
45561
46135
  return args;
45562
46136
  }
45563
46137
 
45564
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/system/memory/memory.mjs
46138
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/system/memory/memory.mjs
45565
46139
  var exports_memory = {};
45566
46140
  __export(exports_memory, {
45567
46141
  Assign: () => Assign,
@@ -45572,7 +46146,7 @@ __export(exports_memory, {
45572
46146
  Update: () => Update
45573
46147
  });
45574
46148
 
45575
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/system/memory/metrics.mjs
46149
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/system/memory/metrics.mjs
45576
46150
  var Metrics = {
45577
46151
  assign: 0,
45578
46152
  create: 0,
@@ -45581,12 +46155,12 @@ var Metrics = {
45581
46155
  update: 0
45582
46156
  };
45583
46157
 
45584
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/system/memory/assign.mjs
46158
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/system/memory/assign.mjs
45585
46159
  function Assign(left, right) {
45586
46160
  Metrics.assign += 1;
45587
46161
  return { ...left, ...right };
45588
46162
  }
45589
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/guard/guard.mjs
46163
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/guard/guard.mjs
45590
46164
  var exports_guard = {};
45591
46165
  __export(exports_guard, {
45592
46166
  Entries: () => Entries,
@@ -45626,10 +46200,16 @@ __export(exports_guard, {
45626
46200
  Values: () => Values
45627
46201
  });
45628
46202
 
45629
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/guard/string.mjs
46203
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/guard/string.mjs
45630
46204
  function IsBetween(value, min, max) {
45631
46205
  return value >= min && value <= max;
45632
46206
  }
46207
+ function IsZeroWidthJoiner(value) {
46208
+ return value === 8205;
46209
+ }
46210
+ function IsHighSurrogate(value) {
46211
+ return IsBetween(value, 55296, 56319);
46212
+ }
45633
46213
  function IsRegionalIndicator(value) {
45634
46214
  return IsBetween(value, 127462, 127487);
45635
46215
  }
@@ -45668,7 +46248,7 @@ function NextGraphemeClusterIndex(value, clusterStart) {
45668
46248
  return clusterEnd;
45669
46249
  }
45670
46250
  function IsGraphemeCodePoint(value) {
45671
- return IsBetween(value, 55296, 56319) || IsBetween(value, 768, 879) || value === 8205;
46251
+ return IsHighSurrogate(value) || IsCombiningMark(value) || IsVariationSelector(value) || IsZeroWidthJoiner(value);
45672
46252
  }
45673
46253
  function GraphemeCount(value) {
45674
46254
  let count = 0;
@@ -45730,7 +46310,7 @@ function IsMaxLengthFast(value, maxLength) {
45730
46310
  return true;
45731
46311
  }
45732
46312
 
45733
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/guard/guard.mjs
46313
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/guard/guard.mjs
45734
46314
  function IsArray(value) {
45735
46315
  return Array.isArray(value);
45736
46316
  }
@@ -45802,7 +46382,7 @@ function IsMultipleOf(dividend, divisor) {
45802
46382
  if (IsInteger(dividend) && 1 / divisor % 1 === 0)
45803
46383
  return true;
45804
46384
  const mod = dividend % divisor;
45805
- return Math.min(Math.abs(mod), Math.abs(mod - divisor)) < tolerance;
46385
+ return Math.min(Math.abs(mod), Math.abs(mod - divisor), Math.abs(mod + divisor)) < tolerance;
45806
46386
  }
45807
46387
  function IsClassInstance(value) {
45808
46388
  if (!IsObject(value))
@@ -45875,7 +46455,7 @@ function DeepEqualArray(left, right) {
45875
46455
  function IsDeepEqual(left, right) {
45876
46456
  return IsArray(left) ? DeepEqualArray(left, right) : IsObject(left) ? DeepEqualObject(left, right) : IsEqual(left, right);
45877
46457
  }
45878
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/guard/globals.mjs
46458
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/guard/globals.mjs
45879
46459
  var exports_globals = {};
45880
46460
  __export(exports_globals, {
45881
46461
  IsBigInt64Array: () => IsBigInt64Array,
@@ -45955,7 +46535,7 @@ function IsSet(value) {
45955
46535
  function IsMap(value) {
45956
46536
  return value instanceof globalThis.Map;
45957
46537
  }
45958
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/system/memory/clone.mjs
46538
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/system/memory/clone.mjs
45959
46539
  function FromClassInstance(value) {
45960
46540
  return value;
45961
46541
  }
@@ -46012,7 +46592,7 @@ function Clone(value) {
46012
46592
  Metrics.clone += 1;
46013
46593
  return FromValue(value);
46014
46594
  }
46015
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/system/settings/settings.mjs
46595
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/system/settings/settings.mjs
46016
46596
  var exports_settings = {};
46017
46597
  __export(exports_settings, {
46018
46598
  Get: () => Get,
@@ -46048,7 +46628,7 @@ function Set2(options) {
46048
46628
  function Get() {
46049
46629
  return settings;
46050
46630
  }
46051
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/system/memory/create.mjs
46631
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/system/memory/create.mjs
46052
46632
  function MergeHidden(left, right) {
46053
46633
  for (const key of Object.keys(right)) {
46054
46634
  Object.defineProperty(left, key, {
@@ -46070,7 +46650,7 @@ function Create(hidden, enumerable, options = {}) {
46070
46650
  const withHidden = settings2.enumerableKind ? Merge(withOptions, hidden) : MergeHidden(withOptions, hidden);
46071
46651
  return settings2.immutableTypes ? Object.freeze(withHidden) : withHidden;
46072
46652
  }
46073
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/system/memory/discard.mjs
46653
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/system/memory/discard.mjs
46074
46654
  function Discard(value, propertyKeys) {
46075
46655
  Metrics.discard += 1;
46076
46656
  const result = {};
@@ -46083,7 +46663,7 @@ function Discard(value, propertyKeys) {
46083
46663
  }
46084
46664
  return result;
46085
46665
  }
46086
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/system/memory/update.mjs
46666
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/system/memory/update.mjs
46087
46667
  function Update(current, hidden, enumerable) {
46088
46668
  Metrics.update += 1;
46089
46669
  const settings2 = exports_settings.Get();
@@ -46106,7 +46686,7 @@ function Update(current, hidden, enumerable) {
46106
46686
  }
46107
46687
  return result;
46108
46688
  }
46109
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/schema.mjs
46689
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/schema.mjs
46110
46690
  function IsKind(value, kind) {
46111
46691
  return exports_guard.IsObject(value) && exports_guard.HasPropertyKey(value, "~kind") && exports_guard.IsEqual(value["~kind"], kind);
46112
46692
  }
@@ -46114,7 +46694,7 @@ function IsSchema(value) {
46114
46694
  return exports_guard.IsObject(value);
46115
46695
  }
46116
46696
 
46117
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/deferred.mjs
46697
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/deferred.mjs
46118
46698
  function Deferred(action, parameters, options) {
46119
46699
  return exports_memory.Create({ "~kind": "Deferred" }, { type: "deferred", action, parameters, options }, {});
46120
46700
  }
@@ -46122,7 +46702,7 @@ function IsDeferred(value) {
46122
46702
  return IsKind(value, "Deferred");
46123
46703
  }
46124
46704
 
46125
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs
46705
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs
46126
46706
  function AddReadonlyOperation(type) {
46127
46707
  return exports_memory.Update(type, { "~readonly": true }, {});
46128
46708
  }
@@ -46135,7 +46715,7 @@ function AddReadonlyInstantiate(context, state, type, options) {
46135
46715
  return AddReadonlyAction(instantiatedType, options);
46136
46716
  }
46137
46717
 
46138
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs
46718
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs
46139
46719
  function AddOptionalOperation(type) {
46140
46720
  return exports_memory.Update(type, { "~optional": true }, {});
46141
46721
  }
@@ -46148,7 +46728,7 @@ function AddOptionalInstantiate(context, state, type, options) {
46148
46728
  return AddOptionalAction(instantiatedType, options);
46149
46729
  }
46150
46730
 
46151
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/array.mjs
46731
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/array.mjs
46152
46732
  function _Array_(items, options) {
46153
46733
  return exports_memory.Create({ "~kind": "Array" }, { type: "array", items }, options);
46154
46734
  }
@@ -46159,7 +46739,7 @@ function ArrayOptions(type) {
46159
46739
  return exports_memory.Discard(type, ["~kind", "type", "items"]);
46160
46740
  }
46161
46741
 
46162
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/constructor.mjs
46742
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/constructor.mjs
46163
46743
  function Constructor(parameters, instanceType, options = {}) {
46164
46744
  return exports_memory.Create({ "~kind": "Constructor" }, { type: "constructor", parameters, instanceType }, options);
46165
46745
  }
@@ -46170,7 +46750,7 @@ function ConstructorOptions(type) {
46170
46750
  return exports_memory.Discard(type, ["~kind", "type", "parameters", "instanceType"]);
46171
46751
  }
46172
46752
 
46173
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/function.mjs
46753
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/function.mjs
46174
46754
  function _Function_(parameters, returnType, options = {}) {
46175
46755
  return exports_memory.Create({ ["~kind"]: "Function" }, { type: "function", parameters, returnType }, options);
46176
46756
  }
@@ -46181,7 +46761,7 @@ function FunctionOptions(type) {
46181
46761
  return exports_memory.Discard(type, ["~kind", "type", "parameters", "returnType"]);
46182
46762
  }
46183
46763
 
46184
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/ref.mjs
46764
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/ref.mjs
46185
46765
  function Ref(ref, options) {
46186
46766
  return exports_memory.Create({ ["~kind"]: "Ref" }, { $ref: ref }, options);
46187
46767
  }
@@ -46189,7 +46769,7 @@ function IsRef(value) {
46189
46769
  return IsKind(value, "Ref");
46190
46770
  }
46191
46771
 
46192
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/generic.mjs
46772
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/generic.mjs
46193
46773
  function Generic(parameters, expression) {
46194
46774
  return exports_memory.Create({ "~kind": "Generic" }, { type: "generic", parameters, expression });
46195
46775
  }
@@ -46197,7 +46777,7 @@ function IsGeneric(value) {
46197
46777
  return IsKind(value, "Generic");
46198
46778
  }
46199
46779
 
46200
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/any.mjs
46780
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/any.mjs
46201
46781
  function Any(options) {
46202
46782
  return exports_memory.Create({ ["~kind"]: "Any" }, {}, options);
46203
46783
  }
@@ -46205,7 +46785,7 @@ function IsAny(value) {
46205
46785
  return IsKind(value, "Any");
46206
46786
  }
46207
46787
 
46208
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/never.mjs
46788
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/never.mjs
46209
46789
  var NeverPattern = "(?!)";
46210
46790
  function Never(options) {
46211
46791
  return exports_memory.Create({ "~kind": "Never" }, { not: {} }, options);
@@ -46214,7 +46794,7 @@ function IsNever(value) {
46214
46794
  return IsKind(value, "Never");
46215
46795
  }
46216
46796
 
46217
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/_add_optional.mjs
46797
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/action/_add_optional.mjs
46218
46798
  function AddOptionalDeferred(type, options = {}) {
46219
46799
  return Deferred("AddOptional", [type], options);
46220
46800
  }
@@ -46222,7 +46802,7 @@ function AddOptional(type, options = {}) {
46222
46802
  return AddOptionalAction(type, options);
46223
46803
  }
46224
46804
 
46225
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/_optional.mjs
46805
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/_optional.mjs
46226
46806
  function Optional(type) {
46227
46807
  return AddOptional(type);
46228
46808
  }
@@ -46230,7 +46810,7 @@ function IsOptional(value) {
46230
46810
  return IsSchema(value) && exports_guard.HasPropertyKey(value, "~optional");
46231
46811
  }
46232
46812
 
46233
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/properties.mjs
46813
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/properties.mjs
46234
46814
  function RequiredArray(properties) {
46235
46815
  return exports_guard.Keys(properties).filter((key) => !IsOptional(properties[key]));
46236
46816
  }
@@ -46241,7 +46821,7 @@ function PropertyValues(properties) {
46241
46821
  return exports_guard.Values(properties);
46242
46822
  }
46243
46823
 
46244
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/object.mjs
46824
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/object.mjs
46245
46825
  function _Object_(properties, options = {}) {
46246
46826
  const requiredKeys = RequiredArray(properties);
46247
46827
  const required2 = requiredKeys.length > 0 ? { required: requiredKeys } : {};
@@ -46254,7 +46834,7 @@ function ObjectOptions(type) {
46254
46834
  return exports_memory.Discard(type, ["~kind", "type", "properties", "required"]);
46255
46835
  }
46256
46836
 
46257
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/unknown.mjs
46837
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/unknown.mjs
46258
46838
  function Unknown(options) {
46259
46839
  return exports_memory.Create({ ["~kind"]: "Unknown" }, {}, options);
46260
46840
  }
@@ -46262,7 +46842,7 @@ function IsUnknown(value) {
46262
46842
  return IsKind(value, "Unknown");
46263
46843
  }
46264
46844
 
46265
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/cyclic.mjs
46845
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/cyclic.mjs
46266
46846
  function Cyclic($defs, $ref, options) {
46267
46847
  const defs = exports_guard.Keys($defs).reduce((result, key) => {
46268
46848
  return { ...result, [key]: exports_memory.Update($defs[key], {}, { $id: key }) };
@@ -46273,7 +46853,7 @@ function IsCyclic(value) {
46273
46853
  return IsKind(value, "Cyclic");
46274
46854
  }
46275
46855
 
46276
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/unsafe.mjs
46856
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/unsafe.mjs
46277
46857
  function Unsafe(schema) {
46278
46858
  return exports_memory.Update(schema, { ["~unsafe"]: null }, {});
46279
46859
  }
@@ -46281,7 +46861,7 @@ function IsUnsafe(value) {
46281
46861
  return exports_guard.IsObjectNotArray(value) && exports_guard.HasPropertyKey(value, "~unsafe") && exports_guard.IsNull(value["~unsafe"]);
46282
46862
  }
46283
46863
 
46284
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/system/arguments/arguments.mjs
46864
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/system/arguments/arguments.mjs
46285
46865
  var exports_arguments = {};
46286
46866
  __export(exports_arguments, {
46287
46867
  Match: () => Match
@@ -46291,7 +46871,7 @@ function Match(args, match) {
46291
46871
  throw Error("Invalid Arguments");
46292
46872
  })();
46293
46873
  }
46294
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/infer.mjs
46874
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/infer.mjs
46295
46875
  function Infer(...args) {
46296
46876
  const [name, extends_] = exports_arguments.Match(args, {
46297
46877
  2: (name2, extends_2) => [name2, extends_2, extends_2],
@@ -46303,7 +46883,7 @@ function IsInfer(value) {
46303
46883
  return IsKind(value, "Infer");
46304
46884
  }
46305
46885
 
46306
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/dependent.mjs
46886
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/dependent.mjs
46307
46887
  function Dependent(if_, then_, else_, options = {}) {
46308
46888
  return exports_memory.Create({ "~kind": "Dependent" }, { if: if_, then: then_, else: else_ }, options);
46309
46889
  }
@@ -46314,7 +46894,7 @@ function DependentOptions(type) {
46314
46894
  return exports_memory.Discard(type, ["~kind", "if", "then", "else"]);
46315
46895
  }
46316
46896
 
46317
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/enum/typescript_enum_to_enum_values.mjs
46897
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/enum/typescript_enum_to_enum_values.mjs
46318
46898
  function IsTypeScriptEnumLike(value) {
46319
46899
  return exports_guard.IsObjectNotArray(value);
46320
46900
  }
@@ -46323,7 +46903,10 @@ function TypeScriptEnumToEnumValues(type) {
46323
46903
  return keys.reduce((result, key) => [...result, type[key]], []);
46324
46904
  }
46325
46905
 
46326
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/enum.mjs
46906
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/enum.mjs
46907
+ function IsEnumValue(value) {
46908
+ return exports_guard.IsString(value) || exports_guard.IsNumber(value);
46909
+ }
46327
46910
  function Enum(value, options) {
46328
46911
  const values = IsTypeScriptEnumLike(value) ? TypeScriptEnumToEnumValues(value) : value;
46329
46912
  return exports_memory.Create({ "~kind": "Enum" }, { enum: values }, options);
@@ -46332,7 +46915,7 @@ function IsEnum(value) {
46332
46915
  return IsKind(value, "Enum");
46333
46916
  }
46334
46917
 
46335
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/intersect.mjs
46918
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/intersect.mjs
46336
46919
  function Intersect(types, options = {}) {
46337
46920
  return exports_memory.Create({ "~kind": "Intersect" }, { allOf: types }, options);
46338
46921
  }
@@ -46342,11 +46925,11 @@ function IsIntersect(value) {
46342
46925
  function IntersectOptions(type) {
46343
46926
  return exports_memory.Discard(type, ["~kind", "allOf"]);
46344
46927
  }
46345
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/system/unreachable/unreachable.mjs
46928
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/system/unreachable/unreachable.mjs
46346
46929
  function Unreachable() {
46347
46930
  throw new Error("Unreachable");
46348
46931
  }
46349
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/system/hashing/hash.mjs
46932
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/system/hashing/hash.mjs
46350
46933
  var ByteMarker;
46351
46934
  (function(ByteMarker2) {
46352
46935
  ByteMarker2[ByteMarker2["Array"] = 0] = "Array";
@@ -46371,7 +46954,7 @@ var F64 = new Float64Array(1);
46371
46954
  var F64In = new DataView(F64.buffer);
46372
46955
  var F64Out = new Uint8Array(F64.buffer);
46373
46956
  var encoder2 = new TextEncoder;
46374
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/_codec.mjs
46957
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/_codec.mjs
46375
46958
  class EncodeBuilder {
46376
46959
  constructor(type, decode3) {
46377
46960
  this.type = type;
@@ -46410,14 +46993,14 @@ function Encode(type, callback) {
46410
46993
  function IsCodec(value) {
46411
46994
  return IsSchema(value) && exports_guard.HasPropertyKey(value, "~codec") && exports_guard.IsObject(value["~codec"]) && exports_guard.HasPropertyKey(value["~codec"], "encode") && exports_guard.HasPropertyKey(value["~codec"], "decode");
46412
46995
  }
46413
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/_immutable.mjs
46996
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/_immutable.mjs
46414
46997
  function Immutable(type) {
46415
46998
  return AddImmutable(type);
46416
46999
  }
46417
47000
  function IsImmutable(value) {
46418
47001
  return IsSchema(value) && exports_guard.HasPropertyKey(value, "~immutable");
46419
47002
  }
46420
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/_add_readonly.mjs
47003
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/action/_add_readonly.mjs
46421
47004
  function AddReadonlyDeferred(type, options = {}) {
46422
47005
  return Deferred("AddReadonly", [type], options);
46423
47006
  }
@@ -46425,14 +47008,14 @@ function AddReadonly(type, options = {}) {
46425
47008
  return AddReadonlyAction(type, options);
46426
47009
  }
46427
47010
 
46428
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/_readonly.mjs
47011
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/_readonly.mjs
46429
47012
  function Readonly(type) {
46430
47013
  return AddReadonly(type);
46431
47014
  }
46432
47015
  function IsReadonly(value) {
46433
47016
  return IsSchema(value) && exports_guard.HasPropertyKey(value, "~readonly");
46434
47017
  }
46435
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/_refine.mjs
47018
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/_refine.mjs
46436
47019
  function RefineAdd(type, refinement) {
46437
47020
  const refinements = IsRefine(type) ? [...type["~refine"], refinement] : [refinement];
46438
47021
  return exports_memory.Update(type, { "~refine": refinements }, {});
@@ -46450,7 +47033,7 @@ function IsRefinement(value) {
46450
47033
  function IsRefine(value) {
46451
47034
  return IsSchema(value) && exports_guard.HasPropertyKey(value, "~refine") && exports_guard.IsArray(value["~refine"]) && exports_guard.Every(value["~refine"], 0, (value2) => IsRefinement(value2));
46452
47035
  }
46453
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/bigint.mjs
47036
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/bigint.mjs
46454
47037
  var BigIntPattern = "-?(?:0|[1-9][0-9]*)n";
46455
47038
  function BigInt2(options) {
46456
47039
  return exports_memory.Create({ "~kind": "BigInt" }, { type: "bigint" }, options);
@@ -46458,21 +47041,21 @@ function BigInt2(options) {
46458
47041
  function IsBigInt2(value) {
46459
47042
  return IsKind(value, "BigInt");
46460
47043
  }
46461
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/boolean.mjs
47044
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/boolean.mjs
46462
47045
  function Boolean2(options) {
46463
47046
  return exports_memory.Create({ "~kind": "Boolean" }, { type: "boolean" }, options);
46464
47047
  }
46465
47048
  function IsBoolean3(value) {
46466
47049
  return IsKind(value, "Boolean");
46467
47050
  }
46468
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/identifier.mjs
47051
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/identifier.mjs
46469
47052
  function Identifier(name) {
46470
47053
  return exports_memory.Create({ "~kind": "Identifier" }, { name });
46471
47054
  }
46472
47055
  function IsIdentifier(value) {
46473
47056
  return IsKind(value, "Identifier");
46474
47057
  }
46475
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/integer.mjs
47058
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/integer.mjs
46476
47059
  var IntegerPattern = "-?(?:0|[1-9][0-9]*)";
46477
47060
  function Integer(options) {
46478
47061
  return exports_memory.Create({ "~kind": "Integer" }, { type: "integer" }, options);
@@ -46480,7 +47063,7 @@ function Integer(options) {
46480
47063
  function IsInteger2(value) {
46481
47064
  return IsKind(value, "Integer");
46482
47065
  }
46483
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/literal.mjs
47066
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/literal.mjs
46484
47067
  class InvalidLiteralValue extends Error {
46485
47068
  constructor(value) {
46486
47069
  super(`Invalid Literal value`);
@@ -46512,14 +47095,14 @@ function IsLiteralString(value) {
46512
47095
  function IsLiteral(value) {
46513
47096
  return IsKind(value, "Literal");
46514
47097
  }
46515
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/null.mjs
47098
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/null.mjs
46516
47099
  function Null(options) {
46517
47100
  return exports_memory.Create({ "~kind": "Null" }, { type: "null" }, options);
46518
47101
  }
46519
47102
  function IsNull2(value) {
46520
47103
  return IsKind(value, "Null");
46521
47104
  }
46522
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/number.mjs
47105
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/number.mjs
46523
47106
  var NumberPattern = "-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?";
46524
47107
  function Number2(options) {
46525
47108
  return exports_memory.Create({ "~kind": "Number" }, { type: "number" }, options);
@@ -46527,14 +47110,14 @@ function Number2(options) {
46527
47110
  function IsNumber3(value) {
46528
47111
  return IsKind(value, "Number");
46529
47112
  }
46530
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/symbol.mjs
47113
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/symbol.mjs
46531
47114
  function Symbol2(options) {
46532
47115
  return exports_memory.Create({ "~kind": "Symbol" }, { type: "symbol" }, options);
46533
47116
  }
46534
47117
  function IsSymbol2(value) {
46535
47118
  return IsKind(value, "Symbol");
46536
47119
  }
46537
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/parameter.mjs
47120
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/parameter.mjs
46538
47121
  function Parameter(...args) {
46539
47122
  const [name, extends_, equals] = exports_arguments.Match(args, {
46540
47123
  3: (name2, extends_2, equals2) => [name2, extends_2, equals2],
@@ -46546,7 +47129,7 @@ function Parameter(...args) {
46546
47129
  function IsParameter(value) {
46547
47130
  return IsKind(value, "Parameter");
46548
47131
  }
46549
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/string.mjs
47132
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/string.mjs
46550
47133
  var StringPattern = ".*";
46551
47134
  function String2(options) {
46552
47135
  return exports_memory.Create({ "~kind": "String" }, { type: "string" }, options);
@@ -46555,7 +47138,7 @@ function IsString3(value) {
46555
47138
  return IsKind(value, "String");
46556
47139
  }
46557
47140
 
46558
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/union.mjs
47141
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/union.mjs
46559
47142
  function Union(anyOf, options = {}) {
46560
47143
  return exports_memory.Create({ "~kind": "Union" }, { anyOf }, options);
46561
47144
  }
@@ -46566,14 +47149,14 @@ function UnionOptions(type) {
46566
47149
  return exports_memory.Discard(type, ["~kind", "anyOf"]);
46567
47150
  }
46568
47151
 
46569
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/patterns/pattern.mjs
47152
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/patterns/pattern.mjs
46570
47153
  function ParsePatternIntoTypes(pattern) {
46571
47154
  const parsed = Pattern(pattern);
46572
47155
  const result = exports_guard.IsEqual(parsed.length, 2) ? parsed[0] : [];
46573
47156
  return result;
46574
47157
  }
46575
47158
 
46576
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/template_literal/is_finite.mjs
47159
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/template_literal/is_finite.mjs
46577
47160
  function FromLiteral(_value) {
46578
47161
  return true;
46579
47162
  }
@@ -46592,12 +47175,12 @@ function IsTemplateLiteralFinite(types) {
46592
47175
  return result;
46593
47176
  }
46594
47177
 
46595
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/template_literal/create.mjs
47178
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/template_literal/create.mjs
46596
47179
  function TemplateLiteralCreate(pattern) {
46597
47180
  return exports_memory.Create({ ["~kind"]: "TemplateLiteral" }, { type: "string", pattern }, {});
46598
47181
  }
46599
47182
 
46600
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/template_literal/decode.mjs
47183
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/template_literal/decode.mjs
46601
47184
  function FromLiteralPush(variants, value, result = []) {
46602
47185
  return exports_guard.ShiftLeft(variants, (left, right) => FromLiteralPush(right, value, [...result, `${left}${value}`]), () => result);
46603
47186
  }
@@ -46637,24 +47220,24 @@ function TemplateLiteralDecode(pattern) {
46637
47220
  return result;
46638
47221
  }
46639
47222
 
46640
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/record/record_create.mjs
47223
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/record/record_create.mjs
46641
47224
  function CreateRecord(key, value) {
46642
47225
  const type = "object";
46643
47226
  const patternProperties = { [key]: value };
46644
47227
  return exports_memory.Create({ ["~kind"]: "Record" }, { type, patternProperties });
46645
47228
  }
46646
47229
 
46647
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/record/from_key_any.mjs
47230
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/record/from_key_any.mjs
46648
47231
  function FromAnyKey(value) {
46649
47232
  return CreateRecord(StringKey, value);
46650
47233
  }
46651
47234
 
46652
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/record/from_key_boolean.mjs
47235
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/record/from_key_boolean.mjs
46653
47236
  function FromBooleanKey(value) {
46654
47237
  return _Object_({ true: value, false: value });
46655
47238
  }
46656
47239
 
46657
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/tuple.mjs
47240
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/tuple.mjs
46658
47241
  function Tuple(types, options = {}) {
46659
47242
  const [items, minItems, additionalItems] = [types, types.length, false];
46660
47243
  return exports_memory.Create({ ["~kind"]: "Tuple" }, { type: "array", additionalItems, items, minItems }, options);
@@ -46666,7 +47249,7 @@ function TupleOptions(type) {
46666
47249
  return exports_memory.Discard(type, ["~kind", "type", "items", "minItems", "additionalItems"]);
46667
47250
  }
46668
47251
 
46669
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs
47252
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs
46670
47253
  function RemoveReadonlyOperation(type) {
46671
47254
  return exports_memory.Discard(type, ["~readonly"]);
46672
47255
  }
@@ -46679,7 +47262,7 @@ function RemoveReadonlyInstantiate(context, state, type, options) {
46679
47262
  return RemoveReadonlyAction(instantiatedType, options);
46680
47263
  }
46681
47264
 
46682
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/_remove_readonly.mjs
47265
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/action/_remove_readonly.mjs
46683
47266
  function RemoveReadonlyDeferred(type, options = {}) {
46684
47267
  return Deferred("RemoveReadonly", [type], options);
46685
47268
  }
@@ -46687,7 +47270,7 @@ function RemoveReadonly(type, options = {}) {
46687
47270
  return RemoveReadonlyAction(type, options);
46688
47271
  }
46689
47272
 
46690
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs
47273
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs
46691
47274
  function RemoveOptionalOperation(type) {
46692
47275
  return exports_memory.Discard(type, ["~optional"]);
46693
47276
  }
@@ -46700,7 +47283,7 @@ function RemoveOptionalInstantiate(context, state, type, options) {
46700
47283
  return RemoveOptionalAction(instantiatedType, options);
46701
47284
  }
46702
47285
 
46703
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/_remove_optional.mjs
47286
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/action/_remove_optional.mjs
46704
47287
  function RemoveOptionalDeferred(type, options = {}) {
46705
47288
  return Deferred("RemoveOptional", [type], options);
46706
47289
  }
@@ -46708,7 +47291,7 @@ function RemoveOptional(type, options = {}) {
46708
47291
  return RemoveOptionalAction(type, options);
46709
47292
  }
46710
47293
 
46711
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/tuple/to_object.mjs
47294
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/tuple/to_object.mjs
46712
47295
  function TupleElementsToProperties(types) {
46713
47296
  const result = types.reduceRight((result2, right, index) => {
46714
47297
  return { [index]: right, ...result2 };
@@ -46721,7 +47304,7 @@ function TupleToObject(type) {
46721
47304
  return result;
46722
47305
  }
46723
47306
 
46724
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/evaluate/composite.mjs
47307
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/evaluate/composite.mjs
46725
47308
  function IsReadonlyProperty(left, right) {
46726
47309
  return IsReadonly(left) ? IsReadonly(right) ? true : false : false;
46727
47310
  }
@@ -46755,13 +47338,13 @@ function Composite(left, right) {
46755
47338
  return _Object_(properties);
46756
47339
  }
46757
47340
 
46758
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/evaluate/narrow.mjs
47341
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/evaluate/narrow.mjs
46759
47342
  function Narrow(left, right) {
46760
47343
  const result = Compare(left, right);
46761
47344
  return exports_guard.IsEqual(result, ResultLeftInside) ? left : exports_guard.IsEqual(result, ResultRightInside) ? right : exports_guard.IsEqual(result, ResultEqual) ? right : Never();
46762
47345
  }
46763
47346
 
46764
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/evaluate/distribute.mjs
47347
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/evaluate/distribute.mjs
46765
47348
  function IsObjectLike(type) {
46766
47349
  return IsObject2(type) || IsTuple(type);
46767
47350
  }
@@ -46790,7 +47373,7 @@ function Distribute(types, result = []) {
46790
47373
  return exports_guard.ShiftLeft(types, (left, right) => IsUnion(left) ? Distribute(right, DistributeUnion(left.anyOf, result)) : Distribute(right, DistributeType(left, result)), () => result);
46791
47374
  }
46792
47375
 
46793
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/exclude/operation.mjs
47376
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/exclude/operation.mjs
46794
47377
  function ExcludeType(left, right) {
46795
47378
  const check2 = Extends({}, left, right);
46796
47379
  const result = exports_result.IsExtendsTrueLike(check2) ? [] : [left];
@@ -46809,7 +47392,7 @@ function ExcludeOperation(left, right) {
46809
47392
  return result;
46810
47393
  }
46811
47394
 
46812
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs
47395
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs
46813
47396
  function EvaluateDependent(if_, then_, else_) {
46814
47397
  const intersect = Intersect([if_, then_]);
46815
47398
  const excluded = ExcludeOperation(else_, if_);
@@ -46844,43 +47427,43 @@ function EvaluateUnionFast(types) {
46844
47427
  return result;
46845
47428
  }
46846
47429
 
46847
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/record/from_key_enum.mjs
47430
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/record/from_key_enum.mjs
46848
47431
  function FromEnumKey(values, value) {
46849
47432
  const unionKey = EvaluateEnum(values);
46850
47433
  const result = FromKey(unionKey, value);
46851
47434
  return result;
46852
47435
  }
46853
47436
 
46854
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/record/from_key_integer.mjs
47437
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/record/from_key_integer.mjs
46855
47438
  function FromIntegerKey(_key, value) {
46856
47439
  const result = CreateRecord(IntegerKey, value);
46857
47440
  return result;
46858
47441
  }
46859
47442
 
46860
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/record/from_key_intersect.mjs
47443
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/record/from_key_intersect.mjs
46861
47444
  function FromIntersectKey(types, value) {
46862
47445
  const evaluatedKey = EvaluateIntersect(types);
46863
47446
  const result = FromKey(evaluatedKey, value);
46864
47447
  return result;
46865
47448
  }
46866
47449
 
46867
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/record/from_key_literal.mjs
47450
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/record/from_key_literal.mjs
46868
47451
  function FromLiteralKey(key, value) {
46869
47452
  return exports_guard.IsString(key) || exports_guard.IsNumber(key) ? _Object_({ [key]: value }) : exports_guard.IsEqual(key, false) ? _Object_({ false: value }) : exports_guard.IsEqual(key, true) ? _Object_({ true: value }) : _Object_({});
46870
47453
  }
46871
47454
 
46872
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/record/from_key_number.mjs
47455
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/record/from_key_number.mjs
46873
47456
  function FromNumberKey(_key, value) {
46874
47457
  const result = CreateRecord(NumberKey, value);
46875
47458
  return result;
46876
47459
  }
46877
47460
 
46878
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/record/from_key_string.mjs
47461
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/record/from_key_string.mjs
46879
47462
  function FromStringKey(key, value) {
46880
47463
  return exports_guard.HasPropertyKey(key, "pattern") && (exports_guard.IsString(key.pattern) || key.pattern instanceof RegExp) ? CreateRecord(key.pattern.toString(), value) : CreateRecord(StringKey, value);
46881
47464
  }
46882
47465
 
46883
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/record/from_key_template_literal.mjs
47466
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/record/from_key_template_literal.mjs
46884
47467
  function FromTemplateKey(pattern, value) {
46885
47468
  const types = ParsePatternIntoTypes(pattern);
46886
47469
  const finite = IsTemplateLiteralFinite(types);
@@ -46888,7 +47471,7 @@ function FromTemplateKey(pattern, value) {
46888
47471
  return result;
46889
47472
  }
46890
47473
 
46891
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/evaluate/flatten.mjs
47474
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/evaluate/flatten.mjs
46892
47475
  function FlattenType(type) {
46893
47476
  const result = IsUnion(type) ? Flatten(type.anyOf) : [type];
46894
47477
  return result;
@@ -46899,7 +47482,7 @@ function Flatten(types) {
46899
47482
  }, []);
46900
47483
  }
46901
47484
 
46902
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/record/from_key_union.mjs
47485
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/record/from_key_union.mjs
46903
47486
  function StringOrNumberCheck(types) {
46904
47487
  return types.some((type) => IsString3(type) || IsNumber3(type) || IsInteger2(type));
46905
47488
  }
@@ -46922,13 +47505,13 @@ function FromUnionKey(types, value) {
46922
47505
  return IsSchema(record2) ? record2 : CreateObject(flattened, value);
46923
47506
  }
46924
47507
 
46925
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/record/from_key.mjs
47508
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/record/from_key.mjs
46926
47509
  function FromKey(key, value) {
46927
47510
  const result = IsAny(key) ? FromAnyKey(value) : IsBoolean3(key) ? FromBooleanKey(value) : IsEnum(key) ? FromEnumKey(key.enum, value) : IsInteger2(key) ? FromIntegerKey(key, value) : IsIntersect(key) ? FromIntersectKey(key.allOf, value) : IsLiteral(key) ? FromLiteralKey(key.const, value) : IsNumber3(key) ? FromNumberKey(key, value) : IsUnion(key) ? FromUnionKey(key.anyOf, value) : IsString3(key) ? FromStringKey(key, value) : IsTemplateLiteral(key) ? FromTemplateKey(key.pattern, value) : _Object_({});
46928
47511
  return result;
46929
47512
  }
46930
47513
 
46931
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/record/instantiate.mjs
47514
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/record/instantiate.mjs
46932
47515
  function RecordAction(key, value, options) {
46933
47516
  const result = CanInstantiate([key]) ? exports_memory.Update(FromKey(key, value), {}, options) : RecordDeferred(key, value, options);
46934
47517
  return result;
@@ -46939,7 +47522,7 @@ function RecordInstantiate(context, state, key, value, options) {
46939
47522
  return RecordAction(instantiatedKey, instantiatedValue, options);
46940
47523
  }
46941
47524
 
46942
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/record.mjs
47525
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/record.mjs
46943
47526
  var IntegerKey = `^${IntegerPattern}$`;
46944
47527
  var NumberKey = `^${NumberPattern}$`;
46945
47528
  var StringKey = `^${StringPattern}$`;
@@ -46970,35 +47553,35 @@ function RecordValue(type) {
46970
47553
  function IsRecord(value) {
46971
47554
  return IsKind(value, "Record");
46972
47555
  }
46973
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/rest.mjs
47556
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/rest.mjs
46974
47557
  function Rest(type) {
46975
47558
  return exports_memory.Create({ "~kind": "Rest" }, { type: "rest", items: type }, {});
46976
47559
  }
46977
47560
  function IsRest(value) {
46978
47561
  return IsKind(value, "Rest");
46979
47562
  }
46980
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/this.mjs
47563
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/this.mjs
46981
47564
  function This(options) {
46982
47565
  return exports_memory.Create({ ["~kind"]: "This" }, { $ref: "#" }, options);
46983
47566
  }
46984
47567
  function IsThis(value) {
46985
47568
  return IsKind(value, "This");
46986
47569
  }
46987
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/undefined.mjs
47570
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/undefined.mjs
46988
47571
  function Undefined(options) {
46989
47572
  return exports_memory.Create({ "~kind": "Undefined" }, { type: "undefined" }, options);
46990
47573
  }
46991
47574
  function IsUndefined2(value) {
46992
47575
  return IsKind(value, "Undefined");
46993
47576
  }
46994
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/void.mjs
47577
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/void.mjs
46995
47578
  function Void(options) {
46996
47579
  return exports_memory.Create({ "~kind": "Void" }, { type: "void" }, options);
46997
47580
  }
46998
47581
  function IsVoid(value) {
46999
47582
  return IsKind(value, "Void");
47000
47583
  }
47001
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/mapping.mjs
47584
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/script/mapping.mjs
47002
47585
  function IntrinsicOrCall(ref2, parameters) {
47003
47586
  return exports_guard.IsEqual(ref2, "Array") ? _Array_(parameters[0]) : exports_guard.IsEqual(ref2, "Capitalize") ? CapitalizeDeferred(parameters[0]) : exports_guard.IsEqual(ref2, "ConstructorParameters") ? ConstructorParametersDeferred(parameters[0]) : exports_guard.IsEqual(ref2, "Evaluate") ? EvaluateDeferred(parameters[0]) : exports_guard.IsEqual(ref2, "Exclude") ? ExcludeDeferred(parameters[0], parameters[1]) : exports_guard.IsEqual(ref2, "Extract") ? ExtractDeferred(parameters[0], parameters[1]) : exports_guard.IsEqual(ref2, "Index") ? IndexDeferred(parameters[0], parameters[1]) : exports_guard.IsEqual(ref2, "InstanceType") ? InstanceTypeDeferred(parameters[0]) : exports_guard.IsEqual(ref2, "Lowercase") ? LowercaseDeferred(parameters[0]) : exports_guard.IsEqual(ref2, "NonNullable") ? NonNullableDeferred(parameters[0]) : exports_guard.IsEqual(ref2, "Omit") ? OmitDeferred(parameters[0], parameters[1]) : exports_guard.IsEqual(ref2, "Parameters") ? ParametersDeferred(parameters[0]) : exports_guard.IsEqual(ref2, "Partial") ? PartialDeferred(parameters[0]) : exports_guard.IsEqual(ref2, "Pick") ? PickDeferred(parameters[0], parameters[1]) : exports_guard.IsEqual(ref2, "Readonly") ? ReadonlyObjectDeferred(parameters[0]) : exports_guard.IsEqual(ref2, "KeyOf") ? KeyOfDeferred(parameters[0]) : exports_guard.IsEqual(ref2, "Record") ? RecordDeferred(parameters[0], parameters[1]) : exports_guard.IsEqual(ref2, "Required") ? RequiredDeferred(parameters[0]) : exports_guard.IsEqual(ref2, "ReturnType") ? ReturnTypeDeferred(parameters[0]) : exports_guard.IsEqual(ref2, "Uncapitalize") ? UncapitalizeDeferred(parameters[0]) : exports_guard.IsEqual(ref2, "Uppercase") ? UppercaseDeferred(parameters[0]) : CallConstruct(Ref(ref2), parameters);
47004
47587
  }
@@ -47435,7 +48018,7 @@ function ModuleMapping(input) {
47435
48018
  function ScriptMapping(input) {
47436
48019
  return input;
47437
48020
  }
47438
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/internal/match.mjs
48021
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/script/token/internal/match.mjs
47439
48022
  function IsMatch(value) {
47440
48023
  return IsEqual(value.length, 2);
47441
48024
  }
@@ -47443,7 +48026,7 @@ function Match2(input, ok, fail) {
47443
48026
  return IsMatch(input) ? ok(input[0], input[1]) : fail();
47444
48027
  }
47445
48028
 
47446
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/internal/take.mjs
48029
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/script/token/internal/take.mjs
47447
48030
  function TakeVariant(variant, input) {
47448
48031
  return IsEqual(input.indexOf(variant), 0) ? [variant, input.slice(variant.length)] : [];
47449
48032
  }
@@ -47456,7 +48039,7 @@ function Take(variants, input) {
47456
48039
  return [];
47457
48040
  }
47458
48041
 
47459
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/internal/char.mjs
48042
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/script/token/internal/char.mjs
47460
48043
  function Range(start, end) {
47461
48044
  return Array.from({ length: end - start + 1 }, (_, i) => String.fromCharCode(start + i));
47462
48045
  }
@@ -47475,7 +48058,7 @@ var Dot = ".";
47475
48058
  var DollarSign = "$";
47476
48059
  var Hyphen = "-";
47477
48060
 
47478
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/internal/trim.mjs
48061
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/script/token/internal/trim.mjs
47479
48062
  var LineComment = "//";
47480
48063
  var OpenComment = "/*";
47481
48064
  var CloseComment = "*/";
@@ -47501,12 +48084,12 @@ function Trim(input) {
47501
48084
  return trimmed.startsWith(OpenComment) ? Trim(DiscardMultilineComment(trimmed.slice(2))) : trimmed.startsWith(LineComment) ? Trim(DiscardLineComment(trimmed.slice(2))) : trimmed;
47502
48085
  }
47503
48086
 
47504
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/internal/optional.mjs
48087
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/script/token/internal/optional.mjs
47505
48088
  function Optional2(value, input) {
47506
48089
  return Match2(Take([value], input), (Optional3, Rest2) => [Optional3, Rest2], () => ["", input]);
47507
48090
  }
47508
48091
 
47509
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/internal/many.mjs
48092
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/script/token/internal/many.mjs
47510
48093
  function IsDiscard(discard2, input) {
47511
48094
  return discard2.includes(input);
47512
48095
  }
@@ -47514,7 +48097,7 @@ function Many(allowed, discard2, input, result = "") {
47514
48097
  return Match2(Take(allowed, input), (Char, Rest2) => IsDiscard(discard2, Char) ? Many(allowed, discard2, Rest2, result) : Many(allowed, discard2, Rest2, `${result}${Char}`), () => [result, input]);
47515
48098
  }
47516
48099
 
47517
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/unsigned_integer.mjs
48100
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/script/token/unsigned_integer.mjs
47518
48101
  function TakeNonZero(input) {
47519
48102
  return Take(NonZero, input);
47520
48103
  }
@@ -47529,7 +48112,7 @@ function UnsignedInteger(input) {
47529
48112
  return TakeUnsignedInteger(Trim(input));
47530
48113
  }
47531
48114
 
47532
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/integer.mjs
48115
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/script/token/integer.mjs
47533
48116
  function TakeSign(input) {
47534
48117
  return Optional2(Hyphen, input);
47535
48118
  }
@@ -47540,21 +48123,21 @@ function Integer2(input) {
47540
48123
  return TakeSignedInteger(Trim(input));
47541
48124
  }
47542
48125
 
47543
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/bigint.mjs
48126
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/script/token/bigint.mjs
47544
48127
  function TakeBigInt(input) {
47545
48128
  return Match2(Integer2(input), (Integer3, IntegerRest) => Match2(Take(["n"], IntegerRest), (_N, NRest) => [`${Integer3}`, NRest], () => []), () => []);
47546
48129
  }
47547
48130
  function BigInt3(input) {
47548
48131
  return TakeBigInt(input);
47549
48132
  }
47550
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/const.mjs
48133
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/script/token/const.mjs
47551
48134
  function TakeConst(const_, input) {
47552
48135
  return Take([const_], input);
47553
48136
  }
47554
48137
  function Const(const_, input) {
47555
48138
  return IsEqual(const_, "") ? ["", input] : const_.startsWith(NewLine) ? TakeConst(const_, TrimWhitespace(input)) : const_.startsWith(WhiteSpace) ? TakeConst(const_, input) : TakeConst(const_, Trim(input));
47556
48139
  }
47557
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/ident.mjs
48140
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/script/token/ident.mjs
47558
48141
  var Initial = [...Alpha, UnderScore, DollarSign];
47559
48142
  function TakeInitial(input) {
47560
48143
  return Take(Initial, input);
@@ -47569,7 +48152,7 @@ function TakeIdent(input) {
47569
48152
  function Ident(input) {
47570
48153
  return TakeIdent(Trim(input));
47571
48154
  }
47572
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/unsigned_number.mjs
48155
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/script/token/unsigned_number.mjs
47573
48156
  var AllowedDigits2 = [...Digit, UnderScore];
47574
48157
  function IsLeadingDot(input) {
47575
48158
  return IsMatch(Take([Dot], input));
@@ -47590,7 +48173,7 @@ function UnsignedNumber(input) {
47590
48173
  return TakeUnsignedNumber(Trim(input));
47591
48174
  }
47592
48175
 
47593
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/number.mjs
48176
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/script/token/number.mjs
47594
48177
  function TakeSign2(input) {
47595
48178
  return Optional2(Hyphen, input);
47596
48179
  }
@@ -47600,7 +48183,7 @@ function TakeSignedNumber(input) {
47600
48183
  function Number3(input) {
47601
48184
  return TakeSignedNumber(Trim(input));
47602
48185
  }
47603
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/until.mjs
48186
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/script/token/until.mjs
47604
48187
  function TakeOne(input) {
47605
48188
  const result = IsEqual(input, "") ? [] : [input.slice(0, 1), input.slice(1)];
47606
48189
  return result;
@@ -47612,7 +48195,7 @@ function Until(end, input, result = "") {
47612
48195
  return Match2(TakeOne(input), (One, Rest2) => IsInputMatchSentinal(end, input) ? [result, input] : Until(end, Rest2, `${result}${One}`), () => []);
47613
48196
  }
47614
48197
 
47615
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/span.mjs
48198
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/script/token/span.mjs
47616
48199
  function MultiLine(start, end, input) {
47617
48200
  return Match2(Take([start], input), (_, Rest2) => Match2(Until([end], Rest2), (Until2, UntilRest) => Match2(Take([end], UntilRest), (_2, Rest3) => [`${Until2}`, Rest3], () => []), () => []), () => []);
47618
48201
  }
@@ -47622,7 +48205,7 @@ function SingleLine(start, end, input) {
47622
48205
  function Span(start, end, multiLine, input) {
47623
48206
  return multiLine ? MultiLine(start, end, Trim(input)) : SingleLine(start, end, Trim(input));
47624
48207
  }
47625
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/string.mjs
48208
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/script/token/string.mjs
47626
48209
  function TakeInitial2(quotes, input) {
47627
48210
  return Take(quotes, input);
47628
48211
  }
@@ -47635,11 +48218,11 @@ function TakeString(quotes, input) {
47635
48218
  function String3(quotes, input) {
47636
48219
  return TakeString(quotes, Trim(input));
47637
48220
  }
47638
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/until_1.mjs
48221
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/script/token/until_1.mjs
47639
48222
  function Until_1(end, input) {
47640
48223
  return Match2(Until(end, input), (Until2, UntilRest) => IsEqual(Until2, "") ? [] : [Until2, UntilRest], () => []);
47641
48224
  }
47642
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/parser.mjs
48225
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/script/parser.mjs
47643
48226
  var If = (result, left, right = () => []) => result.length === 2 ? left(result) : right();
47644
48227
  var GenericParameterExtendsEquals = (input) => If(If(Ident(input), ([_0, input2]) => If(Const("extends", input2), ([_1, input3]) => If(Type(input3), ([_2, input4]) => If(Const("=", input4), ([_3, input5]) => If(Type(input5), ([_4, input6]) => [[_0, _1, _2, _3, _4], input6]))))), ([_0, input2]) => [GenericParameterExtendsEqualsMapping(_0), input2]);
47645
48228
  var GenericParameterExtends = (input) => If(If(Ident(input), ([_0, input2]) => If(Const("extends", input2), ([_1, input3]) => If(Type(input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [GenericParameterExtendsMapping(_0), input2]);
@@ -47777,14 +48360,14 @@ var ModuleDeclaration = (input) => If(If(ExportKeyword(input), ([_0, input2]) =>
47777
48360
  var Module = (input) => If(If(ModuleDeclaration(input), ([_0, input2]) => If(ModuleDeclarationList(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [ModuleMapping(_0), input2]);
47778
48361
  var Script = (input) => If(If(Module(input), ([_0, input2]) => [_0, input2], () => If(GenericType(input), ([_0, input2]) => [_0, input2], () => If(Type(input), ([_0, input2]) => [_0, input2], () => []))), ([_0, input2]) => [ScriptMapping(_0), input2]);
47779
48362
 
47780
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/patterns/template.mjs
48363
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/patterns/template.mjs
47781
48364
  function ParseTemplateIntoTypes(template) {
47782
48365
  const parsed = TemplateLiteralTypes(`\`${template}\``);
47783
48366
  const result = exports_guard.IsEqual(parsed.length, 2) ? parsed[0] : Unreachable();
47784
48367
  return result;
47785
48368
  }
47786
48369
 
47787
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/template_literal/encode.mjs
48370
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/template_literal/encode.mjs
47788
48371
  function JoinString(input) {
47789
48372
  return input.join("|");
47790
48373
  }
@@ -47841,7 +48424,7 @@ function TemplateLiteralEncode(types) {
47841
48424
  return result;
47842
48425
  }
47843
48426
 
47844
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/template_literal/instantiate.mjs
48427
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/template_literal/instantiate.mjs
47845
48428
  function TemplateLiteralAction(types, options) {
47846
48429
  const result = CanInstantiate(types) ? exports_memory.Update(TemplateLiteralEncode(types), {}, options) : TemplateLiteralDeferred(types, options);
47847
48430
  return result;
@@ -47851,7 +48434,7 @@ function TemplateLiteralInstantiate(context, state, types, options) {
47851
48434
  return TemplateLiteralAction(instantiatedTypes, options);
47852
48435
  }
47853
48436
 
47854
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/template_literal.mjs
48437
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/template_literal.mjs
47855
48438
  function TemplateLiteralDeferred(types, options = {}) {
47856
48439
  return Deferred("TemplateLiteral", [types], options);
47857
48440
  }
@@ -47873,7 +48456,7 @@ function IsTemplateLiteral(value) {
47873
48456
  return IsKind(value, "TemplateLiteral");
47874
48457
  }
47875
48458
 
47876
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/result.mjs
48459
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/extends/result.mjs
47877
48460
  var exports_result = {};
47878
48461
  __export(exports_result, {
47879
48462
  ExtendsFalse: () => ExtendsFalse,
@@ -47910,7 +48493,7 @@ function Match3(result, true_, false_) {
47910
48493
  return IsExtendsTrueLike(result) ? true_(result.inferred) : false_();
47911
48494
  }
47912
48495
 
47913
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/extends_right.mjs
48496
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/extends/extends_right.mjs
47914
48497
  function ExtendsRightInfer(inferred, name, left, right) {
47915
48498
  return Match3(ExtendsLeft(inferred, left, right), (checkInferred) => ExtendsTrue(exports_memory.Assign(exports_memory.Assign(inferred, checkInferred), { [name]: left })), () => ExtendsFalse());
47916
48499
  }
@@ -47938,12 +48521,12 @@ function ExtendsRight(inferred, left, right) {
47938
48521
  return IsAny(right) ? ExtendsRightAny(inferred, left) : IsDependent(right) ? ExtendsRightDependent(inferred, left, right.if, right.then, right.else) : IsEnum(right) ? ExtendsRightEnum(inferred, left, right.enum) : IsInfer(right) ? ExtendsRightInfer(inferred, right.name, left, right.extends) : IsIntersect(right) ? ExtendsRightIntersect(inferred, left, right.allOf) : IsTemplateLiteral(right) ? ExtendsRightTemplateLiteral(inferred, left, right.pattern) : IsUnion(right) ? ExtendsRightUnion(inferred, left, right.anyOf) : IsUnknown(right) ? ExtendsTrue(inferred) : ExtendsFalse();
47939
48522
  }
47940
48523
 
47941
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/any.mjs
48524
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/extends/any.mjs
47942
48525
  function ExtendsAny(inferred, left, right) {
47943
48526
  return IsInfer(right) ? ExtendsRight(inferred, left, right) : IsAny(right) ? ExtendsTrue(inferred) : IsUnknown(right) ? ExtendsTrue(inferred) : ExtendsUnion(inferred);
47944
48527
  }
47945
48528
 
47946
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/array.mjs
48529
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/extends/array.mjs
47947
48530
  function ExtendsImmutable(left, right) {
47948
48531
  const isImmutableLeft = IsImmutable(left);
47949
48532
  const isImmutableRight = IsImmutable(right);
@@ -47953,17 +48536,17 @@ function ExtendsArray(inferred, arrayLeft, left, right) {
47953
48536
  return IsArray2(right) ? ExtendsImmutable(arrayLeft, right) ? ExtendsLeft(inferred, left, right.items) : ExtendsFalse() : ExtendsRight(inferred, arrayLeft, right);
47954
48537
  }
47955
48538
 
47956
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/bigint.mjs
48539
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/extends/bigint.mjs
47957
48540
  function ExtendsBigInt(inferred, left, right) {
47958
48541
  return IsBigInt2(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
47959
48542
  }
47960
48543
 
47961
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/boolean.mjs
48544
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/extends/boolean.mjs
47962
48545
  function ExtendsBoolean(inferred, left, right) {
47963
48546
  return IsBoolean3(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
47964
48547
  }
47965
48548
 
47966
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/parameters.mjs
48549
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/extends/parameters.mjs
47967
48550
  function ParameterCompare(inferred, left, leftRest, right, rightRest) {
47968
48551
  const checkLeft = IsInfer(right) ? left : right;
47969
48552
  const checkRight = IsInfer(right) ? right : left;
@@ -47981,44 +48564,44 @@ function ExtendsParameters(inferred, left, right) {
47981
48564
  return ParametersLeft(inferred, left, right);
47982
48565
  }
47983
48566
 
47984
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/return_type.mjs
48567
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/extends/return_type.mjs
47985
48568
  function ExtendsReturnType(inferred, left, right) {
47986
48569
  return IsVoid(right) ? ExtendsTrue(inferred) : ExtendsLeft(inferred, left, right);
47987
48570
  }
47988
48571
 
47989
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/constructor.mjs
48572
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/extends/constructor.mjs
47990
48573
  function ExtendsConstructor(inferred, parameters, returnType, right) {
47991
48574
  return IsAny(right) ? ExtendsTrue(inferred) : IsUnknown(right) ? ExtendsTrue(inferred) : IsConstructor2(right) ? Match3(ExtendsParameters(inferred, parameters, right["parameters"]), (inferred2) => ExtendsReturnType(inferred2, returnType, right["instanceType"]), () => ExtendsFalse()) : ExtendsFalse();
47992
48575
  }
47993
48576
 
47994
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/dependent.mjs
48577
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/extends/dependent.mjs
47995
48578
  function ExtendsDependent(inferred, if_, then_, else_, right) {
47996
48579
  return Match3(ExtendsLeft(inferred, if_, right), () => ExtendsLeft(inferred, then_, right), () => ExtendsLeft(inferred, else_, right));
47997
48580
  }
47998
48581
 
47999
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/enum.mjs
48582
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/extends/enum.mjs
48000
48583
  function ExtendsEnum(inferred, left, right) {
48001
48584
  const evaluated = EvaluateEnum(left);
48002
48585
  return ExtendsLeft(inferred, evaluated, right);
48003
48586
  }
48004
48587
 
48005
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/function.mjs
48588
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/extends/function.mjs
48006
48589
  function ExtendsFunction(inferred, parameters, returnType, right) {
48007
48590
  return IsAny(right) ? ExtendsTrue(inferred) : IsUnknown(right) ? ExtendsTrue(inferred) : IsFunction2(right) ? Match3(ExtendsParameters(inferred, parameters, right["parameters"]), (inferred2) => ExtendsReturnType(inferred2, returnType, right["returnType"]), () => ExtendsFalse()) : ExtendsFalse();
48008
48591
  }
48009
48592
 
48010
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/integer.mjs
48593
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/extends/integer.mjs
48011
48594
  function ExtendsInteger(inferred, left, right) {
48012
48595
  return IsInteger2(right) ? ExtendsTrue(inferred) : IsNumber3(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
48013
48596
  }
48014
48597
 
48015
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/intersect.mjs
48598
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/extends/intersect.mjs
48016
48599
  function ExtendsIntersect(inferred, left, right) {
48017
48600
  const evaluated = EvaluateIntersect(left);
48018
48601
  return ExtendsLeft(inferred, evaluated, right);
48019
48602
  }
48020
48603
 
48021
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/literal.mjs
48604
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/extends/literal.mjs
48022
48605
  function ExtendsLiteralValue(inferred, left, right) {
48023
48606
  return left === right ? ExtendsTrue(inferred) : ExtendsFalse();
48024
48607
  }
@@ -48038,22 +48621,22 @@ function ExtendsLiteral(inferred, left, right) {
48038
48621
  return exports_guard.IsBigInt(left.const) ? ExtendsLiteralBigInt(inferred, left.const, right) : exports_guard.IsBoolean(left.const) ? ExtendsLiteralBoolean(inferred, left.const, right) : exports_guard.IsNumber(left.const) ? ExtendsLiteralNumber(inferred, left.const, right) : exports_guard.IsString(left.const) ? ExtendsLiteralString(inferred, left.const, right) : Unreachable();
48039
48622
  }
48040
48623
 
48041
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/never.mjs
48624
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/extends/never.mjs
48042
48625
  function ExtendsNever(inferred, left, right) {
48043
48626
  return IsInfer(right) ? ExtendsRight(inferred, left, right) : ExtendsTrue(inferred);
48044
48627
  }
48045
48628
 
48046
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/null.mjs
48629
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/extends/null.mjs
48047
48630
  function ExtendsNull(inferred, left, right) {
48048
48631
  return IsNull2(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
48049
48632
  }
48050
48633
 
48051
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/number.mjs
48634
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/extends/number.mjs
48052
48635
  function ExtendsNumber(inferred, left, right) {
48053
48636
  return IsNumber3(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
48054
48637
  }
48055
48638
 
48056
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/object.mjs
48639
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/extends/object.mjs
48057
48640
  function ExtendsPropertyOptional(inferred, left, right) {
48058
48641
  return IsOptional(left) ? IsOptional(right) ? ExtendsTrue(inferred) : ExtendsFalse() : ExtendsTrue(inferred);
48059
48642
  }
@@ -48101,7 +48684,7 @@ function ExtendsObject(inferred, left, right) {
48101
48684
  return IsRecord(right) ? ExtendsObjectToRecord(inferred, left, RecordPattern(right), RecordValue(right)) : IsObject2(right) ? ExtendsObjectToObject(inferred, left, right.properties) : ExtendsRight(inferred, _Object_(left), right);
48102
48685
  }
48103
48686
 
48104
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/record.mjs
48687
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/extends/record.mjs
48105
48688
  function FromObject2(inferred, properties2) {
48106
48689
  return exports_guard.IsEqual(exports_guard.Keys(properties2).length, 0) ? ExtendsTrue(inferred) : ExtendsFalse();
48107
48690
  }
@@ -48112,23 +48695,23 @@ function ExtendsRecord(inferred, leftPattern, leftValue, right) {
48112
48695
  return IsRecord(right) ? FromRecord(inferred, RecordPatternToType(leftPattern), leftValue, RecordPatternToType(RecordPattern(right)), RecordValue(right)) : IsObject2(right) ? FromObject2(inferred, right.properties) : IsAny(right) ? ExtendsTrue(inferred) : IsUnknown(right) ? ExtendsTrue(inferred) : ExtendsFalse();
48113
48696
  }
48114
48697
 
48115
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/string.mjs
48698
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/extends/string.mjs
48116
48699
  function ExtendsString(inferred, left, right) {
48117
48700
  return IsString3(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
48118
48701
  }
48119
48702
 
48120
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/symbol.mjs
48703
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/extends/symbol.mjs
48121
48704
  function ExtendsSymbol(inferred, left, right) {
48122
48705
  return IsSymbol2(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
48123
48706
  }
48124
48707
 
48125
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/template_literal.mjs
48708
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/extends/template_literal.mjs
48126
48709
  function ExtendsTemplateLiteral(inferred, left, right) {
48127
48710
  const evaluated = EvaluateTemplateLiteral(left);
48128
48711
  return ExtendsLeft(inferred, evaluated, right);
48129
48712
  }
48130
48713
 
48131
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/inference.mjs
48714
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/extends/inference.mjs
48132
48715
  function Inferrable(name, type) {
48133
48716
  return exports_memory.Create({ "~kind": "Inferrable" }, { name, type }, {});
48134
48717
  }
@@ -48155,7 +48738,7 @@ function InferUnionResult(inferred, name, left, right) {
48155
48738
  return exports_guard.IsArray(results) ? ExtendsTrue(exports_memory.Assign(inferred, { [name]: Union(results) })) : ExtendsFalse();
48156
48739
  }
48157
48740
 
48158
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/tuple.mjs
48741
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/extends/tuple.mjs
48159
48742
  function Reverse(types) {
48160
48743
  return [...types].reverse();
48161
48744
  }
@@ -48194,12 +48777,12 @@ function ExtendsTuple(inferred, left, right) {
48194
48777
  return IsTuple(right) ? ExtendsTupleToTuple(inferred, instantiatedLeft, right.items) : IsArray2(right) ? ExtendsTupleToArray(inferred, instantiatedLeft, right.items) : ExtendsRight(inferred, Tuple(instantiatedLeft), right);
48195
48778
  }
48196
48779
 
48197
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/undefined.mjs
48780
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/extends/undefined.mjs
48198
48781
  function ExtendsUndefined(inferred, left, right) {
48199
48782
  return IsVoid(right) ? ExtendsTrue(inferred) : IsUndefined2(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
48200
48783
  }
48201
48784
 
48202
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/union.mjs
48785
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/extends/union.mjs
48203
48786
  function ExtendsUnionSome(inferred, type, unionTypes) {
48204
48787
  return exports_guard.ShiftLeft(unionTypes, (head, tail) => Match3(ExtendsLeft(inferred, type, head), (inferred2) => ExtendsTrue(inferred2), () => ExtendsUnionSome(inferred, type, tail)), () => ExtendsFalse());
48205
48788
  }
@@ -48211,22 +48794,22 @@ function ExtendsUnion2(inferred, left, right) {
48211
48794
  return IsInferable(inferrable) ? InferUnionResult(inferred, inferrable.name, left, inferrable.type) : IsUnion(right) ? ExtendsUnionLeft(inferred, left, right.anyOf) : ExtendsUnionLeft(inferred, left, [right]);
48212
48795
  }
48213
48796
 
48214
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/unknown.mjs
48797
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/extends/unknown.mjs
48215
48798
  function ExtendsUnknown(inferred, left, right) {
48216
48799
  return IsInfer(right) ? ExtendsRight(inferred, left, right) : IsAny(right) ? ExtendsTrue(inferred) : IsUnknown(right) ? ExtendsTrue(inferred) : ExtendsFalse();
48217
48800
  }
48218
48801
 
48219
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/void.mjs
48802
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/extends/void.mjs
48220
48803
  function ExtendsVoid(inferred, left, right) {
48221
48804
  return IsVoid(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
48222
48805
  }
48223
48806
 
48224
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/extends_left.mjs
48807
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/extends/extends_left.mjs
48225
48808
  function ExtendsLeft(inferred, left, right) {
48226
48809
  return IsAny(left) ? ExtendsAny(inferred, left, right) : IsArray2(left) ? ExtendsArray(inferred, left, left.items, right) : IsBigInt2(left) ? ExtendsBigInt(inferred, left, right) : IsBoolean3(left) ? ExtendsBoolean(inferred, left, right) : IsConstructor2(left) ? ExtendsConstructor(inferred, left.parameters, left.instanceType, right) : IsDependent(left) ? ExtendsDependent(inferred, left.if, left.then, left.else, right) : IsEnum(left) ? ExtendsEnum(inferred, left.enum, right) : IsFunction2(left) ? ExtendsFunction(inferred, left.parameters, left.returnType, right) : IsInteger2(left) ? ExtendsInteger(inferred, left, right) : IsIntersect(left) ? ExtendsIntersect(inferred, left.allOf, right) : IsLiteral(left) ? ExtendsLiteral(inferred, left, right) : IsNever(left) ? ExtendsNever(inferred, left, right) : IsNull2(left) ? ExtendsNull(inferred, left, right) : IsNumber3(left) ? ExtendsNumber(inferred, left, right) : IsObject2(left) ? ExtendsObject(inferred, left.properties, right) : IsRecord(left) ? ExtendsRecord(inferred, RecordPattern(left), RecordValue(left), right) : IsString3(left) ? ExtendsString(inferred, left, right) : IsSymbol2(left) ? ExtendsSymbol(inferred, left, right) : IsTemplateLiteral(left) ? ExtendsTemplateLiteral(inferred, left.pattern, right) : IsTuple(left) ? ExtendsTuple(inferred, left.items, right) : IsUndefined2(left) ? ExtendsUndefined(inferred, left, right) : IsUnion(left) ? ExtendsUnion2(inferred, left.anyOf, right) : IsUnknown(left) ? ExtendsUnknown(inferred, left, right) : IsVoid(left) ? ExtendsVoid(inferred, left, right) : ExtendsFalse();
48227
48810
  }
48228
48811
 
48229
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/interface/instantiate.mjs
48812
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/interface/instantiate.mjs
48230
48813
  function InterfaceOperation(heritage, properties2) {
48231
48814
  const result = EvaluateIntersect([...heritage, _Object_(properties2)]);
48232
48815
  return result;
@@ -48241,7 +48824,7 @@ function InterfaceInstantiate(context, state, heritage, properties2, options) {
48241
48824
  return InterfaceAction(instantiatedHeritage, instantiatedProperties, options);
48242
48825
  }
48243
48826
 
48244
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/interface.mjs
48827
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/action/interface.mjs
48245
48828
  function InterfaceDeferred(heritage, properties2, options = {}) {
48246
48829
  return Deferred("Interface", [heritage, properties2], options);
48247
48830
  }
@@ -48252,7 +48835,7 @@ function Interface(heritage, properties2, options = {}) {
48252
48835
  return InterfaceAction(heritage, properties2, options);
48253
48836
  }
48254
48837
 
48255
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/cyclic/check.mjs
48838
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/cyclic/check.mjs
48256
48839
  function FromRef(stack, context, ref2) {
48257
48840
  return stack.includes(ref2) ? true : FromType3([...stack, ref2], context, context[ref2]);
48258
48841
  }
@@ -48271,7 +48854,7 @@ function CyclicCheck(stack, context, type) {
48271
48854
  return result;
48272
48855
  }
48273
48856
 
48274
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/cyclic/candidates.mjs
48857
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/cyclic/candidates.mjs
48275
48858
  function ResolveCandidateKeys(context, keys) {
48276
48859
  return keys.reduce((result, left) => {
48277
48860
  return CyclicCheck([left], context, context[left]) ? [...result, left] : result;
@@ -48282,7 +48865,7 @@ function CyclicCandidates(context) {
48282
48865
  const result = ResolveCandidateKeys(context, keys);
48283
48866
  return result;
48284
48867
  }
48285
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/cyclic/dependencies.mjs
48868
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/cyclic/dependencies.mjs
48286
48869
  function FromRef2(context, ref2, result) {
48287
48870
  return result.includes(ref2) ? result : (ref2 in context) ? FromType4(context, context[ref2], [...result, ref2]) : Unreachable();
48288
48871
  }
@@ -48302,7 +48885,7 @@ function CyclicDependencies(context, key, type) {
48302
48885
  const result = FromType4(context, type, [key]);
48303
48886
  return result;
48304
48887
  }
48305
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/cyclic/extends.mjs
48888
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/cyclic/extends.mjs
48306
48889
  function FromRef3(_ref) {
48307
48890
  return Any();
48308
48891
  }
@@ -48325,7 +48908,7 @@ function CyclicAnyFromParameters(defs, ref2) {
48325
48908
  function CyclicExtends(type) {
48326
48909
  return CyclicAnyFromParameters(type.$defs, type.$ref);
48327
48910
  }
48328
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/cyclic/instantiate.mjs
48911
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/cyclic/instantiate.mjs
48329
48912
  function CyclicInterface(context, heritage, properties2) {
48330
48913
  const instantiatedHeritage = InstantiateTypes(context, State([], []), heritage);
48331
48914
  const instantiatedProperties = InstantiateProperties({}, State([], []), properties2);
@@ -48346,7 +48929,7 @@ function InstantiateCyclic(context, ref2, type) {
48346
48929
  const result = Cyclic(definitions, ref2);
48347
48930
  return result;
48348
48931
  }
48349
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/cyclic/target.mjs
48932
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/cyclic/target.mjs
48350
48933
  function Resolve(defs, ref2) {
48351
48934
  return ref2 in defs ? IsRef(defs[ref2]) ? Resolve(defs, defs[ref2].$ref) : defs[ref2] : Never();
48352
48935
  }
@@ -48354,7 +48937,7 @@ function CyclicTarget(defs, ref2) {
48354
48937
  const result = Resolve(defs, ref2);
48355
48938
  return result;
48356
48939
  }
48357
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/extends.mjs
48940
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/extends/extends.mjs
48358
48941
  function Canonical(type) {
48359
48942
  return IsCyclic(type) ? CyclicExtends(type) : IsUnsafe(type) ? Unknown() : type;
48360
48943
  }
@@ -48363,7 +48946,7 @@ function Extends(inferred, left, right) {
48363
48946
  const canonicalRight = Canonical(right);
48364
48947
  return ExtendsLeft(inferred, canonicalLeft, canonicalRight);
48365
48948
  }
48366
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/evaluate/compare.mjs
48949
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/evaluate/compare.mjs
48367
48950
  var ResultEqual = "equal";
48368
48951
  var ResultDisjoint = "disjoint";
48369
48952
  var ResultLeftInside = "left-inside";
@@ -48376,7 +48959,7 @@ function Compare(left, right) {
48376
48959
  return exports_result.IsExtendsTrueLike(extendsCheck[0]) && exports_result.IsExtendsTrueLike(extendsCheck[1]) ? ResultEqual : exports_result.IsExtendsTrueLike(extendsCheck[0]) && exports_result.IsExtendsFalse(extendsCheck[1]) ? ResultLeftInside : exports_result.IsExtendsFalse(extendsCheck[0]) && exports_result.IsExtendsTrueLike(extendsCheck[1]) ? ResultRightInside : ResultDisjoint;
48377
48960
  }
48378
48961
 
48379
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/evaluate/broaden.mjs
48962
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/evaluate/broaden.mjs
48380
48963
  function BroadFilter(type, types) {
48381
48964
  return types.filter((left) => {
48382
48965
  return Compare(type, left) === ResultRightInside ? false : true;
@@ -48403,7 +48986,7 @@ function Broaden(types) {
48403
48986
  const flattened = Flatten(broadened);
48404
48987
  return flattened;
48405
48988
  }
48406
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/evaluate/instantiate.mjs
48989
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/evaluate/instantiate.mjs
48407
48990
  function EvaluateAction(type, options) {
48408
48991
  const result = exports_memory.Update(EvaluateType(type), {}, options);
48409
48992
  return result;
@@ -48412,7 +48995,7 @@ function EvaluateInstantiate(context, state, type, options) {
48412
48995
  const instantiatedType = InstantiateType(context, state, type);
48413
48996
  return EvaluateAction(instantiatedType, options);
48414
48997
  }
48415
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs
48998
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs
48416
48999
  function CollectDistributionNames(expression, result = []) {
48417
49000
  return IsDeferred(expression) && exports_guard.IsEqual(expression.action, "Conditional") ? IsRef(expression.parameters[0]) ? CollectDistributionNames(expression.parameters[2], CollectDistributionNames(expression.parameters[3], [...result, expression.parameters[0]["$ref"]])) : CollectDistributionNames(expression.parameters[2], CollectDistributionNames(expression.parameters[3], result)) : IsDeferred(expression) && exports_guard.IsEqual(expression.action, "Mapped") ? IsDeferred(expression.parameters[1]) && exports_guard.IsEqual(expression.parameters[1].action, "KeyOf") && IsRef(expression.parameters[1].parameters[0]) ? [...result, expression.parameters[1].parameters[0]["$ref"]] : result : result;
48418
49001
  }
@@ -48445,7 +49028,7 @@ function DistributeArguments(parameters, arguments_, expression) {
48445
49028
  return IsDeferred(expression) && exports_guard.IsEqual(expression.action, "Conditional") ? Distribute2(zippedArguments) : IsDeferred(expression) && exports_guard.IsEqual(expression.action, "Mapped") ? Distribute2(zippedArguments) : [arguments_];
48446
49029
  }
48447
49030
 
48448
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/call/resolve_target.mjs
49031
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/call/resolve_target.mjs
48449
49032
  function FromNotResolvable() {
48450
49033
  return ["(not-resolvable)", Never()];
48451
49034
  }
@@ -48465,7 +49048,7 @@ function ResolveTarget(context, target2, arguments_) {
48465
49048
  return FromType6(context, "(anonymous)", target2, arguments_);
48466
49049
  }
48467
49050
 
48468
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/call/resolve_arguments.mjs
49051
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/call/resolve_arguments.mjs
48469
49052
  function AssertArgumentExtends(name, type, extends_) {
48470
49053
  if (IsInfer(type) || IsCall(type) || exports_result.IsExtendsTrueLike(Extends({}, type, extends_)))
48471
49054
  return;
@@ -48489,7 +49072,7 @@ function ResolveArgumentsContext(context, state, parameters, arguments_) {
48489
49072
  return BindParameters(context, state, parameters, arguments_);
48490
49073
  }
48491
49074
 
48492
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/call/instantiate.mjs
49075
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/call/instantiate.mjs
48493
49076
  function Peek(state) {
48494
49077
  const result = exports_guard.IsGreaterThan(state.callstack.length, 0) ? state.callstack[state.callstack.length - 1] : "";
48495
49078
  return result;
@@ -48521,7 +49104,7 @@ function CallInstantiate(context, state, target2, arguments_) {
48521
49104
  return result;
48522
49105
  }
48523
49106
 
48524
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/call.mjs
49107
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/types/call.mjs
48525
49108
  function CallConstruct(target2, arguments_) {
48526
49109
  return exports_memory.Create({ ["~kind"]: "Call" }, { type: "call", target: target2, arguments: arguments_ }, {});
48527
49110
  }
@@ -48532,7 +49115,7 @@ function IsCall(value) {
48532
49115
  return IsKind(value, "Call");
48533
49116
  }
48534
49117
 
48535
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/immutable/instantiate_remove.mjs
49118
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/immutable/instantiate_remove.mjs
48536
49119
  function RemoveImmutableOperation(type) {
48537
49120
  return exports_memory.Discard(type, ["~immutable"]);
48538
49121
  }
@@ -48545,35 +49128,35 @@ function RemoveImmutableInstantiate(context, state, type, options) {
48545
49128
  return RemoveImmutableAction(instantiatedType, options);
48546
49129
  }
48547
49130
 
48548
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/intrinsics/mapping.mjs
49131
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/intrinsics/mapping.mjs
48549
49132
  function ApplyMapping(mapping, value) {
48550
49133
  return mapping(value);
48551
49134
  }
48552
49135
 
48553
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/intrinsics/from_literal.mjs
49136
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/intrinsics/from_literal.mjs
48554
49137
  function FromLiteral3(mapping, value) {
48555
49138
  return exports_guard.IsString(value) ? Literal(ApplyMapping(mapping, value)) : Literal(value);
48556
49139
  }
48557
49140
 
48558
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.mjs
49141
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.mjs
48559
49142
  function FromTemplateLiteral(mapping, pattern) {
48560
49143
  const evaluated = EvaluateTemplateLiteral(pattern);
48561
49144
  const result = FromType7(mapping, evaluated);
48562
49145
  return result;
48563
49146
  }
48564
49147
 
48565
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/intrinsics/from_union.mjs
49148
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/intrinsics/from_union.mjs
48566
49149
  function FromUnion2(mapping, types) {
48567
49150
  const result = types.map((type) => FromType7(mapping, type));
48568
49151
  return Union(result);
48569
49152
  }
48570
49153
 
48571
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/intrinsics/from_type.mjs
49154
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/intrinsics/from_type.mjs
48572
49155
  function FromType7(mapping, type) {
48573
49156
  return IsLiteral(type) ? FromLiteral3(mapping, type.const) : IsTemplateLiteral(type) ? FromTemplateLiteral(mapping, type.pattern) : IsUnion(type) ? FromUnion2(mapping, type.anyOf) : type;
48574
49157
  }
48575
49158
 
48576
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/capitalize.mjs
49159
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/action/capitalize.mjs
48577
49160
  function CapitalizeDeferred(type, options = {}) {
48578
49161
  return Deferred("Capitalize", [type], options);
48579
49162
  }
@@ -48581,7 +49164,7 @@ function Capitalize(type, options = {}) {
48581
49164
  return CapitalizeAction(type, options);
48582
49165
  }
48583
49166
 
48584
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/lowercase.mjs
49167
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/action/lowercase.mjs
48585
49168
  function LowercaseDeferred(type, options = {}) {
48586
49169
  return Deferred("Lowercase", [type], options);
48587
49170
  }
@@ -48589,7 +49172,7 @@ function Lowercase(type, options = {}) {
48589
49172
  return LowercaseAction(type, options);
48590
49173
  }
48591
49174
 
48592
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/uncapitalize.mjs
49175
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/action/uncapitalize.mjs
48593
49176
  function UncapitalizeDeferred(type, options = {}) {
48594
49177
  return Deferred("Uncapitalize", [type], options);
48595
49178
  }
@@ -48597,7 +49180,7 @@ function Uncapitalize(type, options = {}) {
48597
49180
  return UncapitalizeAction(type, options);
48598
49181
  }
48599
49182
 
48600
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/uppercase.mjs
49183
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/action/uppercase.mjs
48601
49184
  function UppercaseDeferred(type, options = {}) {
48602
49185
  return Deferred("Uppercase", [type], options);
48603
49186
  }
@@ -48605,7 +49188,7 @@ function Uppercase(type, options = {}) {
48605
49188
  return UppercaseAction(type, options);
48606
49189
  }
48607
49190
 
48608
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/intrinsics/instantiate.mjs
49191
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/intrinsics/instantiate.mjs
48609
49192
  var CapitalizeMapping = (input) => input[0].toUpperCase() + input.slice(1);
48610
49193
  var LowercaseMapping = (input) => input.toLowerCase();
48611
49194
  var UncapitalizeMapping = (input) => input[0].toLowerCase() + input.slice(1);
@@ -48643,7 +49226,7 @@ function UppercaseInstantiate(context, state, type, options) {
48643
49226
  return UppercaseAction(instantiatedType, options);
48644
49227
  }
48645
49228
 
48646
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/conditional.mjs
49229
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/action/conditional.mjs
48647
49230
  function ConditionalDeferred(left, right, true_, false_, options = {}) {
48648
49231
  return Deferred("Conditional", [left, right, true_, false_], options);
48649
49232
  }
@@ -48651,7 +49234,7 @@ function Conditional(left, right, true_, false_, options = {}) {
48651
49234
  return ConditionalAction({}, State([], []), left, right, true_, false_, options);
48652
49235
  }
48653
49236
 
48654
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/conditional/instantiate.mjs
49237
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/conditional/instantiate.mjs
48655
49238
  function ConditionalOperation(context, state, left, right, true_, false_) {
48656
49239
  const extendsResult = Extends(context, left, right);
48657
49240
  return exports_result.IsExtendsUnion(extendsResult) ? Union([InstantiateType(extendsResult.inferred, state, true_), InstantiateType(context, state, false_)]) : exports_result.IsExtendsTrue(extendsResult) ? InstantiateType(extendsResult.inferred, state, true_) : InstantiateType(context, state, false_);
@@ -48665,7 +49248,7 @@ function ConditionalInstantiate(context, state, left, right, true_, false_, opti
48665
49248
  const instantiatedRight = InstantiateType(context, state, right);
48666
49249
  return ConditionalAction(context, state, instantiatedLeft, instantiatedRight, true_, false_, options);
48667
49250
  }
48668
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/constructor_parameters.mjs
49251
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/action/constructor_parameters.mjs
48669
49252
  function ConstructorParametersDeferred(type, options = {}) {
48670
49253
  return Deferred("ConstructorParameters", [type], options);
48671
49254
  }
@@ -48673,7 +49256,7 @@ function ConstructorParameters(type, options = {}) {
48673
49256
  return ConstructorParametersAction(type, options);
48674
49257
  }
48675
49258
 
48676
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.mjs
49259
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.mjs
48677
49260
  function ConstructorParametersOperation(type) {
48678
49261
  const parameters = IsConstructor2(type) ? type["parameters"] : [];
48679
49262
  const instantiatedParameters = InstantiateElements({}, State([], []), parameters);
@@ -48689,7 +49272,7 @@ function ConstructorParametersInstantiate(context, state, type, options) {
48689
49272
  return ConstructorParametersAction(instantiatedType, options);
48690
49273
  }
48691
49274
 
48692
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/exclude.mjs
49275
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/action/exclude.mjs
48693
49276
  function ExcludeDeferred(left, right, options = {}) {
48694
49277
  return Deferred("Exclude", [left, right], options);
48695
49278
  }
@@ -48697,7 +49280,7 @@ function Exclude(left, right, options = {}) {
48697
49280
  return ExcludeAction(left, right, options);
48698
49281
  }
48699
49282
 
48700
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/exclude/instantiate.mjs
49283
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/exclude/instantiate.mjs
48701
49284
  function ExcludeAction(left, right, options) {
48702
49285
  const result = CanInstantiate([left, right]) ? exports_memory.Update(ExcludeOperation(left, right), {}, options) : ExcludeDeferred(left, right, options);
48703
49286
  return result;
@@ -48708,7 +49291,7 @@ function ExcludeInstantiate(context, state, left, right, options) {
48708
49291
  return ExcludeAction(instantiatedLeft, instantiatedRight, options);
48709
49292
  }
48710
49293
 
48711
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/extract.mjs
49294
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/action/extract.mjs
48712
49295
  function ExtractDeferred(left, right, options = {}) {
48713
49296
  return Deferred("Extract", [left, right], options);
48714
49297
  }
@@ -48716,7 +49299,7 @@ function Extract(left, right, options = {}) {
48716
49299
  return ExtractAction(left, right, options);
48717
49300
  }
48718
49301
 
48719
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/extract/operation.mjs
49302
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/extract/operation.mjs
48720
49303
  function ExtractType(left, right) {
48721
49304
  const check3 = Extends({}, left, right);
48722
49305
  const result = exports_result.IsExtendsTrueLike(check3) ? [left] : [];
@@ -48735,7 +49318,7 @@ function ExtractOperation(left, right) {
48735
49318
  return result;
48736
49319
  }
48737
49320
 
48738
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/extract/instantiate.mjs
49321
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/extract/instantiate.mjs
48739
49322
  function ExtractAction(left, right, options) {
48740
49323
  const result = CanInstantiate([left, right]) ? exports_memory.Update(ExtractOperation(left, right), {}, options) : ExtractDeferred(left, right, options);
48741
49324
  return result;
@@ -48746,7 +49329,7 @@ function ExtractInstantiate(context, state, left, right, options) {
48746
49329
  return ExtractAction(instantiatedLeft, instantiatedRight, options);
48747
49330
  }
48748
49331
 
48749
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/helpers/keys_to_indexer.mjs
49332
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/helpers/keys_to_indexer.mjs
48750
49333
  function KeysToLiterals(keys) {
48751
49334
  return keys.reduce((result, left) => {
48752
49335
  return IsLiteralValue(left) ? [...result, Literal(left)] : result;
@@ -48758,7 +49341,7 @@ function KeysToIndexer(keys) {
48758
49341
  return result;
48759
49342
  }
48760
49343
 
48761
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/indexed.mjs
49344
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/action/indexed.mjs
48762
49345
  function IndexDeferred(type, indexer, options = {}) {
48763
49346
  return Deferred("Index", [type, indexer], options);
48764
49347
  }
@@ -48767,21 +49350,21 @@ function Index(type, indexer_or_keys, options = {}) {
48767
49350
  return IndexAction(type, indexer, options);
48768
49351
  }
48769
49352
 
48770
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/object/from_cyclic.mjs
49353
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/object/from_cyclic.mjs
48771
49354
  function FromCyclic(defs, ref2) {
48772
49355
  const target2 = CyclicTarget(defs, ref2);
48773
49356
  const result = FromType8(target2);
48774
49357
  return result;
48775
49358
  }
48776
49359
 
48777
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/object/from_dependent.mjs
49360
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/object/from_dependent.mjs
48778
49361
  function FromDependent(if_, then_, else_) {
48779
49362
  const evaluated = EvaluateDependent(if_, then_, else_);
48780
49363
  const result = FromType8(evaluated);
48781
49364
  return result;
48782
49365
  }
48783
49366
 
48784
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/object/from_intersect.mjs
49367
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/object/from_intersect.mjs
48785
49368
  function CollapseIntersectProperties(left, right) {
48786
49369
  const leftKeys = exports_guard.Keys(left).filter((key) => !exports_guard.HasPropertyKey(right, key));
48787
49370
  const rightKeys = exports_guard.Keys(right).filter((key) => !exports_guard.HasPropertyKey(left, key));
@@ -48799,19 +49382,19 @@ function FromIntersect(types) {
48799
49382
  }, {});
48800
49383
  }
48801
49384
 
48802
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/object/from_object.mjs
49385
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/object/from_object.mjs
48803
49386
  function FromObject3(properties2) {
48804
49387
  return properties2;
48805
49388
  }
48806
49389
 
48807
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/object/from_tuple.mjs
49390
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/object/from_tuple.mjs
48808
49391
  function FromTuple(types) {
48809
49392
  const object3 = TupleToObject(Tuple(types));
48810
49393
  const result = FromType8(object3);
48811
49394
  return result;
48812
49395
  }
48813
49396
 
48814
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/object/from_union.mjs
49397
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/object/from_union.mjs
48815
49398
  function CollapseUnionProperties(left, right) {
48816
49399
  const sharedKeys = exports_guard.Keys(left).filter((key) => (key in right));
48817
49400
  const result = sharedKeys.reduce((result2, key) => {
@@ -48826,25 +49409,25 @@ function FromUnion3(types) {
48826
49409
  return exports_guard.ShiftLeft(types, (left, right) => ReduceVariants(right, FromType8(left)), () => Unreachable());
48827
49410
  }
48828
49411
 
48829
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/object/from_type.mjs
49412
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/object/from_type.mjs
48830
49413
  function FromType8(type) {
48831
49414
  return IsCyclic(type) ? FromCyclic(type.$defs, type.$ref) : IsDependent(type) ? FromDependent(type.if, type.then, type.else) : IsIntersect(type) ? FromIntersect(type.allOf) : IsUnion(type) ? FromUnion3(type.anyOf) : IsTuple(type) ? FromTuple(type.items) : IsObject2(type) ? FromObject3(type.properties) : {};
48832
49415
  }
48833
49416
 
48834
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/object/collapse.mjs
49417
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/object/collapse.mjs
48835
49418
  function CollapseToObject(type) {
48836
49419
  const properties2 = FromType8(type);
48837
49420
  const result = _Object_(properties2);
48838
49421
  return result;
48839
49422
  }
48840
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/helpers/keys.mjs
49423
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/helpers/keys.mjs
48841
49424
  var integerKeyPattern = new RegExp("^(?:0|[1-9][0-9]*)$");
48842
49425
  function ConvertToIntegerKey(value) {
48843
49426
  const normal = `${value}`;
48844
49427
  return integerKeyPattern.test(normal) ? parseInt(normal) : value;
48845
49428
  }
48846
49429
 
48847
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexed/from_array.mjs
49430
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/indexed/from_array.mjs
48848
49431
  function NormalizeLiteral(value) {
48849
49432
  return Literal(ConvertToIntegerKey(value));
48850
49433
  }
@@ -48861,66 +49444,66 @@ function FromArray2(type, indexer) {
48861
49444
  return result;
48862
49445
  }
48863
49446
 
48864
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexable/from_cyclic.mjs
49447
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/indexable/from_cyclic.mjs
48865
49448
  function FromCyclic2(defs, ref2) {
48866
49449
  const target2 = CyclicTarget(defs, ref2);
48867
49450
  const result = FromType9(target2);
48868
49451
  return result;
48869
49452
  }
48870
49453
 
48871
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexable/from_dependent.mjs
49454
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/indexable/from_dependent.mjs
48872
49455
  function FromDependent2(if_, then_, else_) {
48873
49456
  const evaluated = EvaluateDependent(if_, then_, else_);
48874
49457
  const result = FromType9(evaluated);
48875
49458
  return result;
48876
49459
  }
48877
49460
 
48878
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexable/from_enum.mjs
49461
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/indexable/from_enum.mjs
48879
49462
  function FromEnum(values) {
48880
49463
  const evaluated = EvaluateEnum(values);
48881
49464
  const result = FromType9(evaluated);
48882
49465
  return result;
48883
49466
  }
48884
49467
 
48885
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexable/from_intersect.mjs
49468
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/indexable/from_intersect.mjs
48886
49469
  function FromIntersect2(types) {
48887
49470
  const evaluated = EvaluateIntersect(types);
48888
49471
  const result = FromType9(evaluated);
48889
49472
  return result;
48890
49473
  }
48891
49474
 
48892
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexable/from_literal.mjs
49475
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/indexable/from_literal.mjs
48893
49476
  function FromLiteral4(value) {
48894
49477
  const result = [`${value}`];
48895
49478
  return result;
48896
49479
  }
48897
49480
 
48898
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexable/from_template_literal.mjs
49481
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/indexable/from_template_literal.mjs
48899
49482
  function FromTemplateLiteral2(pattern) {
48900
49483
  const evaluated = EvaluateTemplateLiteral(pattern);
48901
49484
  const result = FromType9(evaluated);
48902
49485
  return result;
48903
49486
  }
48904
49487
 
48905
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexable/from_union.mjs
49488
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/indexable/from_union.mjs
48906
49489
  function FromUnion4(types) {
48907
49490
  return types.reduce((result, left) => {
48908
49491
  return [...result, ...FromType9(left)];
48909
49492
  }, []);
48910
49493
  }
48911
49494
 
48912
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexable/from_type.mjs
49495
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/indexable/from_type.mjs
48913
49496
  function FromType9(type) {
48914
49497
  return IsCyclic(type) ? FromCyclic2(type.$defs, type.$ref) : IsDependent(type) ? FromDependent2(type.if, type.then, type.else) : IsEnum(type) ? FromEnum(type.enum) : IsIntersect(type) ? FromIntersect2(type.allOf) : IsLiteral(type) ? FromLiteral4(type.const) : IsTemplateLiteral(type) ? FromTemplateLiteral2(type.pattern) : IsUnion(type) ? FromUnion4(type.anyOf) : [];
48915
49498
  }
48916
49499
 
48917
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexable/to_indexable_keys.mjs
49500
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/indexable/to_indexable_keys.mjs
48918
49501
  function ToIndexableKeys(type) {
48919
49502
  const result = FromType9(type);
48920
49503
  return result;
48921
49504
  }
48922
49505
 
48923
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/this/expand_this.mjs
49506
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/this/expand_this.mjs
48924
49507
  function FromTypes5(properties2, types) {
48925
49508
  return types.map((type) => FromType10(properties2, type));
48926
49509
  }
@@ -48932,7 +49515,7 @@ function ExpandThis(properties2, type) {
48932
49515
  return result;
48933
49516
  }
48934
49517
 
48935
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexed/from_object.mjs
49518
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/indexed/from_object.mjs
48936
49519
  function IndexProperty(properties2, key) {
48937
49520
  const selectedType = key in properties2 ? properties2[key] : Never();
48938
49521
  const result = ExpandThis(properties2, selectedType);
@@ -48966,7 +49549,7 @@ function FromObject4(properties2, indexer) {
48966
49549
  return result;
48967
49550
  }
48968
49551
 
48969
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexed/array_indexer.mjs
49552
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/indexed/array_indexer.mjs
48970
49553
  function ConvertLiteral(value) {
48971
49554
  return Literal(ConvertToIntegerKey(value));
48972
49555
  }
@@ -48977,7 +49560,7 @@ function FormatArrayIndexer(type) {
48977
49560
  return IsIntersect(type) ? Intersect(ArrayIndexerTypes(type.allOf)) : IsUnion(type) ? Union(ArrayIndexerTypes(type.anyOf)) : IsLiteral(type) ? ConvertLiteral(type.const) : type;
48978
49561
  }
48979
49562
 
48980
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexed/from_tuple.mjs
49563
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/indexed/from_tuple.mjs
48981
49564
  function IndexElementsWithIndexer(types, indexer) {
48982
49565
  return types.reduceRight((result, right, index) => {
48983
49566
  const check3 = Extends({}, Literal(index), indexer);
@@ -48996,12 +49579,12 @@ function FromTuple2(types, indexer) {
48996
49579
  return IsLiteral(indexer) && exports_guard.IsEqual(indexer.const, "length") ? Literal(types.length) : IsNumber3(indexer) || IsInteger2(indexer) ? FromTupleWithoutIndexer(types) : FromTupleWithIndexer(types, indexer);
48997
49580
  }
48998
49581
 
48999
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexed/from_type.mjs
49582
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/indexed/from_type.mjs
49000
49583
  function FromType11(type, indexer) {
49001
49584
  return IsArray2(type) ? FromArray2(type.items, indexer) : IsObject2(type) ? FromObject4(type.properties, indexer) : IsTuple(type) ? FromTuple2(type.items, indexer) : Never();
49002
49585
  }
49003
49586
 
49004
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexed/instantiate.mjs
49587
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/indexed/instantiate.mjs
49005
49588
  function NormalizeType(type) {
49006
49589
  const result = IsCyclic(type) || IsDependent(type) || IsIntersect(type) || IsUnion(type) ? CollapseToObject(type) : type;
49007
49590
  return result;
@@ -49016,7 +49599,7 @@ function IndexInstantiate(context, state, type, indexer, options) {
49016
49599
  return IndexAction(instantiatedType, instantiatedIndexer, options);
49017
49600
  }
49018
49601
 
49019
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/instance_type.mjs
49602
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/action/instance_type.mjs
49020
49603
  function InstanceTypeDeferred(type, options = {}) {
49021
49604
  return Deferred("InstanceType", [type], options);
49022
49605
  }
@@ -49024,7 +49607,7 @@ function InstanceType(type, options = {}) {
49024
49607
  return InstanceTypeAction(type, options);
49025
49608
  }
49026
49609
 
49027
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/instance_type/instantiate.mjs
49610
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/instance_type/instantiate.mjs
49028
49611
  function InstanceTypeOperation(type) {
49029
49612
  return IsConstructor2(type) ? type["instanceType"] : Never();
49030
49613
  }
@@ -49037,7 +49620,7 @@ function InstanceTypeInstantiate(context, state, type, options = {}) {
49037
49620
  return InstanceTypeAction(instantiatedType, options);
49038
49621
  }
49039
49622
 
49040
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/keyof.mjs
49623
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/action/keyof.mjs
49041
49624
  function KeyOfDeferred(type, options = {}) {
49042
49625
  return Deferred("KeyOf", [type], options);
49043
49626
  }
@@ -49045,17 +49628,17 @@ function KeyOf2(type, options = {}) {
49045
49628
  return KeyOfAction(type, options);
49046
49629
  }
49047
49630
 
49048
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/keyof/from_any.mjs
49631
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/keyof/from_any.mjs
49049
49632
  function FromAny() {
49050
49633
  return Union([Number2(), String2(), Symbol2()]);
49051
49634
  }
49052
49635
 
49053
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/keyof/from_array.mjs
49636
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/keyof/from_array.mjs
49054
49637
  function FromArray3(_type) {
49055
49638
  return Number2();
49056
49639
  }
49057
49640
 
49058
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/keyof/from_object.mjs
49641
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/keyof/from_object.mjs
49059
49642
  function FromPropertyKeys(keys) {
49060
49643
  const result = keys.reduce((result2, left) => {
49061
49644
  return IsLiteralValue(left) ? [...result2, Literal(ConvertToIntegerKey(left))] : Unreachable();
@@ -49069,23 +49652,23 @@ function FromObject5(properties2) {
49069
49652
  return result;
49070
49653
  }
49071
49654
 
49072
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/keyof/from_record.mjs
49655
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/keyof/from_record.mjs
49073
49656
  function FromRecord2(type) {
49074
49657
  return RecordKey(type);
49075
49658
  }
49076
49659
 
49077
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/keyof/from_tuple.mjs
49660
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/keyof/from_tuple.mjs
49078
49661
  function FromTuple3(types) {
49079
49662
  const result = types.map((_, index) => Literal(index));
49080
49663
  return EvaluateUnionFast(result);
49081
49664
  }
49082
49665
 
49083
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/keyof/from_type.mjs
49666
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/keyof/from_type.mjs
49084
49667
  function FromType12(type) {
49085
49668
  return IsAny(type) ? FromAny() : IsArray2(type) ? FromArray3(type.items) : IsObject2(type) ? FromObject5(type.properties) : IsRecord(type) ? FromRecord2(type) : IsTuple(type) ? FromTuple3(type.items) : Never();
49086
49669
  }
49087
49670
 
49088
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/keyof/instantiate.mjs
49671
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/keyof/instantiate.mjs
49089
49672
  function NormalizeType2(type) {
49090
49673
  const result = IsCyclic(type) || IsDependent(type) || IsIntersect(type) || IsUnion(type) ? CollapseToObject(type) : type;
49091
49674
  return result;
@@ -49098,7 +49681,7 @@ function KeyOfInstantiate(context, state, type, options) {
49098
49681
  return KeyOfAction(instantiatedType, options);
49099
49682
  }
49100
49683
 
49101
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/mapped.mjs
49684
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/action/mapped.mjs
49102
49685
  function MappedDeferred(identifier2, type, as, property, options = {}) {
49103
49686
  return Deferred("Mapped", [identifier2, type, as, property], options);
49104
49687
  }
@@ -49106,7 +49689,7 @@ function Mapped(identifier2, type, as, property, options = {}) {
49106
49689
  return MappedAction({}, State([], []), identifier2, type, as, property, options);
49107
49690
  }
49108
49691
 
49109
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/mapped/mapped_variants.mjs
49692
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/mapped/mapped_variants.mjs
49110
49693
  function FromTemplateLiteral3(pattern) {
49111
49694
  const evaluated = EvaluateTemplateLiteral(pattern);
49112
49695
  const result = FromType13(evaluated);
@@ -49135,7 +49718,7 @@ function MappedVariants(type) {
49135
49718
  return result;
49136
49719
  }
49137
49720
 
49138
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/mapped/mapped_operation.mjs
49721
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/mapped/mapped_operation.mjs
49139
49722
  function CanonicalAs(instantiatedAs) {
49140
49723
  const result = IsTemplateLiteral(instantiatedAs) ? EvaluateTemplateLiteral(instantiatedAs.pattern) : instantiatedAs;
49141
49724
  return result;
@@ -49165,7 +49748,7 @@ function MappedOperation(context, state, identifier2, type, as, property) {
49165
49748
  return result;
49166
49749
  }
49167
49750
 
49168
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/mapped/instantiate.mjs
49751
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/mapped/instantiate.mjs
49169
49752
  function MappedAction(context, state, identifier2, type, as, property, options) {
49170
49753
  const result = CanInstantiate([type]) ? exports_memory.Update(MappedOperation(context, state, identifier2, type, as, property), {}, options) : MappedDeferred(identifier2, type, as, property, options);
49171
49754
  return result;
@@ -49175,7 +49758,7 @@ function MappedInstantiate(context, state, identifier2, type, as, property, opti
49175
49758
  return MappedAction(context, state, identifier2, instantiatedType, as, property, options);
49176
49759
  }
49177
49760
 
49178
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/module/instantiate.mjs
49761
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/module/instantiate.mjs
49179
49762
  function InstantiateCyclics(context, declarations, cyclicKeys) {
49180
49763
  const declarationContext = exports_memory.Assign(context, declarations);
49181
49764
  const declarationKeys = exports_guard.Keys(declarations).filter((key) => cyclicKeys.includes(key));
@@ -49202,7 +49785,7 @@ function ModuleInstantiate(context, _state, declarations, options) {
49202
49785
  return instantiatedModule;
49203
49786
  }
49204
49787
 
49205
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/non_nullable.mjs
49788
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/action/non_nullable.mjs
49206
49789
  function NonNullableDeferred(type, options = {}) {
49207
49790
  return Deferred("NonNullable", [type], options);
49208
49791
  }
@@ -49210,7 +49793,7 @@ function NonNullable(type, options = {}) {
49210
49793
  return NonNullableAction(type, options);
49211
49794
  }
49212
49795
 
49213
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/non_nullable/instantiate.mjs
49796
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/non_nullable/instantiate.mjs
49214
49797
  function NonNullableOperation(type) {
49215
49798
  const excluded = Union([Null(), Undefined()]);
49216
49799
  return ExcludeAction(type, excluded, {});
@@ -49224,7 +49807,7 @@ function NonNullableInstantiate(context, state, type, options) {
49224
49807
  return NonNullableAction(instantiatedType, options);
49225
49808
  }
49226
49809
 
49227
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/omit.mjs
49810
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/action/omit.mjs
49228
49811
  function OmitDeferred(type, indexer, options = {}) {
49229
49812
  return Deferred("Omit", [type, indexer], options);
49230
49813
  }
@@ -49233,14 +49816,14 @@ function Omit(type, indexer_or_keys, options = {}) {
49233
49816
  return OmitAction(type, indexer, options);
49234
49817
  }
49235
49818
 
49236
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexable/to_indexable.mjs
49819
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/indexable/to_indexable.mjs
49237
49820
  function ToIndexable(type) {
49238
49821
  const collapsed = CollapseToObject(type);
49239
49822
  const result = IsObject2(collapsed) ? collapsed.properties : Unreachable();
49240
49823
  return result;
49241
49824
  }
49242
49825
 
49243
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/omit/from_type.mjs
49826
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/omit/from_type.mjs
49244
49827
  function FromKeys(properties2, keys) {
49245
49828
  const result = exports_guard.Keys(properties2).reduce((result2, key) => {
49246
49829
  return keys.includes(key) ? result2 : { ...result2, [key]: properties2[key] };
@@ -49255,7 +49838,7 @@ function FromType14(type, indexer) {
49255
49838
  return result;
49256
49839
  }
49257
49840
 
49258
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/omit/instantiate.mjs
49841
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/omit/instantiate.mjs
49259
49842
  function OmitAction(type, indexer, options) {
49260
49843
  const result = CanInstantiate([type, indexer]) ? exports_memory.Update(FromType14(type, indexer), {}, options) : OmitDeferred(type, indexer, options);
49261
49844
  return result;
@@ -49266,7 +49849,7 @@ function OmitInstantiate(context, state, type, indexer, options) {
49266
49849
  return OmitAction(instantiatedType, instantiatedIndexer, options);
49267
49850
  }
49268
49851
 
49269
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/parameters.mjs
49852
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/action/parameters.mjs
49270
49853
  function ParametersDeferred(type, options = {}) {
49271
49854
  return Deferred("Parameters", [type], options);
49272
49855
  }
@@ -49274,7 +49857,7 @@ function Parameters(type, options = {}) {
49274
49857
  return ParametersAction(type, options);
49275
49858
  }
49276
49859
 
49277
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/parameters/instantiate.mjs
49860
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/parameters/instantiate.mjs
49278
49861
  function ParametersOperation(type) {
49279
49862
  const parameters = IsFunction2(type) ? type["parameters"] : [];
49280
49863
  const instantiatedParameters = InstantiateElements({}, State([], []), parameters);
@@ -49290,7 +49873,7 @@ function ParametersInstantiate(context, state, type, options) {
49290
49873
  return ParametersAction(instantiatedType, options);
49291
49874
  }
49292
49875
 
49293
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/partial.mjs
49876
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/action/partial.mjs
49294
49877
  function PartialDeferred(type, options = {}) {
49295
49878
  return Deferred("Partial", [type], options);
49296
49879
  }
@@ -49298,7 +49881,7 @@ function Partial(type, options = {}) {
49298
49881
  return PartialAction(type, options);
49299
49882
  }
49300
49883
 
49301
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/partial/from_cyclic.mjs
49884
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/partial/from_cyclic.mjs
49302
49885
  function FromCyclic3(defs, ref2) {
49303
49886
  const target2 = CyclicTarget(defs, ref2);
49304
49887
  const partial2 = FromType15(target2);
@@ -49306,27 +49889,27 @@ function FromCyclic3(defs, ref2) {
49306
49889
  return result;
49307
49890
  }
49308
49891
 
49309
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/partial/from_dependent.mjs
49892
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/partial/from_dependent.mjs
49310
49893
  function FromDependent3(if_, then_, else_) {
49311
49894
  const evaluated = EvaluateDependent(if_, then_, else_);
49312
49895
  const result = FromType15(evaluated);
49313
49896
  return result;
49314
49897
  }
49315
49898
 
49316
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/partial/from_intersect.mjs
49899
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/partial/from_intersect.mjs
49317
49900
  function FromIntersect3(types) {
49318
49901
  const evaluated = EvaluateIntersect(types);
49319
49902
  const result = FromType15(evaluated);
49320
49903
  return result;
49321
49904
  }
49322
49905
 
49323
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/partial/from_union.mjs
49906
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/partial/from_union.mjs
49324
49907
  function FromUnion6(types) {
49325
49908
  const result = types.map((type) => FromType15(type));
49326
49909
  return Union(result);
49327
49910
  }
49328
49911
 
49329
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/partial/from_object.mjs
49912
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/partial/from_object.mjs
49330
49913
  function FromObject6(properties2) {
49331
49914
  const mapped = exports_guard.Keys(properties2).reduce((result2, left) => {
49332
49915
  return { ...result2, [left]: AddOptional(properties2[left]) };
@@ -49335,12 +49918,12 @@ function FromObject6(properties2) {
49335
49918
  return result;
49336
49919
  }
49337
49920
 
49338
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/partial/from_type.mjs
49921
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/partial/from_type.mjs
49339
49922
  function FromType15(type) {
49340
49923
  return IsCyclic(type) ? FromCyclic3(type.$defs, type.$ref) : IsDependent(type) ? FromDependent3(type.if, type.then, type.else) : IsIntersect(type) ? FromIntersect3(type.allOf) : IsUnion(type) ? FromUnion6(type.anyOf) : IsObject2(type) ? FromObject6(type.properties) : _Object_({});
49341
49924
  }
49342
49925
 
49343
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/partial/instantiate.mjs
49926
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/partial/instantiate.mjs
49344
49927
  function PartialAction(type, options) {
49345
49928
  const result = CanInstantiate([type]) ? exports_memory.Update(FromType15(type), {}, options) : PartialDeferred(type, options);
49346
49929
  return result;
@@ -49350,7 +49933,7 @@ function PartialInstantiate(context, state, type, options) {
49350
49933
  return PartialAction(instantiatedType, options);
49351
49934
  }
49352
49935
 
49353
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/pick.mjs
49936
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/action/pick.mjs
49354
49937
  function PickDeferred(type, indexer, options = {}) {
49355
49938
  return Deferred("Pick", [type, indexer], options);
49356
49939
  }
@@ -49359,7 +49942,7 @@ function Pick(type, indexer_or_keys, options = {}) {
49359
49942
  return PickAction(type, indexer, options);
49360
49943
  }
49361
49944
 
49362
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/pick/from_type.mjs
49945
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/pick/from_type.mjs
49363
49946
  function FromKeys2(properties2, keys) {
49364
49947
  const result = exports_guard.Keys(properties2).reduce((result2, key) => {
49365
49948
  return keys.includes(key) ? exports_memory.Assign(result2, { [key]: properties2[key] }) : result2;
@@ -49374,7 +49957,7 @@ function FromType16(type, indexer) {
49374
49957
  return result;
49375
49958
  }
49376
49959
 
49377
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/pick/instantiate.mjs
49960
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/pick/instantiate.mjs
49378
49961
  function PickAction(type, indexer, options) {
49379
49962
  const result = CanInstantiate([type, indexer]) ? exports_memory.Update(FromType16(type, indexer), {}, options) : PickDeferred(type, indexer, options);
49380
49963
  return result;
@@ -49385,21 +49968,22 @@ function PickInstantiate(context, state, type, indexer, options) {
49385
49968
  return PickAction(instantiatedType, instantiatedIndexer, options);
49386
49969
  }
49387
49970
 
49388
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/readonly_object.mjs
49971
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/action/readonly_object.mjs
49389
49972
  function ReadonlyObjectDeferred(type, options = {}) {
49390
49973
  return Deferred("ReadonlyObject", [type], options);
49391
49974
  }
49392
49975
  function ReadonlyObject(type, options = {}) {
49393
49976
  return ReadonlyObjectAction(type, options);
49394
49977
  }
49978
+ var ReadonlyType = ReadonlyObject;
49395
49979
 
49396
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/readonly_object/from_array.mjs
49980
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/readonly_object/from_array.mjs
49397
49981
  function FromArray4(type) {
49398
49982
  const result = AddImmutable(_Array_(type));
49399
49983
  return result;
49400
49984
  }
49401
49985
 
49402
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/readonly_object/from_cyclic.mjs
49986
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/readonly_object/from_cyclic.mjs
49403
49987
  function FromCyclic4(defs, ref2) {
49404
49988
  const target2 = CyclicTarget(defs, ref2);
49405
49989
  const partial2 = FromType17(target2);
@@ -49407,21 +49991,21 @@ function FromCyclic4(defs, ref2) {
49407
49991
  return result;
49408
49992
  }
49409
49993
 
49410
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/readonly_object/from_dependent.mjs
49994
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/readonly_object/from_dependent.mjs
49411
49995
  function FromDependent4(if_, then_, else_) {
49412
49996
  const evaluated = EvaluateDependent(if_, then_, else_);
49413
49997
  const result = FromType17(evaluated);
49414
49998
  return result;
49415
49999
  }
49416
50000
 
49417
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/readonly_object/from_intersect.mjs
50001
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/readonly_object/from_intersect.mjs
49418
50002
  function FromIntersect4(types) {
49419
50003
  const evaluated = EvaluateIntersect(types);
49420
50004
  const result = FromType17(evaluated);
49421
50005
  return result;
49422
50006
  }
49423
50007
 
49424
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/readonly_object/from_object.mjs
50008
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/readonly_object/from_object.mjs
49425
50009
  function FromObject7(properties2) {
49426
50010
  const mapped = exports_guard.Keys(properties2).reduce((result2, left) => {
49427
50011
  return { ...result2, [left]: AddReadonly(properties2[left]) };
@@ -49430,24 +50014,24 @@ function FromObject7(properties2) {
49430
50014
  return result;
49431
50015
  }
49432
50016
 
49433
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/readonly_object/from_tuple.mjs
50017
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/readonly_object/from_tuple.mjs
49434
50018
  function FromTuple4(types) {
49435
50019
  const result = AddImmutable(Tuple(types));
49436
50020
  return result;
49437
50021
  }
49438
50022
 
49439
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/readonly_object/from_union.mjs
50023
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/readonly_object/from_union.mjs
49440
50024
  function FromUnion7(types) {
49441
50025
  const result = types.map((type) => FromType17(type));
49442
50026
  return Union(result);
49443
50027
  }
49444
50028
 
49445
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/readonly_object/from_type.mjs
50029
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/readonly_object/from_type.mjs
49446
50030
  function FromType17(type) {
49447
50031
  return IsArray2(type) ? FromArray4(type.items) : IsCyclic(type) ? FromCyclic4(type.$defs, type.$ref) : IsDependent(type) ? FromDependent4(type.if, type.then, type.else) : IsIntersect(type) ? FromIntersect4(type.allOf) : IsObject2(type) ? FromObject7(type.properties) : IsTuple(type) ? FromTuple4(type.items) : IsUnion(type) ? FromUnion7(type.anyOf) : type;
49448
50032
  }
49449
50033
 
49450
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/readonly_object/instantiate.mjs
50034
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/readonly_object/instantiate.mjs
49451
50035
  function ReadonlyObjectAction(type, options) {
49452
50036
  const result = CanInstantiate([type]) ? exports_memory.Update(FromType17(type), {}, options) : ReadonlyObjectDeferred(type);
49453
50037
  return result;
@@ -49457,12 +50041,12 @@ function ReadonlyObjectInstantiate(context, state, type, options) {
49457
50041
  return ReadonlyObjectAction(instantiatedType, options);
49458
50042
  }
49459
50043
 
49460
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/ref/instantiate.mjs
50044
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/ref/instantiate.mjs
49461
50045
  function RefInstantiate(context, state, type, ref2) {
49462
50046
  return state.visited.includes(ref2) ? type : (ref2 in context) ? InstantiateType(context, State(state["callstack"], [...state["visited"], ref2]), context[ref2]) : type;
49463
50047
  }
49464
50048
 
49465
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/required/from_cyclic.mjs
50049
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/required/from_cyclic.mjs
49466
50050
  function FromCyclic5(defs, ref2) {
49467
50051
  const target2 = CyclicTarget(defs, ref2);
49468
50052
  const partial2 = FromType18(target2);
@@ -49470,27 +50054,27 @@ function FromCyclic5(defs, ref2) {
49470
50054
  return result;
49471
50055
  }
49472
50056
 
49473
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/required/from_dependent.mjs
50057
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/required/from_dependent.mjs
49474
50058
  function FromDependent5(if_, then_, else_) {
49475
50059
  const evaluated = EvaluateDependent(if_, then_, else_);
49476
50060
  const result = FromType18(evaluated);
49477
50061
  return result;
49478
50062
  }
49479
50063
 
49480
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/required/from_intersect.mjs
50064
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/required/from_intersect.mjs
49481
50065
  function FromIntersect5(types) {
49482
50066
  const evaluated = EvaluateIntersect(types);
49483
50067
  const result = FromType18(evaluated);
49484
50068
  return result;
49485
50069
  }
49486
50070
 
49487
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/required/from_union.mjs
50071
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/required/from_union.mjs
49488
50072
  function FromUnion8(types) {
49489
50073
  const result = types.map((type) => FromType18(type));
49490
50074
  return Union(result);
49491
50075
  }
49492
50076
 
49493
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/required/from_object.mjs
50077
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/required/from_object.mjs
49494
50078
  function FromObject8(properties2) {
49495
50079
  const mapped = exports_guard.Keys(properties2).reduce((result2, left) => {
49496
50080
  return { ...result2, [left]: RemoveOptional(properties2[left]) };
@@ -49499,12 +50083,12 @@ function FromObject8(properties2) {
49499
50083
  return result;
49500
50084
  }
49501
50085
 
49502
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/required/from_type.mjs
50086
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/required/from_type.mjs
49503
50087
  function FromType18(type) {
49504
50088
  return IsCyclic(type) ? FromCyclic5(type.$defs, type.$ref) : IsDependent(type) ? FromDependent5(type.if, type.then, type.else) : IsIntersect(type) ? FromIntersect5(type.allOf) : IsUnion(type) ? FromUnion8(type.anyOf) : IsObject2(type) ? FromObject8(type.properties) : _Object_({});
49505
50089
  }
49506
50090
 
49507
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/required.mjs
50091
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/action/required.mjs
49508
50092
  function RequiredDeferred(type, options = {}) {
49509
50093
  return Deferred("Required", [type], options);
49510
50094
  }
@@ -49512,7 +50096,7 @@ function Required(type, options = {}) {
49512
50096
  return RequiredAction(type, options);
49513
50097
  }
49514
50098
 
49515
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/required/instantiate.mjs
50099
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/required/instantiate.mjs
49516
50100
  function RequiredAction(type, options) {
49517
50101
  const result = CanInstantiate([type]) ? exports_memory.Update(FromType18(type), {}, options) : RequiredDeferred(type, options);
49518
50102
  return result;
@@ -49522,7 +50106,7 @@ function RequiredInstantiate(context, state, type, options) {
49522
50106
  return RequiredAction(instaniatedType, options);
49523
50107
  }
49524
50108
 
49525
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/return_type.mjs
50109
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/action/return_type.mjs
49526
50110
  function ReturnTypeDeferred(type, options = {}) {
49527
50111
  return Deferred("ReturnType", [type], options);
49528
50112
  }
@@ -49530,7 +50114,7 @@ function ReturnType(type, options = {}) {
49530
50114
  return ReturnTypeAction(type, options);
49531
50115
  }
49532
50116
 
49533
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/return_type/instantiate.mjs
50117
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/return_type/instantiate.mjs
49534
50118
  function ReturnTypeOperation(type) {
49535
50119
  return IsFunction2(type) ? type["returnType"] : Never();
49536
50120
  }
@@ -49543,7 +50127,7 @@ function ReturnTypeInstantiate(context, state, type, options = {}) {
49543
50127
  return ReturnTypeAction(instantiatedType, options);
49544
50128
  }
49545
50129
 
49546
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/with.mjs
50130
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/action/with.mjs
49547
50131
  function WithDeferred(type, options) {
49548
50132
  return Deferred("With", [type, options], {});
49549
50133
  }
@@ -49551,7 +50135,7 @@ function With2(type, options) {
49551
50135
  return WithAction(type, options);
49552
50136
  }
49553
50137
 
49554
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/with/instantiate.mjs
50138
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/with/instantiate.mjs
49555
50139
  function WithAction(type, options) {
49556
50140
  const result = CanInstantiate([type]) ? exports_memory.Update(type, {}, options) : WithDeferred(type, options);
49557
50141
  return result;
@@ -49561,7 +50145,7 @@ function WithInstantiate(context, state, type, options) {
49561
50145
  return WithAction(instaniatedType, options);
49562
50146
  }
49563
50147
 
49564
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/rest/spread.mjs
50148
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/rest/spread.mjs
49565
50149
  function SpreadElement(type) {
49566
50150
  const result = IsRest(type) ? IsTuple(type.items) ? RestSpread(type.items.items) : IsInfer(type.items) ? [type] : IsRef(type.items) ? [type] : [Never()] : [type];
49567
50151
  return result;
@@ -49572,7 +50156,7 @@ function RestSpread(types) {
49572
50156
  }, []);
49573
50157
  return result;
49574
50158
  }
49575
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/instantiate.mjs
50159
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/instantiate.mjs
49576
50160
  function State(callstack, visited) {
49577
50161
  return { callstack, visited };
49578
50162
  }
@@ -49614,7 +50198,7 @@ function Instantiate(context, type) {
49614
50198
  return InstantiateType(context, State([], []), type);
49615
50199
  }
49616
50200
 
49617
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs
50201
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs
49618
50202
  function AddImmutableOperation(type) {
49619
50203
  return exports_memory.Update(type, { "~immutable": true }, {});
49620
50204
  }
@@ -49627,28 +50211,28 @@ function AddImmutableInstantiate(context, state, type, options) {
49627
50211
  return AddImmutableAction(instantiatedType, options);
49628
50212
  }
49629
50213
 
49630
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/_add_immutable.mjs
50214
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/action/_add_immutable.mjs
49631
50215
  function AddImmutableDeferred(type, options = {}) {
49632
50216
  return Deferred("AddImmutable", [type], options);
49633
50217
  }
49634
50218
  function AddImmutable(type, options = {}) {
49635
50219
  return AddImmutableAction(type, options);
49636
50220
  }
49637
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/evaluate.mjs
50221
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/action/evaluate.mjs
49638
50222
  function EvaluateDeferred(type, options = {}) {
49639
50223
  return Deferred("Evaluate", [type], options);
49640
50224
  }
49641
50225
  function Evaluate(type, options = {}) {
49642
50226
  return EvaluateAction(type, options);
49643
50227
  }
49644
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/module.mjs
50228
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/action/module.mjs
49645
50229
  function ModuleDeferred(declarations, options = {}) {
49646
50230
  return Deferred("Module", [declarations], options);
49647
50231
  }
49648
50232
  function Module2(declarations, options = {}) {
49649
50233
  return ModuleInstantiate({}, State([], []), declarations, options);
49650
50234
  }
49651
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/script.mjs
50235
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/type/script/script.mjs
49652
50236
  function Script2(...args) {
49653
50237
  const [context, input, options] = exports_arguments.Match(args, {
49654
50238
  2: (script, options2) => exports_guard.IsString(script) ? [{}, script, options2] : [script, options2, {}],
@@ -49659,7 +50243,7 @@ function Script2(...args) {
49659
50243
  const parsed = exports_guard.IsArray(result) && exports_guard.IsEqual(result.length, 2) ? InstantiateType(context, State([], []), result[0]) : Never();
49660
50244
  return exports_memory.Update(parsed, {}, options);
49661
50245
  }
49662
- // ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/typebox.mjs
50246
+ // ../../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/typebox.mjs
49663
50247
  var exports_typebox = {};
49664
50248
  __export(exports_typebox, {
49665
50249
  Any: () => Any,
@@ -49705,6 +50289,7 @@ __export(exports_typebox, {
49705
50289
  IsCyclic: () => IsCyclic,
49706
50290
  IsDependent: () => IsDependent,
49707
50291
  IsEnum: () => IsEnum,
50292
+ IsEnumValue: () => IsEnumValue,
49708
50293
  IsFunction: () => IsFunction2,
49709
50294
  IsGeneric: () => IsGeneric,
49710
50295
  IsIdentifier: () => IsIdentifier,
@@ -49754,6 +50339,7 @@ __export(exports_typebox, {
49754
50339
  Pick: () => Pick,
49755
50340
  Readonly: () => Readonly,
49756
50341
  ReadonlyObject: () => ReadonlyObject,
50342
+ ReadonlyType: () => ReadonlyType,
49757
50343
  Record: () => Record,
49758
50344
  RecordKey: () => RecordKey,
49759
50345
  RecordPattern: () => RecordPattern,
@@ -51605,7 +52191,7 @@ import { isAbsolute as isAbsolute5 } from "node:path";
51605
52191
 
51606
52192
  // ../retina-local-fs/src/path-fence.ts
51607
52193
  import { lstat, readlink, realpath } from "node:fs/promises";
51608
- import { homedir as homedir6 } from "node:os";
52194
+ import { homedir as homedir7 } from "node:os";
51609
52195
  import { basename as basename4, dirname as dirname8, isAbsolute as isAbsolute4, join as join10, relative, resolve as resolve5, sep } from "node:path";
51610
52196
 
51611
52197
  // ../retina-local-fs/src/errors.ts
@@ -51630,7 +52216,7 @@ async function resolveAndFenceProviderPath(configuredPath, options) {
51630
52216
  return canonical;
51631
52217
  }
51632
52218
  async function resolveFenceRoots(options) {
51633
- const configuredHomePath = resolve5(options.homeDirectory ?? process.env.HOME ?? homedir6());
52219
+ const configuredHomePath = resolve5(options.homeDirectory ?? process.env.HOME ?? homedir7());
51634
52220
  let home;
51635
52221
  try {
51636
52222
  home = await realpath(configuredHomePath);
@@ -56194,4 +56780,4 @@ function registerMagicContextTools(pi, opts) {
56194
56780
  }
56195
56781
  }
56196
56782
 
56197
- export { COMPACTION_ENABLED_PATH, isDreamerRunnable, isCompactionEnabled, migrateMagicContextConfigLocations, ProjectIdentityError, resolveProjectIdentityStrict, resolveProjectIdentity, resolveProjectIdentityForSession, beginBootQuietPeriod, scheduleAfterBootQuiet, Database, closeQuietly, isMidTurn, textMentionsRecentCommit, hasMeaningfulUserText, extractTexts, extractToolCallSummaries, preloadTokenizer, estimateTokens, normalizeText, isRecord, completedToolArcCrossesBoundary, estimateTrueRawMessageTokens, buildToolArcs, fenceBoundaryForToolArcs, buildTrueRawTokenIndex, computeRawRangeFingerprint, invalidateTrueRawTokenCache, stripPersistedAssistantText, byteSize, stripTagPrefix, peelLeadingMcTagNotation, prependTag, isEditTool, applyEditMarkerToInput, setRawMessageProvider, withRawMessageProvider, cleanUserText, withRawSessionMessageCache, readRawSessionMessages, primeTailRawMessageCache, getCachedAbsoluteMessageCount, primeInMemoryTailRawMessageCache, getRawSessionMessageCount, getRawSessionTagKeysThrough, getLegacyProtectedTailStartOrdinal, readSessionChunk, clearCompressionDepth, clearCompressionDepthRange, getMessageIndexSourceIdentity, isMessageIndexSourceCurrent, getLastIndexedOrdinal, getMessageIndexReconciliationStartOrdinal, isMessageIndexReconciledThrough, indexSingleMessage, indexMessagesAfterOrdinal, sweepOrphanedOpenCodeMessageIndexes, recordSessionProjectIdentity, COMPARTMENT_LEASE_RENEWAL_MS, acquireCompartmentLease, renewCompartmentLease, releaseCompartmentLease, isCompartmentLeaseHeld, piModelRefToCanonical, resolveModelRefForPi, modelRefLookupOrder, ompModelRefToCanonical, resolveModelRefForOmp, persistCachedM0, clearCachedM0M1, getCompartments, getLastCompartmentEndMessage, getLastCompartmentEndMessageId, getCompartmentsByEndMessageId, appendCompartments, saveRecompStagingPass, getRecompStaging, clearRecompStaging, getRecompPartialRange, setRecompPartialRange, escapeXmlAttr, escapeXmlContent, getModuleNoteEvaluationBridge, getContextStoreUuid, parseCompartmentOutput, resolveWorkspaceShareCategories, resolveWorkspaceIdentitySet, expandWorkspaceIdentitySetWithAliases, sourceNameForMemory, computeWorkspaceEpochFingerprint, bumpEpochsForWorkspaceMembers, readProjectDocsCanonical, copySessionStateForClone, getErrorMessage, describeError, setStoragePrivatePermissionEnforcement, getSchemaFenceRejection, getMigrationOnOpenRefusal, LATEST_SUPPORTED_VERSION, getDatabasePath, getPersistedSchemaVersion, setSqlitePragmaConfig, applySqliteTuningPragmas, runSqliteOptimize, openDatabase, openDatabaseAsync, queueM0Mutation, getMaxM0MutationId, queueMemoryMutation, getMemoryMutationsForRender, getMemoryMutationsForRenderByProjects, getMaxMemoryMutationId, getMaxMemoryMutationIdForProjects, MAX_EXECUTE_THRESHOLD, escalationBands, loadProtectedTailMeta, markProtectedTailPolicyV3Seeded, recordProtectedTailPublicationFloor, recordProtectedTailNoEligibleHead, getWrapupInProgressState, isWrapupInProgress, acquireWrapupInProgress, updateWrapupInProgress, releaseWrapupInProgress, resolveCompactionModeRecord, getCompactionModeRecord, setCompactionModeRecord, reserveProtectedTailDrainTokens, clearEmergencyDrainLatch, recordHistorianDrainFailure, clearHistorianDrainFailure, rollbackProtectedTailDrainReservation, clearPersistedReasoningWatermark, getEmergencyInputSample, setEmergencyDropSample, clearEmergencyDropSample, getLastNudgeUndropped, setLastNudgeUndropped, getChannel1NudgeState, setChannel1NudgeState, resetLastNudgeCycle, resetLastNudgeCycleIfTailShrank, getChannel2NudgeState, getChannel2NudgeClaim, setChannel2NudgeState, casChannel2NudgeState, claimChannel2NudgeState, casChannel2NudgeClaim, getPersistedNoteNudge, setPersistedNoteNudgeTrigger, setPersistedNoteNudgeTriggerMessageId, getNoteNudgeAnchors, getAutoSearchHintDecisions, deliverNoteNudgeAtomic, appendAutoSearchHintDecision, pruneNoteNudgeAnchors, pruneAutoSearchHintDecisions, getPersistedTodoSyntheticAnchor, setPersistedTodoSyntheticAnchor, clearPersistedTodoSyntheticAnchor, getNoteLastReadAt, getHistorianFailureState, incrementHistorianFailure, clearHistorianFailureState, getOverflowState, recordOverflowDetected, clearEmergencyRecovery, clearDetectedContextLimit, getStrippedPlaceholderIds, applyStrippedPlaceholderDelta, getProcessedImageStrippedIds, addProcessedImageStrippedIds, getPendingCompactionMarkerState, clearPendingCompactionMarkerStateIf, getPendingPiCompactionMarkerState, setPendingPiCompactionMarkerState, clearPendingPiCompactionMarkerStateIf, getSessionsWithPendingPiMarker, peekDeferredExecutePending, setDeferredExecutePendingIfAbsent, clearDeferredExecutePendingIfMatches, setSessionWorkMetrics, getSessionWorkMetrics, getOrCreateSessionMeta, updateSessionMeta, advanceToolReclaimWatermark, retryPendingSessionCleanups, getNotes, getSessionNotes, getPendingSmartNotes, getReadySmartNotes, markNoteReady, markNoteChecked, queuePendingOp, getPendingOps, clearPendingOps, removePendingOp, PRIMER_CANDIDATE_TTL_MS, PRIMER_CANDIDATE_MAX_AGE_MS, primerOccurrenceKey, primerOccurrenceUtcDay, insertPrimerCandidates, updatePrimerCandidateEmbedding, getPrimerCandidatesByIds, getPrimerCandidatesForPromotion, countPrimerCandidatesForProject, getActivePrimers, createPrimer, updatePrimerSupport, updatePrimerAnswer, GLOBAL_USER_PROFILE_PROJECT_PATH, getProjectState, bumpProjectUserProfileVersion, saveSourceContent, replaceSourceContent, getSourceContents, recordSubagentInvocation, getLatestHistorianInvocationId, CTX_REDUCE_KEEP, estimateImageTokensFromDataUrl, normalizeTodoStateJson, buildSyntheticTodoPart, stripChannel1ReminderSpans, effectiveTailHygiene, CHANNEL1_SENTINEL, CHANNEL1_FLOOR_TOKENS, decideChannel1, evaluateChannel2, buildChannel2Reminder, shouldUseStickyChannel1Reminder, buildChannel1Reminder, planEmergencyDrop, updateTagByteSize, AGE_RECLAIM_MIN_TOKENS, getOldestActiveUnprotectedToolTags, getActiveToolTagsForAgeReclaim, getTriggerTagTokenUpperBound, updateTagInputByteSize, updateTagTokenCount, getPersistedToolTagAccounting, getAllStatusTagTokenTotalsFlat, updateTagInputTokenCount, tagTokenCountIsNull, backfillTagTokenCounts, insertTag, updateTagStatus, updateTagDropMode, updateCavemanDepth, hasPiFallbackMessageTags, findAdoptableFallbackTags, hasPiFallbackToolOwnerTags, findPiFallbackToolOwnerTags, adoptPiFallbackToolOwnerTag, adoptPiFallbackMessageTag, getMaxTagNumberBySession, getTagNumberByMessageId, deriveTagLoadFloor, getTagsBySession, getActiveTagsBySession, getTagsForPendingOperations, getTagsByNumbers, getDroppedTagsByNumbers, getMaxDroppedTagNumber, getToolTagNumberByOwner, getNullOwnerToolTag, adoptNullOwnerToolTag, BoundedSessionMap, getWindowOverlay, resolveWindowOverlayFacts, deriveWindowGeometry, formatWindowDerivationLine, isSaneLimit, resolveOutputReserve, getSdkContextLimit, resolveModelConfigOrDefault, promptSurfaceHashMaterial, createPromptSurfaceRuntime, createPromptSurfaceGuidanceEpochCache, SYNTH_USER_ID_PREFIX, resolvePiStableId, isMidTurnPi, readPiSessionMessages, findLastModelKeyFromBranch, convertEntriesToRawMessages, withContentLanguageDirective, withMigrationLanguageDirective, buildPrimaryLanguageDirective, computeCueContentHash, hasMuralCueColumns, getMuralCueState, memoryNeedsCue, setMuralCue, recordMuralCueRejection, invalidateMemory, computeNormalizedHash, hasMemoryShareableColumn, hasMemoryClassifiedAtColumn, getUnclassifiedMemoryIds, insertMemory, getMemoryByHash, getMemoriesByProject, getMemoriesByProjects, getMaxMemoryIdForProjects, getAllActiveMemoriesForMigration, getMemoryById, setMemoryClassification, archiveMemory, deleteMemory, getMemoryCount, getMemoryCountsByStatus, USER_MEMORY_CANDIDATE_TTL_MS, insertUserMemoryCandidates, getUserMemoryCandidates, deleteUserMemoryCandidates, pruneExpiredUserMemoryCandidates, insertUserMemory, getActiveUserMemories, updateUserMemoryContent, dismissUserMemory, getOpenCodeDbPath2 as getOpenCodeDbPath, parseCron, nextOccurrence, nextDueAtMs, DEFAULT_EXECUTE_THRESHOLD_PERCENTAGE, DEFAULT_HISTORIAN_TIMEOUT_MS, buildCanonicalChunkTextFromFts, buildCompartmentSummaryFallbackText, canonicalizeInMemoryChunkTextForEmbedding, chunkCanonicalText, chunkEmbeddingWindowsAreCurrent, replaceCompartmentChunkEmbeddings, cosineSimilarity, GIT_SWEEP_LEASE_RENEWAL_MS, acquireGitSweepLease, renewGitSweepLease, markGitSweepSuccessAndRelease, parkGitSweepNonIndexable, releaseGitSweepLease, contentSha256, sweepStaleEmbeddingIdentitiesForProject, enqueueShadowEmbeddingItems, getProjectEmbeddingSnapshot, getProjectChunkEmbeddingModelId, getProjectEmbeddingMaxInputTokens, embedTextForProject, embedBatchForProject, embedItemsForProject, embedUnembeddedMemoriesForProject, drainCommitBacklogForProject, embedSessionCompartmentChunks, getEmbeddingCoverageStatus, promoteSessionFactsDurable, embedPromotedFacts, recordMemoryMapping, recordMemoryVerifications, getUnmappedMemoryIds, clearMemoryVerifications, getMemoryVerifications, resolveGitTopLevel, readGitHead, readGitChangedFilesSince, readGitFileChangeTimesSince, verificationFileExists, normalizeVerificationFiles, wakePlaneStatus, indexCommitsForProject, embedUnembeddedCommits, loadPiConfig, ensureProjectRegisteredFromPiDirectory, resolveMuralWire, updateCompactionMarkerAfterPublication, COMPARTMENT_RENDER_EPOCH, encodeCachedM0UpgradeIdentity, decodeCachedM0UpgradeIdentity, DEFAULT_HISTORY_BUDGET_TOKENS, renderCompartmentAtTier, renderDecayedCompartments, extractM0Block, TEMPORAL_MARKER_PATTERN, temporalMarkerPrefix, clearInjectionCache, getVisibleMemoryIds, renderMemoryBlock, DEFAULT_MEMORY_BUDGET_TOKENS, DEFAULT_USER_PROFILE_BUDGET_TOKENS, trimMemoriesToBudgetV2, trimWorkspaceMemoriesToBudgetV2, trimUserMemoriesToBudget, renderMemoryBlockV2, stripMemoryMuralBlock, unifiedSearch, rememberTodowriteToolCallTodos, parseTodos, setTodoSnapshot, registerTodoOverlay, registerTodoStateLifecycle, registerMagicContextTools };
56783
+ export { COMPACTION_ENABLED_PATH, isDreamerRunnable, isCompactionEnabled, migrateMagicContextConfigLocations, hasShareabilitySensitiveText, FAIL_CLOSED_DOCTOR_COMMAND, formatFailClosedBlockingMessage, createFailClosedBlockingError, isFailClosedBlockingError, shouldBypassFailClosedBlock, createFailClosedController, ProjectIdentityError, resolveProjectIdentityStrict, resolveProjectIdentity, resolveProjectIdentityForSession, beginBootQuietPeriod, scheduleAfterBootQuiet, Database, closeQuietly, isMidTurn, textMentionsRecentCommit, hasMeaningfulUserText, extractTexts, extractToolCallSummaries, preloadTokenizer, estimateTokens, normalizeText, isRecord, completedToolArcCrossesBoundary, estimateTrueRawMessageTokens, buildToolArcs, fenceBoundaryForToolArcs, buildTrueRawTokenIndex, computeRawRangeFingerprint, invalidateTrueRawTokenCache, stripPersistedAssistantText, byteSize, stripTagPrefix, peelLeadingMcTagNotation, prependTag, isEditTool, applyEditMarkerToInput, setRawMessageProvider, withRawMessageProvider, cleanUserText, withRawSessionMessageCache, readRawSessionMessages, primeTailRawMessageCache, getCachedAbsoluteMessageCount, primeInMemoryTailRawMessageCache, getRawSessionMessageCount, getRawSessionTagKeysThrough, getLegacyProtectedTailStartOrdinal, readSessionChunk, clearCompressionDepth, clearCompressionDepthRange, getMessageIndexSourceIdentity, isMessageIndexSourceCurrent, getLastIndexedOrdinal, getMessageIndexReconciliationStartOrdinal, isMessageIndexReconciledThrough, indexSingleMessage, indexMessagesAfterOrdinal, sweepOrphanedOpenCodeMessageIndexes, recordSessionProjectIdentity, COMPARTMENT_LEASE_RENEWAL_MS, acquireCompartmentLease, renewCompartmentLease, releaseCompartmentLease, isCompartmentLeaseHeld, piModelRefToCanonical, resolveModelRefForPi, modelRefLookupOrder, ompModelRefToCanonical, resolveModelRefForOmp, persistCachedM0, clearCachedM0M1, getCompartments, getLastCompartmentEndMessage, getLastCompartmentEndMessageId, getCompartmentsByEndMessageId, appendCompartments, saveRecompStagingPass, getRecompStaging, clearRecompStaging, getRecompPartialRange, setRecompPartialRange, escapeXmlAttr, escapeXmlContent, getModuleNoteEvaluationBridge, getContextStoreUuid, parseCompartmentOutput, resolveWorkspaceShareCategories, resolveWorkspaceIdentitySet, expandWorkspaceIdentitySetWithAliases, sourceNameForMemory, computeWorkspaceEpochFingerprint, bumpEpochsForWorkspaceMembers, readProjectDocsCanonical, copySessionStateForClone, getErrorMessage, describeError, setStoragePrivatePermissionEnforcement, getSchemaFenceRejection, getMigrationOnOpenRefusal, LATEST_SUPPORTED_VERSION, getDatabasePath, getPersistedSchemaVersion, setSqlitePragmaConfig, applySqliteTuningPragmas, runSqliteOptimize, openDatabase, openDatabaseAsync, queueM0Mutation, getMaxM0MutationId, queueMemoryMutation, getMemoryMutationsForRender, getMemoryMutationsForRenderByProjects, getMaxMemoryMutationId, getMaxMemoryMutationIdForProjects, MAX_EXECUTE_THRESHOLD, escalationBands, loadProtectedTailMeta, markProtectedTailPolicyV3Seeded, recordProtectedTailPublicationFloor, recordProtectedTailNoEligibleHead, getWrapupInProgressState, isWrapupInProgress, acquireWrapupInProgress, updateWrapupInProgress, releaseWrapupInProgress, resolveCompactionModeRecord, getCompactionModeRecord, setCompactionModeRecord, reserveProtectedTailDrainTokens, clearEmergencyDrainLatch, recordHistorianDrainFailure, clearHistorianDrainFailure, rollbackProtectedTailDrainReservation, clearPersistedReasoningWatermark, getEmergencyInputSample, setEmergencyDropSample, clearEmergencyDropSample, getLastNudgeUndropped, setLastNudgeUndropped, getChannel1NudgeState, setChannel1NudgeState, resetLastNudgeCycle, resetLastNudgeCycleIfTailShrank, getChannel2NudgeState, getChannel2NudgeClaim, setChannel2NudgeState, casChannel2NudgeState, claimChannel2NudgeState, casChannel2NudgeClaim, getPersistedNoteNudge, setPersistedNoteNudgeTrigger, setPersistedNoteNudgeTriggerMessageId, getNoteNudgeAnchors, getAutoSearchHintDecisions, deliverNoteNudgeAtomic, appendAutoSearchHintDecision, pruneNoteNudgeAnchors, pruneAutoSearchHintDecisions, getPersistedTodoSyntheticAnchor, setPersistedTodoSyntheticAnchor, clearPersistedTodoSyntheticAnchor, getNoteLastReadAt, getHistorianFailureState, incrementHistorianFailure, clearHistorianFailureState, getOverflowState, recordOverflowDetected, clearEmergencyRecovery, clearDetectedContextLimit, getStrippedPlaceholderIds, applyStrippedPlaceholderDelta, getProcessedImageStrippedIds, addProcessedImageStrippedIds, getPendingCompactionMarkerState, clearPendingCompactionMarkerStateIf, getPendingPiCompactionMarkerState, setPendingPiCompactionMarkerState, clearPendingPiCompactionMarkerStateIf, getSessionsWithPendingPiMarker, peekDeferredExecutePending, setDeferredExecutePendingIfAbsent, clearDeferredExecutePendingIfMatches, setSessionWorkMetrics, getSessionWorkMetrics, getOrCreateSessionMeta, updateSessionMeta, advanceToolReclaimWatermark, retryPendingSessionCleanups, getNotes, getSessionNotes, getPendingSmartNotes, getReadySmartNotes, markNoteReady, markNoteChecked, queuePendingOp, getPendingOps, clearPendingOps, removePendingOp, PRIMER_CANDIDATE_TTL_MS, PRIMER_CANDIDATE_MAX_AGE_MS, primerOccurrenceKey, primerOccurrenceUtcDay, insertPrimerCandidates, updatePrimerCandidateEmbedding, getPrimerCandidatesByIds, getPrimerCandidatesForPromotion, countPrimerCandidatesForProject, getActivePrimers, createPrimer, updatePrimerSupport, updatePrimerAnswer, GLOBAL_USER_PROFILE_PROJECT_PATH, getProjectState, bumpProjectUserProfileVersion, saveSourceContent, replaceSourceContent, getSourceContents, recordSubagentInvocation, getLatestHistorianInvocationId, CTX_REDUCE_KEEP, estimateImageTokensFromDataUrl, normalizeTodoStateJson, buildSyntheticTodoPart, stripChannel1ReminderSpans, effectiveTailHygiene, CHANNEL1_SENTINEL, CHANNEL1_FLOOR_TOKENS, decideChannel1, evaluateChannel2, buildChannel2Reminder, shouldUseStickyChannel1Reminder, buildChannel1Reminder, planEmergencyDrop, updateTagByteSize, AGE_RECLAIM_MIN_TOKENS, getOldestActiveUnprotectedToolTags, getActiveToolTagsForAgeReclaim, getTriggerTagTokenUpperBound, updateTagInputByteSize, updateTagTokenCount, getPersistedToolTagAccounting, getAllStatusTagTokenTotalsFlat, updateTagInputTokenCount, tagTokenCountIsNull, backfillTagTokenCounts, insertTag, updateTagStatus, updateTagDropMode, updateCavemanDepth, hasPiFallbackMessageTags, findAdoptableFallbackTags, hasPiFallbackToolOwnerTags, findPiFallbackToolOwnerTags, adoptPiFallbackToolOwnerTag, adoptPiFallbackMessageTag, getMaxTagNumberBySession, getTagNumberByMessageId, deriveTagLoadFloor, getTagsBySession, getActiveTagsBySession, getTagsForPendingOperations, getTagsByNumbers, getDroppedTagsByNumbers, getMaxDroppedTagNumber, getToolTagNumberByOwner, getNullOwnerToolTag, adoptNullOwnerToolTag, BoundedSessionMap, getWindowOverlay, resolveWindowOverlayFacts, deriveWindowGeometry, formatWindowDerivationLine, isSaneLimit, resolveOutputReserve, getSdkContextLimit, resolveModelConfigOrDefault, promptSurfaceHashMaterial, createPromptSurfaceRuntime, createPromptSurfaceGuidanceEpochCache, SYNTH_USER_ID_PREFIX, resolvePiStableId, isMidTurnPi, readPiSessionMessages, findLastModelKeyFromBranch, convertEntriesToRawMessages, withContentLanguageDirective, withMigrationLanguageDirective, buildPrimaryLanguageDirective, computeCueContentHash, hasMuralCueColumns, getMuralCueState, memoryNeedsCue, setMuralCue, recordMuralCueRejection, invalidateMemory, computeNormalizedHash, hasMemoryShareableColumn, hasMemoryClassifiedAtColumn, getUnclassifiedMemoryIds, insertMemory, getMemoryByHash, getMemoriesByProject, getMemoriesByProjects, getMaxMemoryIdForProjects, getAllActiveMemoriesForMigration, getMemoryById, setMemoryClassification, archiveMemory, deleteMemory, getMemoryCount, getMemoryCountsByStatus, USER_MEMORY_CANDIDATE_TTL_MS, insertUserMemoryCandidates, getUserMemoryCandidates, deleteUserMemoryCandidates, pruneExpiredUserMemoryCandidates, insertUserMemory, getActiveUserMemories, updateUserMemoryContent, dismissUserMemory, getOpenCodeDbPath2 as getOpenCodeDbPath, parseCron, nextOccurrence, nextDueAtMs, DEFAULT_EXECUTE_THRESHOLD_PERCENTAGE, DEFAULT_HISTORIAN_TIMEOUT_MS, buildCanonicalChunkTextFromFts, buildCompartmentSummaryFallbackText, canonicalizeInMemoryChunkTextForEmbedding, chunkCanonicalText, chunkEmbeddingWindowsAreCurrent, replaceCompartmentChunkEmbeddings, cosineSimilarity, GIT_SWEEP_LEASE_RENEWAL_MS, acquireGitSweepLease, renewGitSweepLease, markGitSweepSuccessAndRelease, parkGitSweepNonIndexable, releaseGitSweepLease, contentSha256, sweepStaleEmbeddingIdentitiesForProject, enqueueShadowEmbeddingItems, getProjectEmbeddingSnapshot, getProjectChunkEmbeddingModelId, getProjectEmbeddingMaxInputTokens, embedTextForProject, embedBatchForProject, embedItemsForProject, embedUnembeddedMemoriesForProject, drainCommitBacklogForProject, embedSessionCompartmentChunks, getEmbeddingCoverageStatus, promoteSessionFactsDurable, embedPromotedFacts, recordMemoryMapping, recordMemoryVerifications, getUnmappedMemoryIds, clearMemoryVerifications, getMemoryVerifications, resolveGitTopLevel, readGitHead, readGitChangedFilesSince, readGitFileChangeTimesSince, verificationFileExists, normalizeVerificationFiles, wakePlaneStatus, indexCommitsForProject, embedUnembeddedCommits, loadPiConfig, ensureProjectRegisteredFromPiDirectory, resolveMuralWire, updateCompactionMarkerAfterPublication, COMPARTMENT_RENDER_EPOCH, encodeCachedM0UpgradeIdentity, decodeCachedM0UpgradeIdentity, DEFAULT_HISTORY_BUDGET_TOKENS, renderCompartmentAtTier, renderDecayedCompartments, extractM0Block, TEMPORAL_MARKER_PATTERN, temporalMarkerPrefix, clearInjectionCache, getVisibleMemoryIds, renderMemoryBlock, DEFAULT_MEMORY_BUDGET_TOKENS, DEFAULT_USER_PROFILE_BUDGET_TOKENS, trimMemoriesToBudgetV2, trimWorkspaceMemoriesToBudgetV2, trimUserMemoriesToBudget, renderMemoryBlockV2, stripMemoryMuralBlock, unifiedSearch, rememberTodowriteToolCallTodos, parseTodos, setTodoSnapshot, registerTodoOverlay, registerTodoStateLifecycle, registerMagicContextTools };