fix(hub,cli): keep inactive file previews available through runner (#1727)

* fix(hub,cli): keep inactive file previews available through runner

* fix(cli): bound runner workspace file reads

* fix(cli): constrain runner git fallback pathspecs

* fix(cli): allow dot-prefixed workspace paths
This commit is contained in:
Ananovo
2026-10-28 12:07:18 +08:00
committed by GitHub
parent ea12ff98c6
commit 5d7e13fc5d
16 changed files with 1078 additions and 13 deletions
+5
View File
@@ -29,6 +29,7 @@ import { backoff } from '@/utils/time'
import { getInvokedCwd } from '@/utils/invokedCwd'
import { RpcHandlerManager } from './rpc/RpcHandlerManager'
import { registerCommonHandlers } from '../modules/common/registerCommonHandlers'
import { registerWorkspaceFileHandlers } from '../modules/common/workspaceFileHandlers'
import { setAgyCatalogChangeListener } from '../modules/common/agyModels'
import {
listOpencodeModelsForCwd,
@@ -133,6 +134,10 @@ export class ApiMachineClient {
})
registerCommonHandlers(this.rpcHandlerManager, getInvokedCwd())
registerWorkspaceFileHandlers(this.rpcHandlerManager, {
resolveForCheck: (path) => this.pathPolicy.resolveForCheck(path),
isWithinSpawnRoots: (path) => this.pathPolicy.isWithinSpawnRoots(path),
})
// Only the machine daemon answers `<machineId>:listAgyModels`, so it is
// the one process that can tell the hub its catalog moved.