style: apply oxfmt cleanup
This commit is contained in:
@@ -407,9 +407,7 @@ describe("DiscordVoiceManager", () => {
|
|||||||
|
|
||||||
await manager.join({ guildId: "g1", channelId: "1001" });
|
await manager.join({ guildId: "g1", channelId: "1001" });
|
||||||
|
|
||||||
const entry = (manager as unknown as { sessions: Map<string, unknown> }).sessions.get(
|
const entry = (manager as unknown as { sessions: Map<string, unknown> }).sessions.get("g1") as
|
||||||
"g1",
|
|
||||||
) as
|
|
||||||
| {
|
| {
|
||||||
guildId: string;
|
guildId: string;
|
||||||
channelId: string;
|
channelId: string;
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
export function resolveMemorySearchPreflight(params: {
|
export function resolveMemorySearchPreflight(params: { query: string; hasIndexedContent: boolean }):
|
||||||
query: string;
|
|
||||||
hasIndexedContent: boolean;
|
|
||||||
}):
|
|
||||||
| {
|
| {
|
||||||
normalizedQuery: string;
|
normalizedQuery: string;
|
||||||
shouldInitializeProvider: boolean;
|
shouldInitializeProvider: boolean;
|
||||||
|
|||||||
@@ -490,28 +490,31 @@ export async function sendMSTeamsMessages(params: {
|
|||||||
messageIndex: number,
|
messageIndex: number,
|
||||||
): Promise<string> => {
|
): Promise<string> => {
|
||||||
let pendingUploadId: string | undefined;
|
let pendingUploadId: string | undefined;
|
||||||
const response = await sendWithRetry(async () => {
|
const response = await sendWithRetry(
|
||||||
const activity = await buildActivity(
|
async () => {
|
||||||
message,
|
const activity = await buildActivity(
|
||||||
params.conversationRef,
|
message,
|
||||||
params.tokenProvider,
|
params.conversationRef,
|
||||||
params.sharePointSiteId,
|
params.tokenProvider,
|
||||||
params.mediaMaxBytes,
|
params.sharePointSiteId,
|
||||||
{ feedbackLoopEnabled: params.feedbackLoopEnabled },
|
params.mediaMaxBytes,
|
||||||
);
|
{ feedbackLoopEnabled: params.feedbackLoopEnabled },
|
||||||
|
);
|
||||||
|
|
||||||
// Extract and strip the internal-only pending upload tag before sending.
|
// Extract and strip the internal-only pending upload tag before sending.
|
||||||
pendingUploadId =
|
pendingUploadId =
|
||||||
typeof activity._pendingUploadId === "string" ? activity._pendingUploadId : undefined;
|
typeof activity._pendingUploadId === "string" ? activity._pendingUploadId : undefined;
|
||||||
if (pendingUploadId) {
|
if (pendingUploadId) {
|
||||||
delete activity._pendingUploadId;
|
delete activity._pendingUploadId;
|
||||||
}
|
}
|
||||||
|
|
||||||
return await ctx.sendActivity(activity);
|
return await ctx.sendActivity(activity);
|
||||||
}, {
|
},
|
||||||
messageIndex,
|
{
|
||||||
messageCount: messages.length,
|
messageIndex,
|
||||||
});
|
messageCount: messages.length,
|
||||||
|
},
|
||||||
|
);
|
||||||
const messageId = extractMessageId(response) ?? "unknown";
|
const messageId = extractMessageId(response) ?? "unknown";
|
||||||
|
|
||||||
// Store the activity ID so the accept handler can replace the consent card in-place
|
// Store the activity ID so the accept handler can replace the consent card in-place
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
name: taskflow-inbox-triage
|
name: taskflow-inbox-triage
|
||||||
description: Example TaskFlow authoring pattern for inbox triage. Use when messages need different treatment based on intent, with some routes notifying immediately, some waiting on outside answers, and others rolling into a later summary.
|
description: Example TaskFlow authoring pattern for inbox triage. Use when messages need different treatment based on intent, with some routes notifying immediately, some waiting on outside answers, and others rolling into a later summary.
|
||||||
metadata: { "openclaw": { "emoji": "📥" } }
|
metadata: { "openclaw": { "emoji": "📥" } }
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# TaskFlow inbox triage
|
# TaskFlow inbox triage
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
name: taskflow
|
name: taskflow
|
||||||
description: Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layers like Lobster, ACPX, plugins, or plain code. Keep conditional logic in the caller; use TaskFlow for flow identity, child-task linkage, waiting state, revision-checked mutations, and user-facing emergence.
|
description: Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layers like Lobster, ACPX, plugins, or plain code. Keep conditional logic in the caller; use TaskFlow for flow identity, child-task linkage, waiting state, revision-checked mutations, and user-facing emergence.
|
||||||
metadata: { "openclaw": { "emoji": "🪝" } }
|
metadata: { "openclaw": { "emoji": "🪝" } }
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# TaskFlow
|
# TaskFlow
|
||||||
|
|||||||
@@ -226,10 +226,9 @@ export async function readDockerContainerEnvVar(
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function readDockerNetworkDriver(network: string): Promise<string | null> {
|
export async function readDockerNetworkDriver(network: string): Promise<string | null> {
|
||||||
const result = await execDocker(
|
const result = await execDocker(["network", "inspect", "-f", "{{.Driver}}", network], {
|
||||||
["network", "inspect", "-f", "{{.Driver}}", network],
|
allowFailure: true,
|
||||||
{ allowFailure: true },
|
});
|
||||||
);
|
|
||||||
if (result.code !== 0) {
|
if (result.code !== 0) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1377,9 +1377,9 @@ export function createNestedChannelParsedAllowFromPrompt(params: {
|
|||||||
getExistingAllowFrom: ({ cfg }: { cfg: OpenClawConfig }) =>
|
getExistingAllowFrom: ({ cfg }: { cfg: OpenClawConfig }) =>
|
||||||
params.getExistingAllowFrom?.(cfg) ??
|
params.getExistingAllowFrom?.(cfg) ??
|
||||||
(
|
(
|
||||||
(cfg.channels?.[params.channel] as Record<string, unknown> | undefined)?.[
|
(cfg.channels?.[params.channel] as Record<string, unknown> | undefined)?.[params.section] as
|
||||||
params.section
|
| { allowFrom?: Array<string | number> }
|
||||||
] as { allowFrom?: Array<string | number> } | undefined
|
| undefined
|
||||||
)?.allowFrom ??
|
)?.allowFrom ??
|
||||||
[],
|
[],
|
||||||
...(params.mergeEntries ? { mergeEntries: params.mergeEntries } : {}),
|
...(params.mergeEntries ? { mergeEntries: params.mergeEntries } : {}),
|
||||||
|
|||||||
@@ -2534,9 +2534,7 @@ describe("gateway server sessions", () => {
|
|||||||
expect(deleted.ok).toBe(true);
|
expect(deleted.ok).toBe(true);
|
||||||
expect(deleted.payload?.deleted).toBe(true);
|
expect(deleted.payload?.deleted).toBe(true);
|
||||||
expect(subagentLifecycleHookMocks.runSubagentEnded).toHaveBeenCalledTimes(1);
|
expect(subagentLifecycleHookMocks.runSubagentEnded).toHaveBeenCalledTimes(1);
|
||||||
const event = (
|
const event = (subagentLifecycleHookMocks.runSubagentEnded.mock.calls as unknown[][])[0]?.[0] as
|
||||||
subagentLifecycleHookMocks.runSubagentEnded.mock.calls as unknown[][]
|
|
||||||
)[0]?.[0] as
|
|
||||||
| { targetKind?: string; targetSessionKey?: string; reason?: string; outcome?: string }
|
| { targetKind?: string; targetSessionKey?: string; reason?: string; outcome?: string }
|
||||||
| undefined;
|
| undefined;
|
||||||
expect(event).toMatchObject({
|
expect(event).toMatchObject({
|
||||||
@@ -2852,9 +2850,7 @@ describe("gateway server sessions", () => {
|
|||||||
expect(reset.payload?.key).toBe("agent:main:subagent:worker");
|
expect(reset.payload?.key).toBe("agent:main:subagent:worker");
|
||||||
expect(reset.payload?.entry.sessionId).not.toBe("sess-subagent");
|
expect(reset.payload?.entry.sessionId).not.toBe("sess-subagent");
|
||||||
expect(subagentLifecycleHookMocks.runSubagentEnded).toHaveBeenCalledTimes(1);
|
expect(subagentLifecycleHookMocks.runSubagentEnded).toHaveBeenCalledTimes(1);
|
||||||
const event = (
|
const event = (subagentLifecycleHookMocks.runSubagentEnded.mock.calls as unknown[][])[0]?.[0] as
|
||||||
subagentLifecycleHookMocks.runSubagentEnded.mock.calls as unknown[][]
|
|
||||||
)[0]?.[0] as
|
|
||||||
| { targetKind?: string; targetSessionKey?: string; reason?: string; outcome?: string }
|
| { targetKind?: string; targetSessionKey?: string; reason?: string; outcome?: string }
|
||||||
| undefined;
|
| undefined;
|
||||||
expect(event).toMatchObject({
|
expect(event).toMatchObject({
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ function createStartupConfig(params: {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
: {}),
|
: {}),
|
||||||
...(params.providerIds?.length
|
...(params.providerIds?.length
|
||||||
? {
|
? {
|
||||||
models: {
|
models: {
|
||||||
|
|||||||
@@ -49,9 +49,7 @@ function resolveGatewayStartupDreamingPluginIds(config: OpenClawConfig): Set<str
|
|||||||
return new Set(["memory-core", resolveMemoryDreamingPluginId(config)]);
|
return new Set(["memory-core", resolveMemoryDreamingPluginId(config)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function resolveExplicitMemorySlotStartupPluginId(
|
function resolveExplicitMemorySlotStartupPluginId(config: OpenClawConfig): string | undefined {
|
||||||
config: OpenClawConfig,
|
|
||||||
): string | undefined {
|
|
||||||
const configuredSlot = config.plugins?.slots?.memory?.trim();
|
const configuredSlot = config.plugins?.slots?.memory?.trim();
|
||||||
if (!configuredSlot || configuredSlot.toLowerCase() === "none") {
|
if (!configuredSlot || configuredSlot.toLowerCase() === "none") {
|
||||||
return undefined;
|
return undefined;
|
||||||
|
|||||||
Reference in New Issue
Block a user