// Force strict mode and setup for ESM
"use strict";
import {
  init_esbuild_shims
} from "./chunk-A4BMJM77.js";
import {
  __name
} from "./chunk-J2S4EL5Y.js";

// packages/acp-bridge/src/workspacePaths.ts
init_esbuild_shims();
import { realpathSync } from "node:fs";
import * as path from "node:path";
function canonicalizeWorkspace(p) {
  const resolved = path.resolve(p);
  try {
    return realpathSync.native(resolved);
  } catch (err) {
    if (err && typeof err === "object" && err.code === "ENOENT") {
      return resolved;
    }
    throw err;
  }
}
__name(canonicalizeWorkspace, "canonicalizeWorkspace");
var MAX_WORKSPACE_PATH_LENGTH = 4096;

export {
  canonicalizeWorkspace,
  MAX_WORKSPACE_PATH_LENGTH
};
/**
 * @license
 * Copyright 2025 Qwen Team
 * SPDX-License-Identifier: Apache-2.0
 */
