feat: integrate 5 feature branches, upstream fixes, and MIME detection fix

Squashed 5 commits:

Features (from 5 feature branches):
- MCP fix, pipe mute, stub recovery
- KAIROS activation, openclaw autonomy
- Daemon/job command hierarchy + cross-platform bg engine

Upstream fixes:
- fix: Bun.hash compatibility
- chore: chrome dependency update
- docs: browser support guide

MIME detection fix:
- Screenshot detectMimeFromBase64(): decode raw bytes from base64
  instead of broken charCodeAt comparison
- Fixes API 400 on Windows (JPEG) and macOS (PNG) screenshots
This commit is contained in:
unraid
2026-04-14 18:32:19 +08:00
parent be80da4ce0
commit bddffa216a
93 changed files with 9653 additions and 1400 deletions

View File

@@ -82,8 +82,13 @@ export function appendTeammateMessage(
export function injectUserMessageToTeammate(
taskId: string,
message: string,
options: {
autonomyRunId?: string
origin?: Message['origin']
} | undefined,
setAppState: SetAppState,
): void {
): boolean {
let injected = false
updateTaskState<InProcessTeammateTaskState>(taskId, setAppState, task => {
// Allow message injection when teammate is running or idle (waiting for input)
// Only reject if teammate is in a terminal state
@@ -94,15 +99,29 @@ export function injectUserMessageToTeammate(
return task
}
injected = true
return {
...task,
pendingUserMessages: [...task.pendingUserMessages, message],
pendingUserMessages: [
...task.pendingUserMessages,
{
message,
...(options?.autonomyRunId
? { autonomyRunId: options.autonomyRunId }
: {}),
...(options?.origin ? { origin: options.origin } : {}),
},
],
messages: appendCappedMessage(
task.messages,
createUserMessage({ content: message }),
createUserMessage({
content: message,
...(options?.origin ? { origin: options.origin } : {}),
}),
),
}
})
return injected
}
/**