(localPath)
| 819 | } |
| 820 | |
| 821 | export function validateLocalAgentServerPath(localPath) { |
| 822 | if (!path.isAbsolute(localPath)) { |
| 823 | throw new Error( |
| 824 | `OH_AGENT_SERVER_LOCAL_PATH must be an absolute path, got: ${localPath}`, |
| 825 | ); |
| 826 | } |
| 827 | if (!existsSync(localPath)) { |
| 828 | throw new Error(`OH_AGENT_SERVER_LOCAL_PATH does not exist: ${localPath}`); |
| 829 | } |
| 830 | for (const subdir of LOCAL_AGENT_SERVER_SUBDIRS) { |
| 831 | const subdirPath = path.join(localPath, subdir); |
| 832 | if (!existsSync(subdirPath)) { |
| 833 | throw new Error( |
| 834 | `OH_AGENT_SERVER_LOCAL_PATH is missing expected workspace package '${subdir}': ${subdirPath}`, |
| 835 | ); |
| 836 | } |
| 837 | } |
| 838 | } |
| 839 | |
| 840 | async function waitForServer(url, timeoutMs = DEFAULT_WAIT_TIMEOUT_MS) { |
| 841 | const startedAt = Date.now(); |
no outgoing calls
no test coverage detected