refactor: replace agent_list polling with request/response RPC pattern

This commit is contained in:
Mohamed Boudra
2026-02-01 22:37:32 +07:00
parent 8971295c4d
commit bf9555829b
59 changed files with 2979 additions and 3637 deletions
+1 -7
View File
@@ -57,13 +57,7 @@ export async function runLsCommand(options: PermitLsOptions, _command: Command):
}
try {
// Request agent list
client.requestAgentList()
// Wait a moment for the agent list to be populated
await new Promise((resolve) => setTimeout(resolve, 500))
const agents = client.listAgents()
const agents = await client.fetchAgents()
await client.close()
// Collect all pending permissions from all agents