mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-25 23:47:20 +00:00
fix(ci): refresh protocol models and align channel tests
This commit is contained in:
@@ -2893,6 +2893,78 @@ public struct SkillsBinsResult: Codable, Sendable {
|
||||
}
|
||||
}
|
||||
|
||||
public struct SkillsSearchParams: Codable, Sendable {
|
||||
public let query: String?
|
||||
public let limit: Int?
|
||||
|
||||
public init(
|
||||
query: String?,
|
||||
limit: Int?)
|
||||
{
|
||||
self.query = query
|
||||
self.limit = limit
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case query
|
||||
case limit
|
||||
}
|
||||
}
|
||||
|
||||
public struct SkillsSearchResult: Codable, Sendable {
|
||||
public let results: [[String: AnyCodable]]
|
||||
|
||||
public init(
|
||||
results: [[String: AnyCodable]])
|
||||
{
|
||||
self.results = results
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case results
|
||||
}
|
||||
}
|
||||
|
||||
public struct SkillsDetailParams: Codable, Sendable {
|
||||
public let slug: String
|
||||
|
||||
public init(
|
||||
slug: String)
|
||||
{
|
||||
self.slug = slug
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case slug
|
||||
}
|
||||
}
|
||||
|
||||
public struct SkillsDetailResult: Codable, Sendable {
|
||||
public let skill: AnyCodable
|
||||
public let latestversion: AnyCodable?
|
||||
public let metadata: AnyCodable?
|
||||
public let owner: AnyCodable?
|
||||
|
||||
public init(
|
||||
skill: AnyCodable,
|
||||
latestversion: AnyCodable?,
|
||||
metadata: AnyCodable?,
|
||||
owner: AnyCodable?)
|
||||
{
|
||||
self.skill = skill
|
||||
self.latestversion = latestversion
|
||||
self.metadata = metadata
|
||||
self.owner = owner
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case skill
|
||||
case latestversion = "latestVersion"
|
||||
case metadata
|
||||
case owner
|
||||
}
|
||||
}
|
||||
|
||||
public struct CronJob: Codable, Sendable {
|
||||
public let id: String
|
||||
public let agentid: String?
|
||||
|
||||
@@ -2893,6 +2893,78 @@ public struct SkillsBinsResult: Codable, Sendable {
|
||||
}
|
||||
}
|
||||
|
||||
public struct SkillsSearchParams: Codable, Sendable {
|
||||
public let query: String?
|
||||
public let limit: Int?
|
||||
|
||||
public init(
|
||||
query: String?,
|
||||
limit: Int?)
|
||||
{
|
||||
self.query = query
|
||||
self.limit = limit
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case query
|
||||
case limit
|
||||
}
|
||||
}
|
||||
|
||||
public struct SkillsSearchResult: Codable, Sendable {
|
||||
public let results: [[String: AnyCodable]]
|
||||
|
||||
public init(
|
||||
results: [[String: AnyCodable]])
|
||||
{
|
||||
self.results = results
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case results
|
||||
}
|
||||
}
|
||||
|
||||
public struct SkillsDetailParams: Codable, Sendable {
|
||||
public let slug: String
|
||||
|
||||
public init(
|
||||
slug: String)
|
||||
{
|
||||
self.slug = slug
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case slug
|
||||
}
|
||||
}
|
||||
|
||||
public struct SkillsDetailResult: Codable, Sendable {
|
||||
public let skill: AnyCodable
|
||||
public let latestversion: AnyCodable?
|
||||
public let metadata: AnyCodable?
|
||||
public let owner: AnyCodable?
|
||||
|
||||
public init(
|
||||
skill: AnyCodable,
|
||||
latestversion: AnyCodable?,
|
||||
metadata: AnyCodable?,
|
||||
owner: AnyCodable?)
|
||||
{
|
||||
self.skill = skill
|
||||
self.latestversion = latestversion
|
||||
self.metadata = metadata
|
||||
self.owner = owner
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case skill
|
||||
case latestversion = "latestVersion"
|
||||
case metadata
|
||||
case owner
|
||||
}
|
||||
}
|
||||
|
||||
public struct CronJob: Codable, Sendable {
|
||||
public let id: String
|
||||
public let agentid: String?
|
||||
|
||||
@@ -99,9 +99,6 @@ beforeAll(async () => {
|
||||
describe("discordPlugin outbound", () => {
|
||||
it("forwards mediaLocalRoots to sendMessageDiscord", async () => {
|
||||
const sendMessageDiscord = vi.fn(async () => ({ messageId: "m1" }));
|
||||
installDiscordRuntime({
|
||||
sendMessageDiscord,
|
||||
});
|
||||
|
||||
const result = await discordPlugin.outbound!.sendMedia!({
|
||||
cfg: {} as OpenClawConfig,
|
||||
@@ -110,6 +107,9 @@ describe("discordPlugin outbound", () => {
|
||||
mediaUrl: "/tmp/image.png",
|
||||
mediaLocalRoots: ["/tmp/agent-root"],
|
||||
accountId: "work",
|
||||
deps: {
|
||||
discord: sendMessageDiscord,
|
||||
},
|
||||
});
|
||||
|
||||
expect(sendMessageDiscord).toHaveBeenCalledWith(
|
||||
|
||||
@@ -7,7 +7,17 @@ import * as probeModule from "./probe.js";
|
||||
import type { OpenClawConfig } from "./runtime-api.js";
|
||||
import { clearSlackRuntime, setSlackRuntime } from "./runtime.js";
|
||||
|
||||
const handleSlackActionMock = vi.fn();
|
||||
const { handleSlackActionMock } = vi.hoisted(() => ({
|
||||
handleSlackActionMock: vi.fn(),
|
||||
}));
|
||||
|
||||
vi.mock("./action-runtime.js", async (importOriginal) => {
|
||||
const actual = await importOriginal<typeof import("./action-runtime.js")>();
|
||||
return {
|
||||
...actual,
|
||||
handleSlackAction: handleSlackActionMock,
|
||||
};
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
handleSlackActionMock.mockReset();
|
||||
|
||||
Reference in New Issue
Block a user