/** CLI 버전 (package.json) — 버그 리포트 템플릿이 요구하는 정보라 -v로 노출한다 */ export declare function cliVersion(): string; export declare const HELP_TEXT = "crosspane \u2014 debug web screens where devtools can't reach\n\nStarts the crosspane hub: a dashboard that receives live sessions from the\n@crosspane/agent SDK (webviews, in-app browsers, kiosks) and replays exported\n.crosspane.json capture files.\n\nUsage:\n crosspane [options]\n crosspane mcp [--hub ]\n\nExamples:\n crosspane # dashboard on http://localhost:7788 (replay files, local agents)\n crosspane --tunnel --write-env # reachable from any device, address written into .env.local\n crosspane mcp # MCP server: let a coding agent query live sessions\n\nOptions:\n --port Dashboard port (default: 7788; the default port falls back +1\n when taken \u2014 an explicitly given port does not)\n --host Bind address (default: 127.0.0.1 \u2014 local only. Use 0.0.0.0 to\n receive live agent sessions from phones/devices on your network.\n Exposing the hub generates two credentials: a write-only ingest key\n for the agent (?k=, safe in a deployed page whose source anyone can\n read) and a read token for the dashboard (?t=, keep it off your\n pages). Use --write-env and you never copy either by hand)\n --write-env [file] Write this hub's address into an env file so the agent needs no\n arguments at all \u2014 defaults to .env.local.\n Read by Vite/Next/CRA/Astro; the variable name is picked from your\n package.json. Removed again when the hub stops\n --tls-cert Serve the hub over https/wss with this certificate (needs --tls-key).\n Required to debug an https:// page: browsers block plain ws:// from a\n secure page, and there is no way around it. The certificate has to be\n one the device already trusts \u2014 see \"Debugging an https:// page\" below\n --tls-key Private key for --tls-cert\n --lan-tls Serve the hub over https/wss on your LAN with a certificate devices\n already trust, so a deployed https:// page can reach it from the same\n Wi-Fi \u2014 no tunnel, no account, nothing to install. The device asks\n once for permission to reach your local network; allow it.\n Uses the published *.local-ip.sh certificate (its private key is\n public by design, so this buys trust, not secrecy \u2014 reading sessions\n still needs the ?t= token)\n --tunnel Start a tunnel with an installed cloudflared or ngrok and advertise\n its address \u2014 one command instead of two terminals and a copy-paste.\n Needed for an https:// page, which cannot use plain ws://.\n Session logs transit that provider; nothing is downloaded for you.\n Pair with --write-env and there is nothing to copy at all\n --hostname Use a permanent address instead of a throwaway one, e.g.\n crosspane.example.com. With --tunnel, crosspane creates and routes a\n named Cloudflare tunnel for you (idempotent, so it is also the daily\n command). Needed for a deployed app, whose address lives in your\n deployment config and must not change. Requires a Cloudflare-managed\n domain and one \"cloudflared tunnel login\".\n Defaults to $CROSSPANE_HOSTNAME\n --public-url Address to advertise instead of the LAN one, for when the hub sits\n behind a tunnel or reverse proxy (e.g. https://xyz.trycloudflare.com).\n --write-env and the dashboard both use it. **Given once, remembered** \u2014\n later runs need no flag. Pass an empty string to forget it.\n Also reads $CROSSPANE_PUBLIC_URL\n --ingest-key Require senders to include ?k= as well. Off by default so the\n address is all your app needs; the cost of turning it on is carrying\n the key in your app's env var. Worth it for a hub that is long-lived\n and shared, where junk sessions from strangers would be a nuisance.\n Reading sessions always needs the ?t= token, key or no key.\n Defaults to $CROSSPANE_INGEST_KEY\n --no-open Don't open the dashboard in your browser automatically\n --no-auth Disable the access token that --host adds. Only do this on a\n network you fully trust: without it, anyone who can reach the\n hub can read every session's logs and inject fake sessions\n --verbose Diagnostic logging \u2014 include this output when filing a bug report\n -h, --help Show this help\n -v, --version Print the crosspane version\n\nOne setup for every environment:\n npm install @crosspane/agent\n\n import { initCrosspane } from '@crosspane/agent'\n initCrosspane({\n label: 'checkout webview',\n serverUrl: process.env.NEXT_PUBLIC_CROSSPANE_URL, // Vite: import.meta.env.VITE_...\n })\n\n NEXT_PUBLIC_CROSSPANE_URL=https://crosspane.example.com\n\n Just the address, like any other base URL, and the same value works from localhost, a phone,\n a deployed http:// or https:// page and over cellular. Sending sessions needs no credential;\n reading them needs the ?t= token, which stays on this machine.\n\n For a hub reachable from anywhere, one command:\n crosspane --tunnel --write-env\n It starts your installed cloudflared/ngrok, advertises that address, and writes it into\n .env.local \u2014 nothing to copy. Stopping the hub stops the tunnel and removes the entry.\n\n A deployed app needs an address that does not change, since it lives in your deployment\n config. Give it a hostname and crosspane sets the permanent tunnel up itself:\n cloudflared tunnel login # once, opens a browser\n crosspane --tunnel --hostname crosspane.example.com # every day (idempotent)\n It creates the named tunnel, routes DNS and runs it. Only the login needs a human: a\n permanent hostname belongs to an account, and that account needs a browser once.\n (ngrok free refuses custom subdomains; Tailscale Funnel gives a stable *.ts.net with no\n domain at all \u2014 point --public-url at it instead.)\n\n On localhost you can omit the env var entirely \u2014 the agent finds http://localhost:7788 itself.\n\nWho actually streams:\n By default every install with that address does, which is what a dev or QA build wants. If the\n same build reaches people you would rather not hear from, gate on what your app already knows \u2014\n enabled: false installs no hooks at all:\n initCrosspane({ serverUrl: HUB, enabled: () => user.isQA })\n That is the right gate for a webview the app opens itself: there is no address bar in one, so\n nothing URL-based works there. For a page with no user model, isDebugActivated gates on a link\n (?__crosspane=on / =off) instead. agent.copyCapture() needs no network at all.\n\nCan't route logs through a tunnel?\n Any of these replaces it and the app code above is unchanged \u2014 only the address differs:\n - a team hub on your own infrastructure with a normal certificate\n - your own certificate: --tls-cert / --tls-key, when the page is on the same network as the\n hub (an internal staging site). A self-signed one does NOT work in app webviews: since\n Android 7 apps do not trust user-installed CAs\n - a reverse proxy on your own origin: --public-url https://staging.example.com/__crosspane\n - plain HTTP on your LAN: --host 0.0.0.0 --write-env. Simplest, but an https:// page cannot\n use it \u2014 browsers block plain ws:// there\n\nMCP mode (crosspane mcp):\n Exposes the running hub's sessions to a coding agent over stdio, so it can ask\n \"why did the payment webview fail?\" and read the console/network itself.\n Register it with your agent, e.g. in .mcp.json:\n { \"mcpServers\": { \"crosspane\": { \"command\": \"crosspane\", \"args\": [\"mcp\"] } } }\n\n --hub Hub to attach to (default: http://127.0.0.1:7788). If the hub was\n started with --host it requires its access token \u2014 pass the full\n URL including it: --hub 'http://127.0.0.1:7788/?t='\n"; export interface CliOptions { port: number; /** --port로 명시했는지 — 명시 시 자동 폴백 없이 그 포트만 시도한다 */ portExplicit: boolean; /** 허브 바인드 주소 — 기본 127.0.0.1. 라이브 에이전트 수신은 명시적 노출 필요 */ host: string; /** 기동 후 대시보드를 기본 브라우저로 여는지 (기본 켜짐, --no-open으로 끔) */ openBrowser: boolean; /** 진단 로깅 (--verbose 또는 CROSSPANE_VERBOSE=1) */ verbose: boolean; /** 노출된 허브의 접속 토큰을 끈다 (사내 자동화용 탈출구) */ noAuth: boolean; /** 허브 주소를 적을 env 파일 경로. undefined면 쓰지 않는다 */ writeEnv: string | undefined; /** TLS 인증서·키 파일 경로 — 주면 허브가 https/wss로 뜬다 (https 페이지 지원) */ tlsCert: string | undefined; tlsKey: string | undefined; /** 터널·리버스 프록시 뒤에 있을 때 안내할 외부 주소 */ publicUrl: string | undefined; /** * 고정 인제스트 키. 주지 않으면 재시작마다 새로 만든다. * * 왜 고정할 수 있어야 하는가: 배포된 앱에 들어가는 주소가 이 키를 담는데, 키가 매번 * 바뀌면 허브를 재시작할 때마다 **앱을 다시 배포해야 한다**. 쓰기 전용이라 공개돼도 * 되는 값이므로 회전시킬 이유가 없다 — 고정 주소(고정 터널·팀 허브)와 합치면 * 앱에 넣는 값이 영구히 그대로다. */ ingestKey: string | undefined; /** `--tunnel` — 설치된 cloudflared/ngrok을 허브가 직접 띄워 그 주소를 쓴다 */ tunnel: boolean; /** * `--lan-tls` — 기기가 신뢰하는 인증서로 LAN 허브를 https/wss로 띄운다. * 배포된 https 페이지를 **터널·계정·설치 없이** 같은 Wi-Fi에서 보기 위한 것이다. */ lanTls: boolean; /** * `--hostname` — 고정 주소 named 터널. 배포된 앱은 주소가 배포 설정에 들어가므로 * 실행마다 바뀌는 퀵 터널로는 안 된다. 주면 create·route까지 우리가 한다. */ hostname: string | undefined; } /** `--write-env`에 경로를 주지 않았을 때. Vite·Next·CRA·Astro가 모두 읽고, 보통 gitignore돼 있다 */ export declare const DEFAULT_ENV_FILE = ".env.local"; export declare function parseCliArguments(argv: string[]): CliOptions; export interface McpCliOptions { /** 붙을 허브 주소 */ hubUrl: string; verbose: boolean; } /** `crosspane mcp` 이후의 인자 (서브커맨드 토큰은 호출자가 제거해 넘긴다) */ export declare function parseMcpArguments(argv: string[]): McpCliOptions;