mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-10 19:33:13 +02:00
fix(ci): refresh extension mocks and protocol models
This commit is contained in:
@@ -1327,6 +1327,236 @@ public struct SessionsResolveParams: Codable, Sendable {
|
||||
}
|
||||
}
|
||||
|
||||
public struct SessionCompactionCheckpoint: Codable, Sendable {
|
||||
public let checkpointid: String
|
||||
public let sessionkey: String
|
||||
public let sessionid: String
|
||||
public let createdat: Int
|
||||
public let reason: AnyCodable
|
||||
public let tokensbefore: Int?
|
||||
public let tokensafter: Int?
|
||||
public let summary: String?
|
||||
public let firstkeptentryid: String?
|
||||
public let precompaction: [String: AnyCodable]
|
||||
public let postcompaction: [String: AnyCodable]
|
||||
|
||||
public init(
|
||||
checkpointid: String,
|
||||
sessionkey: String,
|
||||
sessionid: String,
|
||||
createdat: Int,
|
||||
reason: AnyCodable,
|
||||
tokensbefore: Int?,
|
||||
tokensafter: Int?,
|
||||
summary: String?,
|
||||
firstkeptentryid: String?,
|
||||
precompaction: [String: AnyCodable],
|
||||
postcompaction: [String: AnyCodable])
|
||||
{
|
||||
self.checkpointid = checkpointid
|
||||
self.sessionkey = sessionkey
|
||||
self.sessionid = sessionid
|
||||
self.createdat = createdat
|
||||
self.reason = reason
|
||||
self.tokensbefore = tokensbefore
|
||||
self.tokensafter = tokensafter
|
||||
self.summary = summary
|
||||
self.firstkeptentryid = firstkeptentryid
|
||||
self.precompaction = precompaction
|
||||
self.postcompaction = postcompaction
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case checkpointid = "checkpointId"
|
||||
case sessionkey = "sessionKey"
|
||||
case sessionid = "sessionId"
|
||||
case createdat = "createdAt"
|
||||
case reason
|
||||
case tokensbefore = "tokensBefore"
|
||||
case tokensafter = "tokensAfter"
|
||||
case summary
|
||||
case firstkeptentryid = "firstKeptEntryId"
|
||||
case precompaction = "preCompaction"
|
||||
case postcompaction = "postCompaction"
|
||||
}
|
||||
}
|
||||
|
||||
public struct SessionsCompactionListParams: Codable, Sendable {
|
||||
public let key: String
|
||||
|
||||
public init(
|
||||
key: String)
|
||||
{
|
||||
self.key = key
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case key
|
||||
}
|
||||
}
|
||||
|
||||
public struct SessionsCompactionGetParams: Codable, Sendable {
|
||||
public let key: String
|
||||
public let checkpointid: String
|
||||
|
||||
public init(
|
||||
key: String,
|
||||
checkpointid: String)
|
||||
{
|
||||
self.key = key
|
||||
self.checkpointid = checkpointid
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case key
|
||||
case checkpointid = "checkpointId"
|
||||
}
|
||||
}
|
||||
|
||||
public struct SessionsCompactionBranchParams: Codable, Sendable {
|
||||
public let key: String
|
||||
public let checkpointid: String
|
||||
|
||||
public init(
|
||||
key: String,
|
||||
checkpointid: String)
|
||||
{
|
||||
self.key = key
|
||||
self.checkpointid = checkpointid
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case key
|
||||
case checkpointid = "checkpointId"
|
||||
}
|
||||
}
|
||||
|
||||
public struct SessionsCompactionRestoreParams: Codable, Sendable {
|
||||
public let key: String
|
||||
public let checkpointid: String
|
||||
|
||||
public init(
|
||||
key: String,
|
||||
checkpointid: String)
|
||||
{
|
||||
self.key = key
|
||||
self.checkpointid = checkpointid
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case key
|
||||
case checkpointid = "checkpointId"
|
||||
}
|
||||
}
|
||||
|
||||
public struct SessionsCompactionListResult: Codable, Sendable {
|
||||
public let ok: Bool
|
||||
public let key: String
|
||||
public let checkpoints: [SessionCompactionCheckpoint]
|
||||
|
||||
public init(
|
||||
ok: Bool,
|
||||
key: String,
|
||||
checkpoints: [SessionCompactionCheckpoint])
|
||||
{
|
||||
self.ok = ok
|
||||
self.key = key
|
||||
self.checkpoints = checkpoints
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case ok
|
||||
case key
|
||||
case checkpoints
|
||||
}
|
||||
}
|
||||
|
||||
public struct SessionsCompactionGetResult: Codable, Sendable {
|
||||
public let ok: Bool
|
||||
public let key: String
|
||||
public let checkpoint: SessionCompactionCheckpoint
|
||||
|
||||
public init(
|
||||
ok: Bool,
|
||||
key: String,
|
||||
checkpoint: SessionCompactionCheckpoint)
|
||||
{
|
||||
self.ok = ok
|
||||
self.key = key
|
||||
self.checkpoint = checkpoint
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case ok
|
||||
case key
|
||||
case checkpoint
|
||||
}
|
||||
}
|
||||
|
||||
public struct SessionsCompactionBranchResult: Codable, Sendable {
|
||||
public let ok: Bool
|
||||
public let sourcekey: String
|
||||
public let key: String
|
||||
public let sessionid: String
|
||||
public let checkpoint: SessionCompactionCheckpoint
|
||||
public let entry: [String: AnyCodable]
|
||||
|
||||
public init(
|
||||
ok: Bool,
|
||||
sourcekey: String,
|
||||
key: String,
|
||||
sessionid: String,
|
||||
checkpoint: SessionCompactionCheckpoint,
|
||||
entry: [String: AnyCodable])
|
||||
{
|
||||
self.ok = ok
|
||||
self.sourcekey = sourcekey
|
||||
self.key = key
|
||||
self.sessionid = sessionid
|
||||
self.checkpoint = checkpoint
|
||||
self.entry = entry
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case ok
|
||||
case sourcekey = "sourceKey"
|
||||
case key
|
||||
case sessionid = "sessionId"
|
||||
case checkpoint
|
||||
case entry
|
||||
}
|
||||
}
|
||||
|
||||
public struct SessionsCompactionRestoreResult: Codable, Sendable {
|
||||
public let ok: Bool
|
||||
public let key: String
|
||||
public let sessionid: String
|
||||
public let checkpoint: SessionCompactionCheckpoint
|
||||
public let entry: [String: AnyCodable]
|
||||
|
||||
public init(
|
||||
ok: Bool,
|
||||
key: String,
|
||||
sessionid: String,
|
||||
checkpoint: SessionCompactionCheckpoint,
|
||||
entry: [String: AnyCodable])
|
||||
{
|
||||
self.ok = ok
|
||||
self.key = key
|
||||
self.sessionid = sessionid
|
||||
self.checkpoint = checkpoint
|
||||
self.entry = entry
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case ok
|
||||
case key
|
||||
case sessionid = "sessionId"
|
||||
case checkpoint
|
||||
case entry
|
||||
}
|
||||
}
|
||||
|
||||
public struct SessionsCreateParams: Codable, Sendable {
|
||||
public let key: String?
|
||||
public let agentid: String?
|
||||
|
||||
@@ -1327,6 +1327,236 @@ public struct SessionsResolveParams: Codable, Sendable {
|
||||
}
|
||||
}
|
||||
|
||||
public struct SessionCompactionCheckpoint: Codable, Sendable {
|
||||
public let checkpointid: String
|
||||
public let sessionkey: String
|
||||
public let sessionid: String
|
||||
public let createdat: Int
|
||||
public let reason: AnyCodable
|
||||
public let tokensbefore: Int?
|
||||
public let tokensafter: Int?
|
||||
public let summary: String?
|
||||
public let firstkeptentryid: String?
|
||||
public let precompaction: [String: AnyCodable]
|
||||
public let postcompaction: [String: AnyCodable]
|
||||
|
||||
public init(
|
||||
checkpointid: String,
|
||||
sessionkey: String,
|
||||
sessionid: String,
|
||||
createdat: Int,
|
||||
reason: AnyCodable,
|
||||
tokensbefore: Int?,
|
||||
tokensafter: Int?,
|
||||
summary: String?,
|
||||
firstkeptentryid: String?,
|
||||
precompaction: [String: AnyCodable],
|
||||
postcompaction: [String: AnyCodable])
|
||||
{
|
||||
self.checkpointid = checkpointid
|
||||
self.sessionkey = sessionkey
|
||||
self.sessionid = sessionid
|
||||
self.createdat = createdat
|
||||
self.reason = reason
|
||||
self.tokensbefore = tokensbefore
|
||||
self.tokensafter = tokensafter
|
||||
self.summary = summary
|
||||
self.firstkeptentryid = firstkeptentryid
|
||||
self.precompaction = precompaction
|
||||
self.postcompaction = postcompaction
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case checkpointid = "checkpointId"
|
||||
case sessionkey = "sessionKey"
|
||||
case sessionid = "sessionId"
|
||||
case createdat = "createdAt"
|
||||
case reason
|
||||
case tokensbefore = "tokensBefore"
|
||||
case tokensafter = "tokensAfter"
|
||||
case summary
|
||||
case firstkeptentryid = "firstKeptEntryId"
|
||||
case precompaction = "preCompaction"
|
||||
case postcompaction = "postCompaction"
|
||||
}
|
||||
}
|
||||
|
||||
public struct SessionsCompactionListParams: Codable, Sendable {
|
||||
public let key: String
|
||||
|
||||
public init(
|
||||
key: String)
|
||||
{
|
||||
self.key = key
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case key
|
||||
}
|
||||
}
|
||||
|
||||
public struct SessionsCompactionGetParams: Codable, Sendable {
|
||||
public let key: String
|
||||
public let checkpointid: String
|
||||
|
||||
public init(
|
||||
key: String,
|
||||
checkpointid: String)
|
||||
{
|
||||
self.key = key
|
||||
self.checkpointid = checkpointid
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case key
|
||||
case checkpointid = "checkpointId"
|
||||
}
|
||||
}
|
||||
|
||||
public struct SessionsCompactionBranchParams: Codable, Sendable {
|
||||
public let key: String
|
||||
public let checkpointid: String
|
||||
|
||||
public init(
|
||||
key: String,
|
||||
checkpointid: String)
|
||||
{
|
||||
self.key = key
|
||||
self.checkpointid = checkpointid
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case key
|
||||
case checkpointid = "checkpointId"
|
||||
}
|
||||
}
|
||||
|
||||
public struct SessionsCompactionRestoreParams: Codable, Sendable {
|
||||
public let key: String
|
||||
public let checkpointid: String
|
||||
|
||||
public init(
|
||||
key: String,
|
||||
checkpointid: String)
|
||||
{
|
||||
self.key = key
|
||||
self.checkpointid = checkpointid
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case key
|
||||
case checkpointid = "checkpointId"
|
||||
}
|
||||
}
|
||||
|
||||
public struct SessionsCompactionListResult: Codable, Sendable {
|
||||
public let ok: Bool
|
||||
public let key: String
|
||||
public let checkpoints: [SessionCompactionCheckpoint]
|
||||
|
||||
public init(
|
||||
ok: Bool,
|
||||
key: String,
|
||||
checkpoints: [SessionCompactionCheckpoint])
|
||||
{
|
||||
self.ok = ok
|
||||
self.key = key
|
||||
self.checkpoints = checkpoints
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case ok
|
||||
case key
|
||||
case checkpoints
|
||||
}
|
||||
}
|
||||
|
||||
public struct SessionsCompactionGetResult: Codable, Sendable {
|
||||
public let ok: Bool
|
||||
public let key: String
|
||||
public let checkpoint: SessionCompactionCheckpoint
|
||||
|
||||
public init(
|
||||
ok: Bool,
|
||||
key: String,
|
||||
checkpoint: SessionCompactionCheckpoint)
|
||||
{
|
||||
self.ok = ok
|
||||
self.key = key
|
||||
self.checkpoint = checkpoint
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case ok
|
||||
case key
|
||||
case checkpoint
|
||||
}
|
||||
}
|
||||
|
||||
public struct SessionsCompactionBranchResult: Codable, Sendable {
|
||||
public let ok: Bool
|
||||
public let sourcekey: String
|
||||
public let key: String
|
||||
public let sessionid: String
|
||||
public let checkpoint: SessionCompactionCheckpoint
|
||||
public let entry: [String: AnyCodable]
|
||||
|
||||
public init(
|
||||
ok: Bool,
|
||||
sourcekey: String,
|
||||
key: String,
|
||||
sessionid: String,
|
||||
checkpoint: SessionCompactionCheckpoint,
|
||||
entry: [String: AnyCodable])
|
||||
{
|
||||
self.ok = ok
|
||||
self.sourcekey = sourcekey
|
||||
self.key = key
|
||||
self.sessionid = sessionid
|
||||
self.checkpoint = checkpoint
|
||||
self.entry = entry
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case ok
|
||||
case sourcekey = "sourceKey"
|
||||
case key
|
||||
case sessionid = "sessionId"
|
||||
case checkpoint
|
||||
case entry
|
||||
}
|
||||
}
|
||||
|
||||
public struct SessionsCompactionRestoreResult: Codable, Sendable {
|
||||
public let ok: Bool
|
||||
public let key: String
|
||||
public let sessionid: String
|
||||
public let checkpoint: SessionCompactionCheckpoint
|
||||
public let entry: [String: AnyCodable]
|
||||
|
||||
public init(
|
||||
ok: Bool,
|
||||
key: String,
|
||||
sessionid: String,
|
||||
checkpoint: SessionCompactionCheckpoint,
|
||||
entry: [String: AnyCodable])
|
||||
{
|
||||
self.ok = ok
|
||||
self.key = key
|
||||
self.sessionid = sessionid
|
||||
self.checkpoint = checkpoint
|
||||
self.entry = entry
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case ok
|
||||
case key
|
||||
case sessionid = "sessionId"
|
||||
case checkpoint
|
||||
case entry
|
||||
}
|
||||
}
|
||||
|
||||
public struct SessionsCreateParams: Codable, Sendable {
|
||||
public let key: String?
|
||||
public let agentid: String?
|
||||
|
||||
@@ -28,9 +28,13 @@ vi.mock("openclaw/plugin-sdk/config-runtime", () => ({
|
||||
resolveMarkdownTableMode: mockResolveMarkdownTableMode,
|
||||
}));
|
||||
|
||||
vi.mock("openclaw/plugin-sdk/text-runtime", () => ({
|
||||
convertMarkdownTables: mockConvertMarkdownTables,
|
||||
}));
|
||||
vi.mock("openclaw/plugin-sdk/text-runtime", async (importOriginal) => {
|
||||
const actual = await importOriginal<typeof import("openclaw/plugin-sdk/text-runtime")>();
|
||||
return {
|
||||
...actual,
|
||||
convertMarkdownTables: mockConvertMarkdownTables,
|
||||
};
|
||||
});
|
||||
|
||||
vi.mock("./client.js", () => ({
|
||||
createFeishuClient: mockCreateFeishuClient,
|
||||
|
||||
@@ -26,9 +26,13 @@ vi.mock("openclaw/plugin-sdk/config-runtime", () => ({
|
||||
resolveMarkdownTableMode: mockState.resolveMarkdownTableMode,
|
||||
}));
|
||||
|
||||
vi.mock("openclaw/plugin-sdk/text-runtime", () => ({
|
||||
convertMarkdownTables: mockState.convertMarkdownTables,
|
||||
}));
|
||||
vi.mock("openclaw/plugin-sdk/text-runtime", async (importOriginal) => {
|
||||
const actual = await importOriginal<typeof import("openclaw/plugin-sdk/text-runtime")>();
|
||||
return {
|
||||
...actual,
|
||||
convertMarkdownTables: mockState.convertMarkdownTables,
|
||||
};
|
||||
});
|
||||
|
||||
vi.mock("./send-context.js", () => ({
|
||||
resolveMSTeamsSendContext: mockState.resolveMSTeamsSendContext,
|
||||
|
||||
Reference in New Issue
Block a user