fix(deploy): gate unavailable agents and bound session scans

Co-Authored-By: Codex <noreply@anthropic.com>
This commit is contained in:
2026-09-16 00:54:18 +08:00
co-authored by Codex
parent 6b86f5198b
commit 388082ccd4
12 changed files with 333 additions and 58 deletions
+6
View File
@@ -66,6 +66,7 @@ import { collectMachineHealth } from '@/utils/machineHealth'
import { inspectCursorChatStore } from '@/cursor/cursorChatStoreStatus'
import { homedir } from 'node:os'
import type { CursorChatStoreStatus } from '@hapi/protocol/apiTypes'
import { getAgentAvailabilityResponse } from '@/agent/agentAvailability'
import { MachinePathPolicy } from './machinePathPolicy'
type MachineRpcHandlers = {
@@ -188,6 +189,11 @@ export class ApiMachineClient {
}
)
this.rpcHandlerManager.registerHandler<Record<string, never>, AgentAvailabilityResponse>(
RPC_METHODS.AgentAvailability,
async () => getAgentAvailabilityResponse()
)
this.rpcHandlerManager.registerHandler<ListMachineDirectoryRequest, MachineListDirectoryResponse>(RPC_METHODS.ListMachineDirectory, async (params) => {
if (!this.normalizedWorkspaceRoots?.length) {
return { success: false, error: 'Workspace browsing is not enabled for this machine' }