Skip to content

Commit f37a196

Browse files
committed
fix(ci): restore protocol and schema checks
1 parent 5b03ce7 commit f37a196

File tree

3 files changed

+91
-1
lines changed

3 files changed

+91
-1
lines changed

apps/macos/Sources/OpenClawProtocol/GatewayModels.swift

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1460,6 +1460,20 @@ public struct ConfigPatchParams: Codable, Sendable {
14601460

14611461
public struct ConfigSchemaParams: Codable, Sendable {}
14621462

1463+
public struct ConfigSchemaLookupParams: Codable, Sendable {
1464+
public let path: String
1465+
1466+
public init(
1467+
path: String)
1468+
{
1469+
self.path = path
1470+
}
1471+
1472+
private enum CodingKeys: String, CodingKey {
1473+
case path
1474+
}
1475+
}
1476+
14631477
public struct ConfigSchemaResponse: Codable, Sendable {
14641478
public let schema: AnyCodable
14651479
public let uihints: [String: AnyCodable]
@@ -1486,6 +1500,36 @@ public struct ConfigSchemaResponse: Codable, Sendable {
14861500
}
14871501
}
14881502

1503+
public struct ConfigSchemaLookupResult: Codable, Sendable {
1504+
public let path: String
1505+
public let schema: AnyCodable
1506+
public let hint: [String: AnyCodable]?
1507+
public let hintpath: String?
1508+
public let children: [[String: AnyCodable]]
1509+
1510+
public init(
1511+
path: String,
1512+
schema: AnyCodable,
1513+
hint: [String: AnyCodable]?,
1514+
hintpath: String?,
1515+
children: [[String: AnyCodable]])
1516+
{
1517+
self.path = path
1518+
self.schema = schema
1519+
self.hint = hint
1520+
self.hintpath = hintpath
1521+
self.children = children
1522+
}
1523+
1524+
private enum CodingKeys: String, CodingKey {
1525+
case path
1526+
case schema
1527+
case hint
1528+
case hintpath = "hintPath"
1529+
case children
1530+
}
1531+
}
1532+
14891533
public struct WizardStartParams: Codable, Sendable {
14901534
public let mode: AnyCodable?
14911535
public let workspace: String?

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

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1460,6 +1460,20 @@ public struct ConfigPatchParams: Codable, Sendable {
14601460

14611461
public struct ConfigSchemaParams: Codable, Sendable {}
14621462

1463+
public struct ConfigSchemaLookupParams: Codable, Sendable {
1464+
public let path: String
1465+
1466+
public init(
1467+
path: String)
1468+
{
1469+
self.path = path
1470+
}
1471+
1472+
private enum CodingKeys: String, CodingKey {
1473+
case path
1474+
}
1475+
}
1476+
14631477
public struct ConfigSchemaResponse: Codable, Sendable {
14641478
public let schema: AnyCodable
14651479
public let uihints: [String: AnyCodable]
@@ -1486,6 +1500,36 @@ public struct ConfigSchemaResponse: Codable, Sendable {
14861500
}
14871501
}
14881502

1503+
public struct ConfigSchemaLookupResult: Codable, Sendable {
1504+
public let path: String
1505+
public let schema: AnyCodable
1506+
public let hint: [String: AnyCodable]?
1507+
public let hintpath: String?
1508+
public let children: [[String: AnyCodable]]
1509+
1510+
public init(
1511+
path: String,
1512+
schema: AnyCodable,
1513+
hint: [String: AnyCodable]?,
1514+
hintpath: String?,
1515+
children: [[String: AnyCodable]])
1516+
{
1517+
self.path = path
1518+
self.schema = schema
1519+
self.hint = hint
1520+
self.hintpath = hintpath
1521+
self.children = children
1522+
}
1523+
1524+
private enum CodingKeys: String, CodingKey {
1525+
case path
1526+
case schema
1527+
case hint
1528+
case hintpath = "hintPath"
1529+
case children
1530+
}
1531+
}
1532+
14891533
public struct WizardStartParams: Codable, Sendable {
14901534
public let mode: AnyCodable?
14911535
public let workspace: String?

src/config/schema.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,9 @@ describe("config schema", () => {
272272
});
273273

274274
it("rejects overly deep lookup paths", () => {
275-
const buildNestedObjectSchema = (segments: string[]) => {
275+
const buildNestedObjectSchema = (
276+
segments: string[],
277+
): { type: string; properties?: Record<string, unknown> } => {
276278
const [head, ...rest] = segments;
277279
if (!head) {
278280
return { type: "string" };

0 commit comments

Comments
 (0)