refactor: rename session_state to agent_list and add subscriptions
This commit is contained in:
@@ -58,10 +58,10 @@ export async function runArchiveCommand(
|
||||
}
|
||||
|
||||
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()
|
||||
|
||||
@@ -118,10 +118,10 @@ export async function runAttachCommand(
|
||||
}
|
||||
|
||||
try {
|
||||
// Request session state to get agent information
|
||||
client.requestSessionState()
|
||||
// Request agent list
|
||||
client.requestAgentList()
|
||||
|
||||
// Wait for session state to be populated
|
||||
// Wait for agent list to be populated
|
||||
await new Promise((resolve) => setTimeout(resolve, 500))
|
||||
|
||||
const agents = client.listAgents()
|
||||
|
||||
@@ -217,10 +217,10 @@ export async function runInspectCommand(
|
||||
}
|
||||
|
||||
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()
|
||||
|
||||
@@ -92,10 +92,10 @@ export async function runLogsCommand(
|
||||
}
|
||||
|
||||
try {
|
||||
// Request session state to get agent information
|
||||
client.requestSessionState()
|
||||
// Request agent list
|
||||
client.requestAgentList()
|
||||
|
||||
// Wait for session state to be populated
|
||||
// Wait for agent list to be populated
|
||||
await new Promise((resolve) => setTimeout(resolve, 500))
|
||||
|
||||
const agents = client.listAgents()
|
||||
|
||||
@@ -115,8 +115,8 @@ export async function runLsCommand(
|
||||
}
|
||||
|
||||
try {
|
||||
// Request and wait for session state to get agent information
|
||||
await client.waitForSessionState()
|
||||
// Request and wait for agent list
|
||||
await client.waitForAgentList()
|
||||
|
||||
let agents = client.listAgents()
|
||||
|
||||
|
||||
@@ -72,10 +72,10 @@ export async function runModeCommand(
|
||||
}
|
||||
|
||||
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()
|
||||
|
||||
@@ -140,10 +140,10 @@ export async function runSendCommand(
|
||||
}
|
||||
|
||||
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()
|
||||
|
||||
@@ -53,10 +53,10 @@ export async function runStopCommand(
|
||||
}
|
||||
|
||||
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))
|
||||
|
||||
let agents = client.listAgents()
|
||||
|
||||
@@ -121,10 +121,10 @@ export async function runWaitCommand(
|
||||
}
|
||||
|
||||
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()
|
||||
|
||||
@@ -72,10 +72,10 @@ export async function runStatusCommand(
|
||||
}
|
||||
|
||||
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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -63,10 +63,10 @@ export async function runLsCommand(
|
||||
}
|
||||
|
||||
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