mirror of
https://github.com/wu736139669/hapi.git
synced 2026-11-18 03:27:08 +00:00
fix(deploy): gate unavailable agents and bound session scans
Co-Authored-By: Codex <noreply@anthropic.com>
This commit is contained in:
@@ -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' }
|
||||
|
||||
Reference in New Issue
Block a user