Add unit tests for skill capabilities, skill planner, and UV setup

- Implement tests for random ID generation, ensuring preference for crypto.randomUUID.
- Create tests for runtime context capabilities, validating the injection of enabled skill capabilities.
- Add tests for skill capability parsing, including classification and command example extraction.
- Introduce tests for the skill planner, verifying tool call planning based on user requests and attachment requirements.
- Establish tests for UV setup, ensuring proper handling of Python installation scenarios and environment checks.
This commit is contained in:
DEV_DSW
2026-04-24 17:02:59 +08:00
parent e11a2296cc
commit 4c61e93c3e
42 changed files with 12560 additions and 224 deletions

View File

@@ -988,7 +988,7 @@ export class GatewayManager extends EventEmitter {
throw new Error('OpenClaw Gateway socket is not connected');
}
const requestId = `${method}-${randomUUID()}`;
const requestId = `${method}-${createRandomId()}`;
const timeoutMs = options?.timeoutMs ?? 30_000;
return await new Promise<unknown>((resolve, reject) => {
@@ -1488,7 +1488,7 @@ export class GatewayManager extends EventEmitter {
}
this.exitCode = null;
if (!reusingManagedProcess) {
this.gatewayToken = randomUUID();
this.gatewayToken = createRandomId();
}
this.setGatewayState({
state: wasAutoReconnectStart ? 'reconnecting' : 'starting',