refactor: rename session_state to agent_list and add subscriptions
This commit is contained in:
@@ -79,8 +79,8 @@ export async function runAllowCommand(
|
||||
}
|
||||
|
||||
try {
|
||||
// Request session state to get agent information
|
||||
client.requestSessionState()
|
||||
// Request agent list
|
||||
client.requestAgentList()
|
||||
await new Promise((resolve) => setTimeout(resolve, 500))
|
||||
|
||||
const agents = client.listAgents()
|
||||
|
||||
@@ -45,8 +45,8 @@ export async function runDenyCommand(
|
||||
}
|
||||
|
||||
try {
|
||||
// Request session state to get agent information
|
||||
client.requestSessionState()
|
||||
// Request agent list
|
||||
client.requestAgentList()
|
||||
await new Promise((resolve) => setTimeout(resolve, 500))
|
||||
|
||||
const agents = client.listAgents()
|
||||
|
||||
@@ -57,10 +57,10 @@ export async function runLsCommand(options: PermitLsOptions, _command: Command):
|
||||
}
|
||||
|
||||
try {
|
||||
// Request session state to get agent information
|
||||
client.requestSessionState()
|
||||
// Request agent list
|
||||
client.requestAgentList()
|
||||
|
||||
// Wait a moment for the session state to be populated
|
||||
// Wait a moment for the agent list to be populated
|
||||
await new Promise((resolve) => setTimeout(resolve, 500))
|
||||
|
||||
const agents = client.listAgents()
|
||||
|
||||
Reference in New Issue
Block a user