addArgument('server', InputArgument::REQUIRED, 'HTTPS base URL of the document server'); } protected function execute(InputInterface $input, OutputInterface $output): int { $io = new SymfonyStyle($input, $output); try { $document = $this->client->fetch(new ServerAddress($input->getArgument('server'))); $rows = []; $hasDocxView = false; foreach ($document->actions as $action) { $rows[] = [$action->extension, $action->name, implode(', ', $action->requirements) ?: 'none']; $hasDocxView = $hasDocxView || ($action->extension === 'docx' && $action->name === 'view' && $action->supportedBy([])); } $io->table(['Extension', 'Server action', 'Additional host requirements'], $rows); $io->text('Proof key metadata: ' . ($document->hasProofKeys ? 'present (not yet validated)' : 'absent')); if (!$hasDocxView) { $io->error('No DOCX view action usable by a basic read-only host.'); return Command::FAILURE; } $io->success('Discovery supports the planned DOCX viewing flow.'); $io->note('This check does not verify editor loading, WOPI callbacks, proof signatures, or saving.'); return Command::SUCCESS; } catch (Throwable $error) { $io->error($error->getMessage()); return Command::FAILURE; } } }