21817543ad
Adds a native Nextcloud app "Astroglobe" that provides: - Personal settings: OAuth authorization for background MCP access - Admin settings: Server status and vector sync monitoring - API endpoints for MCP server communication The app uses PKCE OAuth flow to obtain tokens for the MCP server, enabling features like background vector sync per ADR-018. Includes: - PHP app structure (controllers, services, settings) - Vue.js frontend components - Docker compose mount configuration - Installation hook for development testing - ADR-018 documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
53 lines
1005 B
PHP
53 lines
1005 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace OCA\Astroglobe\Settings;
|
|
|
|
use OCP\IL10N;
|
|
use OCP\IURLGenerator;
|
|
use OCP\Settings\IIconSection;
|
|
|
|
/**
|
|
* Admin settings section for MCP Server.
|
|
*
|
|
* Creates a dedicated section in admin settings for MCP-related configuration.
|
|
*/
|
|
class AdminSection implements IIconSection {
|
|
private $l;
|
|
private $urlGenerator;
|
|
|
|
public function __construct(IL10N $l, IURLGenerator $urlGenerator) {
|
|
$this->l = $l;
|
|
$this->urlGenerator = $urlGenerator;
|
|
}
|
|
|
|
/**
|
|
* @return string The section ID
|
|
*/
|
|
public function getID(): string {
|
|
return 'mcp';
|
|
}
|
|
|
|
/**
|
|
* @return string The translated section name
|
|
*/
|
|
public function getName(): string {
|
|
return $this->l->t('MCP Server');
|
|
}
|
|
|
|
/**
|
|
* @return int Priority (lower = higher up in list)
|
|
*/
|
|
public function getPriority(): int {
|
|
return 80;
|
|
}
|
|
|
|
/**
|
|
* @return string Section icon (SVG or image URL)
|
|
*/
|
|
public function getIcon(): string {
|
|
return $this->urlGenerator->imagePath('astroglobe', 'app.svg');
|
|
}
|
|
}
|