fix: oxfmt formatting, secrets pragma, regenerate protocol Swift after rebase
This commit is contained in:
parent
addb874a64
commit
1eff16adec
@ -950,6 +950,102 @@ public struct NodeEventParams: Codable, Sendable {
|
||||
}
|
||||
}
|
||||
|
||||
public struct NodePendingDrainParams: Codable, Sendable {
|
||||
public let maxitems: Int?
|
||||
|
||||
public init(
|
||||
maxitems: Int?)
|
||||
{
|
||||
self.maxitems = maxitems
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case maxitems = "maxItems"
|
||||
}
|
||||
}
|
||||
|
||||
public struct NodePendingDrainResult: Codable, Sendable {
|
||||
public let nodeid: String
|
||||
public let revision: Int
|
||||
public let items: [[String: AnyCodable]]
|
||||
public let hasmore: Bool
|
||||
|
||||
public init(
|
||||
nodeid: String,
|
||||
revision: Int,
|
||||
items: [[String: AnyCodable]],
|
||||
hasmore: Bool)
|
||||
{
|
||||
self.nodeid = nodeid
|
||||
self.revision = revision
|
||||
self.items = items
|
||||
self.hasmore = hasmore
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case nodeid = "nodeId"
|
||||
case revision
|
||||
case items
|
||||
case hasmore = "hasMore"
|
||||
}
|
||||
}
|
||||
|
||||
public struct NodePendingEnqueueParams: Codable, Sendable {
|
||||
public let nodeid: String
|
||||
public let type: String
|
||||
public let priority: String?
|
||||
public let expiresinms: Int?
|
||||
public let wake: Bool?
|
||||
|
||||
public init(
|
||||
nodeid: String,
|
||||
type: String,
|
||||
priority: String?,
|
||||
expiresinms: Int?,
|
||||
wake: Bool?)
|
||||
{
|
||||
self.nodeid = nodeid
|
||||
self.type = type
|
||||
self.priority = priority
|
||||
self.expiresinms = expiresinms
|
||||
self.wake = wake
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case nodeid = "nodeId"
|
||||
case type
|
||||
case priority
|
||||
case expiresinms = "expiresInMs"
|
||||
case wake
|
||||
}
|
||||
}
|
||||
|
||||
public struct NodePendingEnqueueResult: Codable, Sendable {
|
||||
public let nodeid: String
|
||||
public let revision: Int
|
||||
public let queued: [String: AnyCodable]
|
||||
public let waketriggered: Bool
|
||||
|
||||
public init(
|
||||
nodeid: String,
|
||||
revision: Int,
|
||||
queued: [String: AnyCodable],
|
||||
waketriggered: Bool)
|
||||
{
|
||||
self.nodeid = nodeid
|
||||
self.revision = revision
|
||||
self.queued = queued
|
||||
self.waketriggered = waketriggered
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case nodeid = "nodeId"
|
||||
case revision
|
||||
case queued
|
||||
case waketriggered = "wakeTriggered"
|
||||
}
|
||||
}
|
||||
|
||||
public struct NodeInvokeRequestEvent: Codable, Sendable {
|
||||
public let id: String
|
||||
public let nodeid: String
|
||||
|
||||
@ -950,6 +950,102 @@ public struct NodeEventParams: Codable, Sendable {
|
||||
}
|
||||
}
|
||||
|
||||
public struct NodePendingDrainParams: Codable, Sendable {
|
||||
public let maxitems: Int?
|
||||
|
||||
public init(
|
||||
maxitems: Int?)
|
||||
{
|
||||
self.maxitems = maxitems
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case maxitems = "maxItems"
|
||||
}
|
||||
}
|
||||
|
||||
public struct NodePendingDrainResult: Codable, Sendable {
|
||||
public let nodeid: String
|
||||
public let revision: Int
|
||||
public let items: [[String: AnyCodable]]
|
||||
public let hasmore: Bool
|
||||
|
||||
public init(
|
||||
nodeid: String,
|
||||
revision: Int,
|
||||
items: [[String: AnyCodable]],
|
||||
hasmore: Bool)
|
||||
{
|
||||
self.nodeid = nodeid
|
||||
self.revision = revision
|
||||
self.items = items
|
||||
self.hasmore = hasmore
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case nodeid = "nodeId"
|
||||
case revision
|
||||
case items
|
||||
case hasmore = "hasMore"
|
||||
}
|
||||
}
|
||||
|
||||
public struct NodePendingEnqueueParams: Codable, Sendable {
|
||||
public let nodeid: String
|
||||
public let type: String
|
||||
public let priority: String?
|
||||
public let expiresinms: Int?
|
||||
public let wake: Bool?
|
||||
|
||||
public init(
|
||||
nodeid: String,
|
||||
type: String,
|
||||
priority: String?,
|
||||
expiresinms: Int?,
|
||||
wake: Bool?)
|
||||
{
|
||||
self.nodeid = nodeid
|
||||
self.type = type
|
||||
self.priority = priority
|
||||
self.expiresinms = expiresinms
|
||||
self.wake = wake
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case nodeid = "nodeId"
|
||||
case type
|
||||
case priority
|
||||
case expiresinms = "expiresInMs"
|
||||
case wake
|
||||
}
|
||||
}
|
||||
|
||||
public struct NodePendingEnqueueResult: Codable, Sendable {
|
||||
public let nodeid: String
|
||||
public let revision: Int
|
||||
public let queued: [String: AnyCodable]
|
||||
public let waketriggered: Bool
|
||||
|
||||
public init(
|
||||
nodeid: String,
|
||||
revision: Int,
|
||||
queued: [String: AnyCodable],
|
||||
waketriggered: Bool)
|
||||
{
|
||||
self.nodeid = nodeid
|
||||
self.revision = revision
|
||||
self.queued = queued
|
||||
self.waketriggered = waketriggered
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case nodeid = "nodeId"
|
||||
case revision
|
||||
case queued
|
||||
case waketriggered = "wakeTriggered"
|
||||
}
|
||||
}
|
||||
|
||||
public struct NodeInvokeRequestEvent: Codable, Sendable {
|
||||
public let id: String
|
||||
public let nodeid: String
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import type { Api, Model } from "@mariozechner/pi-ai";
|
||||
import * as PiCodingAgent from "@mariozechner/pi-coding-agent";
|
||||
import type {
|
||||
AuthStorage as PiAuthStorage,
|
||||
ModelRegistry as PiModelRegistry,
|
||||
} from "@mariozechner/pi-coding-agent";
|
||||
import type { Api, Model } from "@mariozechner/pi-ai";
|
||||
import { ensureAuthProfileStore } from "./auth-profiles.js";
|
||||
import { normalizeResolvedProviderModel } from "./model.provider-normalization.js";
|
||||
import { resolvePiCredentialMapFromStore, type PiCredentialMap } from "./pi-auth-credentials.js";
|
||||
@ -182,7 +182,9 @@ function wrapModelRegistryWithProviderNormalization(registry: PiModelRegistry):
|
||||
if (prop === "getAll" || prop === "getAvailable") {
|
||||
return () => {
|
||||
const result = Reflect.apply(value, target, []);
|
||||
return Array.isArray(result) ? result.map((model) => normalizeRegistryModel(model)) : result;
|
||||
return Array.isArray(result)
|
||||
? result.map((model) => normalizeRegistryModel(model))
|
||||
: result;
|
||||
};
|
||||
}
|
||||
return value.bind(target);
|
||||
|
||||
@ -178,7 +178,7 @@ describe("describeImageWithModel", () => {
|
||||
}),
|
||||
expect.any(Object),
|
||||
expect.objectContaining({
|
||||
apiKey: "oauth-test",
|
||||
apiKey: "oauth-test", // pragma: allowlist secret
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
@ -2,8 +2,8 @@ import type { Api, Context, Model } from "@mariozechner/pi-ai";
|
||||
import { complete } from "@mariozechner/pi-ai";
|
||||
import { isMinimaxVlmModel, minimaxUnderstandImage } from "../../agents/minimax-vlm.js";
|
||||
import { getApiKeyForModel, requireApiKey } from "../../agents/model-auth.js";
|
||||
import { normalizeResolvedProviderModel } from "../../agents/model.provider-normalization.js";
|
||||
import { normalizeModelRef } from "../../agents/model-selection.js";
|
||||
import { normalizeResolvedProviderModel } from "../../agents/model.provider-normalization.js";
|
||||
import { ensureOpenClawModelsJson } from "../../agents/models-config.js";
|
||||
import { coerceImageAssistantText } from "../../agents/tools/image-tool.helpers.js";
|
||||
import type { ImageDescriptionRequest, ImageDescriptionResult } from "../types.js";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user