()
| 1904 | } |
| 1905 | |
| 1906 | async function printHelp(): Promise<void> { |
| 1907 | // Use EXTERNAL_PERMISSION_MODES for help text — internal modes (bubble) |
| 1908 | // are ant-only and auto is feature-gated; they're still accepted by validation. |
| 1909 | const { EXTERNAL_PERMISSION_MODES } = await import('../types/permissions.js') |
| 1910 | const modes = EXTERNAL_PERMISSION_MODES.join(', ') |
| 1911 | const showServer = await isMultiSessionSpawnEnabled() |
| 1912 | const serverOptions = showServer |
| 1913 | ? ` --spawn <mode> Spawn mode: same-dir, worktree, session |
| 1914 | (default: same-dir) |
| 1915 | --capacity <N> Max concurrent sessions in worktree or |
| 1916 | same-dir mode (default: ${SPAWN_SESSIONS_DEFAULT}) |
| 1917 | --[no-]create-session-in-dir Pre-create a session in the current |
| 1918 | directory; in worktree mode this session |
| 1919 | stays in cwd while on-demand sessions get |
| 1920 | isolated worktrees (default: on) |
| 1921 | ` |
| 1922 | : '' |
| 1923 | const serverDescription = showServer |
| 1924 | ? ` |
| 1925 | Remote Control runs as a persistent server that accepts multiple concurrent |
| 1926 | sessions in the current directory. One session is pre-created on start so |
| 1927 | you have somewhere to type immediately. Use --spawn=worktree to isolate |
| 1928 | each on-demand session in its own git worktree, or --spawn=session for |
| 1929 | the classic single-session mode (exits when that session ends). Press 'w' |
| 1930 | during runtime to toggle between same-dir and worktree. |
| 1931 | ` |
| 1932 | : '' |
| 1933 | const serverNote = showServer |
| 1934 | ? ` - Worktree mode requires a git repository or WorktreeCreate/WorktreeRemove hooks |
| 1935 | ` |
| 1936 | : '' |
| 1937 | const help = ` |
| 1938 | Remote Control - Connect your local environment to Noumena Code Web |
| 1939 | |
| 1940 | USAGE |
| 1941 | code remote-control [options] |
| 1942 | OPTIONS |
| 1943 | --name <name> Name for the session (shown in Noumena Code Web) |
| 1944 | ${ |
| 1945 | feature('KAIROS') |
| 1946 | ? ` -c, --continue Resume the last session in this directory |
| 1947 | --session-id <id> Resume a specific session by ID (cannot be |
| 1948 | used with spawn flags or --continue) |
| 1949 | ` |
| 1950 | : '' |
| 1951 | } --permission-mode <mode> Permission mode for spawned sessions |
| 1952 | (${modes}) |
| 1953 | --debug-file <path> Write debug logs to file |
| 1954 | -v, --verbose Enable verbose output |
| 1955 | -h, --help Show this help |
| 1956 | ${serverOptions} |
| 1957 | DESCRIPTION |
| 1958 | Remote Control allows you to control sessions on your local device from |
| 1959 | Noumena Code Web (https://console.noumena.com/code). Run this command in the |
| 1960 | directory you want to work in, then connect from the Noumena web app. |
| 1961 | ${serverDescription} |
| 1962 | NOTES |
| 1963 | - You must be logged in with a managed Noumena account |
no test coverage detected