fix(ci): repair main checks · openclaw/openclaw@8c53d10
steipete
·
2026-05-30
·
via Recent Commits to openclaw:main
File tree
extensions/codex-supervisor/src
| Original file line number | Diff line number | Diff line change |
|---|
@@ -73,13 +73,13 @@ function readIntegerParam(params: Record<string, unknown>, key: string): number
|
73 | 73 | if (value === undefined) { |
74 | 74 | return undefined; |
75 | 75 | } |
76 | | -if (!Number.isInteger(value)) { |
| 76 | +if (typeof value !== "number" || !Number.isInteger(value)) { |
77 | 77 | throw new Error(`${key} must be an integer`); |
78 | 78 | } |
79 | 79 | if (value < 1 || value > 1000) { |
80 | 80 | throw new Error(`${key} must be between 1 and 1000`); |
81 | 81 | } |
82 | | -return value as number; |
| 82 | +return value; |
83 | 83 | } |
84 | 84 | |
85 | 85 | function readModeParam(params: Record<string, unknown>): CodexSupervisorTurnMode | undefined { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -16,6 +16,11 @@ type MockAllowlistResult = {
|
16 | 16 | segments: MockAllowlistSegment[]; |
17 | 17 | segmentAllowlistEntries: unknown[]; |
18 | 18 | }; |
| 19 | +type MockExecApprovalAllowlistEntry = { |
| 20 | +pattern: string; |
| 21 | +source?: string; |
| 22 | +commandText?: string; |
| 23 | +}; |
19 | 24 | |
20 | 25 | const INLINE_EVAL_HIT = { |
21 | 26 | executable: "python3", |
@@ -55,7 +60,7 @@ const evaluateShellAllowlistMock = vi.hoisted(() =>
|
55 | 60 | ); |
56 | 61 | const resolveExecApprovalsFromFileMock = vi.hoisted(() => |
57 | 62 | vi.fn(() => ({ |
58 | | -allowlist: [], |
| 63 | +allowlist: [] as MockExecApprovalAllowlistEntry[], |
59 | 64 | file: { version: 1, agents: {} }, |
60 | 65 | agent: { |
61 | 66 | security: "full", |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -167,6 +167,11 @@ describe("setupOfficialPluginInstalls", () => {
|
167 | 167 | label: "PixVerse", |
168 | 168 | hint: "OpenClaw PixVerse video generation provider plugin", |
169 | 169 | }, |
| 170 | +{ |
| 171 | +value: "tokenjuice", |
| 172 | +label: "Tokenjuice", |
| 173 | +hint: "OpenClaw tokenjuice exec output compaction plugin", |
| 174 | +}, |
170 | 175 | { |
171 | 176 | value: "voice-call", |
172 | 177 | label: "Voice Call", |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。