feat: wait returns on permission request and improve CLI logging

This commit is contained in:
Mohamed Boudra
2026-01-29 12:12:39 +07:00
parent c015fdbef1
commit 7a8841481e
13 changed files with 295 additions and 341 deletions
+4 -10
View File
@@ -48,15 +48,7 @@ export async function runAllowCommand(
): Promise<PermitAllowResult> {
const host = getDaemonHost({ host: options.host })
// Validate arguments
if (!options.all && !reqId) {
const error: CommandError = {
code: 'MISSING_ARGUMENT',
message: 'Request ID is required unless --all is specified',
details: 'Usage: paseo permit allow <agent> <req_id> or paseo permit allow <agent> --all',
}
throw error
}
// No validation needed - if no reqId provided, allow all by default
// Parse input JSON if provided
let updatedInput: Record<string, unknown> | undefined
@@ -129,7 +121,9 @@ export async function runAllowCommand(
// Determine which permissions to allow
let permissionsToAllow: AgentPermissionRequest[]
if (options.all) {
if (!reqId || options.all) {
// Default: allow all pending permissions if no req_id specified
// --all flag is kept as an explicit alias for clarity
permissionsToAllow = pendingPermissions
} else {
// Find permission by ID prefix