Skip to content

Commit c360db4

Browse files
committed
fix ci mainline checks
1 parent 522d0f7 commit c360db4

8 files changed

Lines changed: 116 additions & 8 deletions

File tree

apps/shared/OpenClawKit/Sources/OpenClawProtocol/GatewayModels.swift

Lines changed: 83 additions & 3 deletions
Large diffs are not rendered by default.

extensions/codex-supervisor/src/supervisor.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,12 @@ describe("connectCodexAppServerEndpoint", () => {
808808
const sawProbeRequest = new Promise<void>((resolve) => {
809809
server.once("connection", (socket) => {
810810
socket.on("message", (data) => {
811-
const request = JSON.parse(data.toString()) as Record<string, unknown>;
811+
const text = Array.isArray(data)
812+
? Buffer.concat(data).toString("utf8")
813+
: data instanceof ArrayBuffer
814+
? Buffer.from(new Uint8Array(data)).toString("utf8")
815+
: Buffer.from(data).toString("utf8");
816+
const request = JSON.parse(text) as Record<string, unknown>;
812817
if (request.method === "initialize") {
813818
socket.send(JSON.stringify({ id: request.id, result: {} }));
814819
}

extensions/codex-supervisor/src/supervisor.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,9 @@ export class CodexSupervisor {
482482
}
483483
}
484484
if (endpointIds.size === 1) {
485-
return Array.from(endpointIds)[0]!;
485+
for (const endpointId of endpointIds) {
486+
return endpointId;
487+
}
486488
}
487489
if (endpointIds.size > 1) {
488490
throw new Error(`Codex thread id is ambiguous across endpoints: ${params.threadId}`);

scripts/protocol-gen-swift.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,31 @@ const STRICT_LITERAL_STRUCTS = new Set([
4141
]);
4242

4343
const DEFAULTED_OPTIONAL_INIT_PARAMS: Record<string, Set<string>> = {
44+
SessionOperationEvent: new Set(["agentId"]),
45+
SessionsCompactionBranchParams: new Set(["agentId"]),
46+
SessionsCompactionGetParams: new Set(["agentId"]),
47+
SessionsCompactionListParams: new Set(["agentId"]),
48+
SessionsCompactionRestoreParams: new Set(["agentId"]),
49+
SessionsCompactParams: new Set(["agentId"]),
50+
SessionsDeleteParams: new Set(["agentId"]),
51+
SessionsMessagesSubscribeParams: new Set(["agentId"]),
52+
SessionsMessagesUnsubscribeParams: new Set(["agentId"]),
53+
SessionsPatchParams: new Set(["agentId"]),
54+
SessionsResetParams: new Set(["agentId"]),
55+
SessionsSendParams: new Set(["agentId"]),
4456
SessionsAbortParams: new Set(["agentId"]),
4557
SessionsUsageParams: new Set(["agentId", "agentScope"]),
4658
ArtifactsListParams: new Set(["agentId"]),
4759
ArtifactsGetParams: new Set(["agentId"]),
4860
ArtifactsDownloadParams: new Set(["agentId"]),
61+
ChatAbortParams: new Set(["agentId"]),
62+
ChatAbortedEvent: new Set(["agentId"]),
63+
ChatDeltaEvent: new Set(["agentId"]),
64+
ChatErrorEvent: new Set(["agentId"]),
65+
ChatFinalEvent: new Set(["agentId"]),
66+
ChatHistoryParams: new Set(["agentId"]),
67+
ChatInjectParams: new Set(["agentId"]),
68+
ChatSendParams: new Set(["agentId"]),
4969
MessageActionParams: new Set(["inboundTurnKind"]),
5070
CronRunLogEntry: new Set(["errorReason", "failureNotificationDelivery"]),
5171
ExecApprovalRequestParams: new Set(["requireDeliveryRoute", "suppressDelivery"]),

src/agents/openai-tool-schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function resolveStrictOpenAISchemaCacheKey(
4545
]);
4646
}
4747

48-
function readCachedStrictOpenAISchema(schema: object, key: string): unknown | undefined {
48+
function readCachedStrictOpenAISchema(schema: object, key: string): unknown {
4949
return strictOpenAISchemaCache.get(schema)?.find((entry) => entry.key === key)?.value;
5050
}
5151

src/commands/agent.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1208,7 +1208,7 @@ describe("agentCommand", () => {
12081208

12091209
callArgs = getLastEmbeddedCall();
12101210
expect(callArgs?.agentId).toBe("ops");
1211-
expect(callArgs?.sessionKey).toBe("agent:ops:global");
1211+
expect(callArgs?.sessionKey).toBe("global");
12121212
});
12131213
});
12141214

src/gateway/chat-abort.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { resolveDefaultAgentId } from "../agents/agent-scope-config.js";
22
import { isAbortRequestText } from "../auto-reply/reply/abort-primitives.js";
3-
import type { OpenClawConfig } from "../config/config.js";
3+
import type { OpenClawConfig } from "../config/types.openclaw.js";
44
import { emitAgentEvent } from "../infra/agent-events.js";
55

66
const DEFAULT_CHAT_RUN_ABORT_GRACE_MS = 60_000;

src/wizard/setup.official-plugins.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ describe("resolveOfficialPluginOnboardingInstallEntries", () => {
2828
expect(pluginIds).toContain("diagnostics-otel");
2929
expect(pluginIds).toContain("diagnostics-prometheus");
3030
expect(pluginIds).toContain("acpx");
31+
expect(pluginIds).toContain("tokenjuice");
3132
expect(pluginIds).not.toContain("brave");
3233
expect(pluginIds).not.toContain("codex");
3334
expect(pluginIds).not.toContain("discord");

0 commit comments

Comments
 (0)