refactor: rename session_state to agent_list and add subscriptions

This commit is contained in:
Mohamed Boudra
2026-01-30 13:39:40 +07:00
parent 5b32d0a56c
commit 0618dc6b0d
45 changed files with 2163 additions and 257 deletions
+2 -2
View File
@@ -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()
+2 -2
View File
@@ -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()
+3 -3
View File
@@ -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()