(localPath)
| 764 | } |
| 765 | |
| 766 | export function validateLocalAgentServerPath(localPath) { |
| 767 | if (!path.isAbsolute(localPath)) { |
| 768 | throw new Error( |
| 769 | `OH_AGENT_SERVER_LOCAL_PATH must be an absolute path, got: ${localPath}`, |
| 770 | ); |
| 771 | } |
| 772 | if (!existsSync(localPath)) { |
| 773 | throw new Error(`OH_AGENT_SERVER_LOCAL_PATH does not exist: ${localPath}`); |
| 774 | } |
| 775 | for (const subdir of LOCAL_AGENT_SERVER_SUBDIRS) { |
| 776 | const subdirPath = path.join(localPath, subdir); |
| 777 | if (!existsSync(subdirPath)) { |
| 778 | throw new Error( |
| 779 | `OH_AGENT_SERVER_LOCAL_PATH is missing expected workspace package '${subdir}': ${subdirPath}`, |
| 780 | ); |
| 781 | } |
| 782 | } |
| 783 | } |
| 784 | |
| 785 | async function waitForServer(url, timeoutMs = DEFAULT_WAIT_TIMEOUT_MS) { |
| 786 | const startedAt = Date.now(); |
no outgoing calls
no test coverage detected