mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 16:30:57 +00:00
test: allow slow packaged agent acceptance
This commit is contained in:
@@ -205,17 +205,21 @@ async function runSubagentCleanupScenario(params: {
|
||||
const { gateway, pidPath, pidsPath, exitPath } = params;
|
||||
await resetProbeFiles({ pidPath, pidsPath, exitPath });
|
||||
|
||||
const run = await gateway.request<AgentRunResult>("agent", {
|
||||
message: "Use available context and then stop.",
|
||||
sessionKey: `agent:main:subagent:docker-${randomUUID()}`,
|
||||
agentId: "main",
|
||||
lane: "subagent",
|
||||
cleanupBundleMcpOnRunEnd: true,
|
||||
idempotencyKey: randomUUID(),
|
||||
deliver: false,
|
||||
timeout: 90,
|
||||
bestEffortDeliver: true,
|
||||
});
|
||||
const run = await gateway.request<AgentRunResult>(
|
||||
"agent",
|
||||
{
|
||||
message: "Use available context and then stop.",
|
||||
sessionKey: `agent:main:subagent:docker-${randomUUID()}`,
|
||||
agentId: "main",
|
||||
lane: "subagent",
|
||||
cleanupBundleMcpOnRunEnd: true,
|
||||
idempotencyKey: randomUUID(),
|
||||
deliver: false,
|
||||
timeout: 90,
|
||||
bestEffortDeliver: true,
|
||||
},
|
||||
{ timeoutMs: 240_000 },
|
||||
);
|
||||
assert(
|
||||
run.status === "accepted" && run.runId,
|
||||
`agent did not accept subagent cleanup run: ${JSON.stringify(run)}`,
|
||||
|
||||
@@ -33,7 +33,7 @@ export const ClaudePermissionNotificationSchema = z.object({
|
||||
export type ClaudeChannelNotification = z.infer<typeof ClaudeChannelNotificationSchema>["params"];
|
||||
|
||||
export type GatewayRpcClient = {
|
||||
request<T>(method: string, params?: unknown): Promise<T>;
|
||||
request<T>(method: string, params?: unknown, opts?: { timeoutMs?: number }): Promise<T>;
|
||||
events: Array<{ event: string; payload: Record<string, unknown> }>;
|
||||
close(): Promise<void>;
|
||||
};
|
||||
@@ -266,8 +266,12 @@ async function connectGatewayOnce(params: {
|
||||
await sendGatewayRequest("sessions.subscribe", {}, GATEWAY_RPC_TIMEOUT_MS);
|
||||
|
||||
return {
|
||||
request(method, requestParams) {
|
||||
return sendGatewayRequest(method, requestParams, GATEWAY_REQUEST_TIMEOUT_MS);
|
||||
request(method, requestParams, opts) {
|
||||
return sendGatewayRequest(
|
||||
method,
|
||||
requestParams,
|
||||
opts?.timeoutMs ?? GATEWAY_REQUEST_TIMEOUT_MS,
|
||||
);
|
||||
},
|
||||
events,
|
||||
async close() {
|
||||
|
||||
Reference in New Issue
Block a user