refactor(astrolabe): reframe UI as semantic search service
Update all user-facing text to focus on Astroglobe as a semantic search service for Nextcloud users: - info.xml: New description focusing on finding content by meaning - Settings sections: Renamed from "MCP Server" to "Astroglobe" - Personal settings: Reframed as content indexing controls - Admin settings: Reframed as semantic search administration - OAuth flow: Explains semantic search benefits to users Key messaging changes: - "MCP Server" → "Astroglobe" - "Grant Background Access" → "Enable Semantic Search" - "Vector Sync" → "Content Indexing" - Focus on user benefits: natural language search, finding by meaning 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
+17
-11
@@ -3,25 +3,31 @@
|
||||
xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd">
|
||||
<id>astroglobe</id>
|
||||
<name>Astroglobe</name>
|
||||
<summary>Manage your Nextcloud MCP Server</summary>
|
||||
<summary>AI-powered semantic search across your Nextcloud</summary>
|
||||
<description>< for details.
|
||||
## Getting Started
|
||||
|
||||
1. Install and enable the app
|
||||
2. Grant background access to allow indexing of your content
|
||||
3. Start searching with natural language in Nextcloud's search bar
|
||||
|
||||
See [documentation](https://github.com/cbcoutinho/nextcloud-mcp-server) for configuration details.
|
||||
]]></description>
|
||||
<version>0.1.0</version>
|
||||
<licence>agpl</licence>
|
||||
|
||||
+4
-4
@@ -12,10 +12,10 @@ use OCP\IConfig;
|
||||
use OCP\Settings\ISettings;
|
||||
|
||||
/**
|
||||
* Admin settings panel for MCP Server.
|
||||
* Admin settings panel for Astroglobe.
|
||||
*
|
||||
* Displays server status, vector sync metrics, configuration,
|
||||
* and provides administrative controls.
|
||||
* Displays semantic search service status, indexing metrics,
|
||||
* configuration, and provides administrative controls.
|
||||
*/
|
||||
class Admin implements ISettings {
|
||||
private $client;
|
||||
@@ -89,7 +89,7 @@ class Admin implements ISettings {
|
||||
* @return string The section ID
|
||||
*/
|
||||
public function getSection(): string {
|
||||
return 'mcp';
|
||||
return 'astroglobe';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+4
-4
@@ -9,9 +9,9 @@ use OCP\IURLGenerator;
|
||||
use OCP\Settings\IIconSection;
|
||||
|
||||
/**
|
||||
* Admin settings section for MCP Server.
|
||||
* Admin settings section for Astroglobe.
|
||||
*
|
||||
* Creates a dedicated section in admin settings for MCP-related configuration.
|
||||
* Creates a dedicated section in admin settings for semantic search administration.
|
||||
*/
|
||||
class AdminSection implements IIconSection {
|
||||
private $l;
|
||||
@@ -26,14 +26,14 @@ class AdminSection implements IIconSection {
|
||||
* @return string The section ID
|
||||
*/
|
||||
public function getID(): string {
|
||||
return 'mcp';
|
||||
return 'astroglobe';
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string The translated section name
|
||||
*/
|
||||
public function getName(): string {
|
||||
return $this->l->t('MCP Server');
|
||||
return $this->l->t('Astroglobe');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+5
-5
@@ -14,12 +14,12 @@ use OCP\IUserSession;
|
||||
use OCP\Settings\ISettings;
|
||||
|
||||
/**
|
||||
* Personal settings panel for MCP Server.
|
||||
* Personal settings panel for Astroglobe.
|
||||
*
|
||||
* Displays user session information, background access status,
|
||||
* and provides controls for managing MCP server integration.
|
||||
* Displays semantic search status, background indexing access,
|
||||
* and provides controls for managing content indexing.
|
||||
*
|
||||
* Uses OAuth PKCE flow - each user must authorize access to MCP server.
|
||||
* Uses OAuth PKCE flow - each user must authorize background access.
|
||||
*/
|
||||
class Personal implements ISettings {
|
||||
private $client;
|
||||
@@ -146,7 +146,7 @@ class Personal implements ISettings {
|
||||
* @return string The section ID
|
||||
*/
|
||||
public function getSection(): string {
|
||||
return 'mcp';
|
||||
return 'astroglobe';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+5
-5
@@ -9,9 +9,9 @@ use OCP\IURLGenerator;
|
||||
use OCP\Settings\IIconSection;
|
||||
|
||||
/**
|
||||
* Personal settings section for MCP Server.
|
||||
* Personal settings section for Astroglobe.
|
||||
*
|
||||
* Creates a dedicated section in personal settings for MCP-related configuration.
|
||||
* Creates a dedicated section in personal settings for semantic search configuration.
|
||||
*/
|
||||
class PersonalSection implements IIconSection {
|
||||
private $l;
|
||||
@@ -23,17 +23,17 @@ class PersonalSection implements IIconSection {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string The section ID (e.g. 'mcp')
|
||||
* @return string The section ID
|
||||
*/
|
||||
public function getID(): string {
|
||||
return 'mcp';
|
||||
return 'astroglobe';
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string The translated section name
|
||||
*/
|
||||
public function getName(): string {
|
||||
return $this->l->t('MCP Server');
|
||||
return $this->l->t('Astroglobe');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+29
-37
@@ -1,14 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin settings template for MCP Server UI.
|
||||
* Admin settings template for Astroglobe.
|
||||
*
|
||||
* Displays server status, vector sync metrics, configuration,
|
||||
* Displays semantic search service status, indexing metrics, configuration,
|
||||
* and provides administrative controls.
|
||||
*
|
||||
* @var array $_ Template parameters
|
||||
* @var array $_['serverStatus'] Server status from API
|
||||
* @var array $_['vectorSyncStatus'] Vector sync metrics from API
|
||||
* @var string $_['serverUrl'] Configured MCP server URL
|
||||
* @var string $_['serverUrl'] Configured Astroglobe service URL
|
||||
* @var bool $_['apiKeyConfigured'] Whether API key is set in config.php
|
||||
* @var bool $_['vectorSyncEnabled'] Whether vector sync is enabled
|
||||
*/
|
||||
@@ -18,10 +18,10 @@ style('astroglobe', 'astroglobe-settings');
|
||||
?>
|
||||
|
||||
<div id="mcp-admin-settings" class="section">
|
||||
<h2><?php p($l->t('MCP Server Administration')); ?></h2>
|
||||
<h2><?php p($l->t('Astroglobe Administration')); ?></h2>
|
||||
|
||||
<div class="mcp-settings-info">
|
||||
<p><?php p($l->t('Monitor and configure the Nextcloud MCP (Model Context Protocol) Server.')); ?></p>
|
||||
<p><?php p($l->t('Monitor and configure the semantic search service for your Nextcloud instance.')); ?></p>
|
||||
</div>
|
||||
|
||||
<!-- Configuration Status -->
|
||||
@@ -29,7 +29,7 @@ style('astroglobe', 'astroglobe-settings');
|
||||
<h3><?php p($l->t('Configuration')); ?></h3>
|
||||
<table class="mcp-info-table">
|
||||
<tr>
|
||||
<td><strong><?php p($l->t('Server URL')); ?></strong></td>
|
||||
<td><strong><?php p($l->t('Service URL')); ?></strong></td>
|
||||
<td>
|
||||
<?php if (!empty($_['serverUrl'])): ?>
|
||||
<code><?php p($_['serverUrl']); ?></code>
|
||||
@@ -63,7 +63,7 @@ style('astroglobe', 'astroglobe-settings');
|
||||
<pre><code>'mcp_server_url' => 'http://localhost:8000',
|
||||
'mcp_server_api_key' => 'your-secret-api-key',</code></pre>
|
||||
<p class="mcp-help-text">
|
||||
<a href="https://github.com/cbcoutinho/nextcloud-mcp-server/blob/master/docs/ADR-018-nextcloud-php-app-for-settings-ui.md" target="_blank">
|
||||
<a href="https://github.com/cbcoutinho/nextcloud-mcp-server" target="_blank">
|
||||
<?php p($l->t('See documentation for details')); ?>
|
||||
</a>
|
||||
</p>
|
||||
@@ -71,22 +71,14 @@ style('astroglobe', 'astroglobe-settings');
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<!-- Server Status -->
|
||||
<!-- Service Status -->
|
||||
<div class="mcp-status-card">
|
||||
<h3><?php p($l->t('Server Status')); ?></h3>
|
||||
<h3><?php p($l->t('Service Status')); ?></h3>
|
||||
<table class="mcp-info-table">
|
||||
<tr>
|
||||
<td><strong><?php p($l->t('Version')); ?></strong></td>
|
||||
<td><?php p($_['serverStatus']['version'] ?? 'Unknown'); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong><?php p($l->t('Authentication Mode')); ?></strong></td>
|
||||
<td><code><?php p($_['serverStatus']['auth_mode'] ?? 'Unknown'); ?></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong><?php p($l->t('Management API Version')); ?></strong></td>
|
||||
<td><?php p($_['serverStatus']['management_api_version'] ?? 'Unknown'); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong><?php p($l->t('Uptime')); ?></strong></td>
|
||||
<td>
|
||||
@@ -103,7 +95,7 @@ style('astroglobe', 'astroglobe-settings');
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong><?php p($l->t('Vector Sync')); ?></strong></td>
|
||||
<td><strong><?php p($l->t('Semantic Search')); ?></strong></td>
|
||||
<td>
|
||||
<?php if ($_['vectorSyncEnabled']): ?>
|
||||
<span class="badge badge-success">
|
||||
@@ -120,10 +112,10 @@ style('astroglobe', 'astroglobe-settings');
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- Vector Sync Metrics -->
|
||||
<!-- Indexing Metrics -->
|
||||
<?php if ($_['vectorSyncEnabled'] && !isset($_['vectorSyncStatus']['error'])): ?>
|
||||
<div class="mcp-status-card" id="vector-sync-metrics">
|
||||
<h3><?php p($l->t('Vector Sync Metrics')); ?></h3>
|
||||
<h3><?php p($l->t('Indexing Metrics')); ?></h3>
|
||||
<table class="mcp-info-table">
|
||||
<tr>
|
||||
<td><strong><?php p($l->t('Status')); ?></strong></td>
|
||||
@@ -173,34 +165,39 @@ style('astroglobe', 'astroglobe-settings');
|
||||
</div>
|
||||
<?php elseif ($_['vectorSyncEnabled']): ?>
|
||||
<div class="mcp-status-card mcp-error">
|
||||
<h3><?php p($l->t('Vector Sync Metrics')); ?></h3>
|
||||
<h3><?php p($l->t('Indexing Metrics')); ?></h3>
|
||||
<div class="notecard notecard-error">
|
||||
<p><?php p($l->t('Failed to retrieve vector sync status:')); ?></p>
|
||||
<p><?php p($l->t('Failed to retrieve indexing status:')); ?></p>
|
||||
<p><code><?php p($_['vectorSyncStatus']['error'] ?? 'Unknown error'); ?></code></p>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Additional Features -->
|
||||
<!-- Capabilities -->
|
||||
<div class="mcp-status-card">
|
||||
<h3><?php p($l->t('Features')); ?></h3>
|
||||
<h3><?php p($l->t('Capabilities')); ?></h3>
|
||||
<ul class="mcp-feature-list">
|
||||
<li>
|
||||
<span class="icon icon-user"></span>
|
||||
<strong><?php p($l->t('User Settings')); ?></strong>
|
||||
<p><?php p($l->t('Users can manage their MCP server connections in Personal Settings.')); ?></p>
|
||||
<span class="icon icon-search"></span>
|
||||
<strong><?php p($l->t('Semantic Search')); ?></strong>
|
||||
<p><?php p($l->t('Search by meaning across Notes, Files, Calendar, and Deck using natural language queries.')); ?></p>
|
||||
</li>
|
||||
<?php if ($_['vectorSyncEnabled']): ?>
|
||||
<li>
|
||||
<span class="icon icon-search"></span>
|
||||
<span class="icon icon-category-monitoring"></span>
|
||||
<strong><?php p($l->t('Vector Visualization')); ?></strong>
|
||||
<p><?php p($l->t('Interactive semantic search interface with 2D PCA visualization.')); ?></p>
|
||||
<p><?php p($l->t('Explore content relationships in an interactive 2D visualization.')); ?></p>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<li>
|
||||
<span class="icon icon-link"></span>
|
||||
<strong><?php p($l->t('MCP Protocol')); ?></strong>
|
||||
<p><?php p($l->t('Full support for MCP sampling, elicitation, and bidirectional streaming.')); ?></p>
|
||||
<span class="icon icon-user"></span>
|
||||
<strong><?php p($l->t('Per-User Indexing')); ?></strong>
|
||||
<p><?php p($l->t('Users control their own content indexing via Personal Settings.')); ?></p>
|
||||
</li>
|
||||
<li>
|
||||
<span class="icon icon-toggle"></span>
|
||||
<strong><?php p($l->t('Hybrid Search')); ?></strong>
|
||||
<p><?php p($l->t('Combines semantic understanding with keyword matching for optimal results.')); ?></p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -209,11 +206,6 @@ style('astroglobe', 'astroglobe-settings');
|
||||
<div class="mcp-status-card">
|
||||
<h3><?php p($l->t('Documentation')); ?></h3>
|
||||
<ul class="mcp-links">
|
||||
<li>
|
||||
<a href="https://github.com/cbcoutinho/nextcloud-mcp-server/blob/master/docs/ADR-018-nextcloud-php-app-for-settings-ui.md" target="_blank">
|
||||
<?php p($l->t('Architecture Decision Record (ADR-018)')); ?>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/cbcoutinho/nextcloud-mcp-server/blob/master/docs/configuration.md" target="_blank">
|
||||
<?php p($l->t('Configuration Guide')); ?>
|
||||
|
||||
+30
-42
@@ -2,12 +2,12 @@
|
||||
/**
|
||||
* OAuth authorization required template.
|
||||
*
|
||||
* Shown when user needs to authorize Nextcloud to access MCP server.
|
||||
* Shown when user needs to authorize Astroglobe for semantic search.
|
||||
* Implements OAuth 2.0 Authorization Code flow with PKCE.
|
||||
*
|
||||
* @var array $_ Template parameters
|
||||
* @var string $_['oauth_url'] URL to initiate OAuth flow
|
||||
* @var string $_['server_url'] MCP server base URL
|
||||
* @var string $_['server_url'] Astroglobe service URL
|
||||
* @var bool $_['has_expired'] Whether token exists but is expired
|
||||
* @var string|null $_['error_message'] Optional error message to display
|
||||
*/
|
||||
@@ -19,7 +19,7 @@ Util::addStyle('astroglobe', 'astroglobe-settings');
|
||||
|
||||
<div id="mcp-personal-settings">
|
||||
<div class="mcp-settings-info">
|
||||
<p><?php p($l->t('Configure your personal MCP Server integration.')); ?></p>
|
||||
<p><?php p($l->t('AI-powered semantic search across your Nextcloud content.')); ?></p>
|
||||
</div>
|
||||
|
||||
<?php if (isset($_['error_message'])): ?>
|
||||
@@ -34,17 +34,17 @@ Util::addStyle('astroglobe', 'astroglobe-settings');
|
||||
|
||||
<div class="mcp-status-card">
|
||||
<h3>
|
||||
<span class="icon icon-password"></span>
|
||||
<?php p($l->t('Authorization Required')); ?>
|
||||
<span class="icon icon-search"></span>
|
||||
<?php p($l->t('Enable Semantic Search')); ?>
|
||||
</h3>
|
||||
|
||||
<?php if (isset($_['has_expired']) && $_['has_expired']): ?>
|
||||
<p>
|
||||
<?php p($l->t('Your MCP server access has expired. Please sign in again to continue using MCP features.')); ?>
|
||||
<?php p($l->t('Your authorization has expired. Please sign in again to continue using semantic search.')); ?>
|
||||
</p>
|
||||
<?php else: ?>
|
||||
<p>
|
||||
<?php p($l->t('To access MCP server features, you need to authorize Nextcloud to connect to your MCP server on your behalf.')); ?>
|
||||
<?php p($l->t('To search your content by meaning, Astroglobe needs permission to index your Nextcloud data.')); ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -53,34 +53,34 @@ Util::addStyle('astroglobe', 'astroglobe-settings');
|
||||
</p>
|
||||
|
||||
<ol class="mcp-help-text">
|
||||
<li><?php p($l->t('You will be redirected to your identity provider')); ?></li>
|
||||
<li><?php p($l->t('Sign in with your credentials')); ?></li>
|
||||
<li><?php p($l->t('Authorize Nextcloud to access the MCP server')); ?></li>
|
||||
<li><?php p($l->t('You will be redirected back to this page')); ?></li>
|
||||
<li><?php p($l->t('Sign in to confirm your identity')); ?></li>
|
||||
<li><?php p($l->t('Grant permission to index your content')); ?></li>
|
||||
<li><?php p($l->t('Your content will be indexed for semantic search')); ?></li>
|
||||
<li><?php p($l->t('Start searching with natural language')); ?></li>
|
||||
</ol>
|
||||
|
||||
<h4><?php p($l->t('Permissions Requested')); ?></h4>
|
||||
<h4><?php p($l->t('Content to be Indexed')); ?></h4>
|
||||
|
||||
<ul class="mcp-feature-list">
|
||||
<li>
|
||||
<span class="icon icon-info"></span>
|
||||
<div>
|
||||
<strong><?php p($l->t('Profile Information')); ?></strong>
|
||||
<p><?php p($l->t('Basic profile information (user ID, email) for identification')); ?></p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<span class="icon icon-files"></span>
|
||||
<div>
|
||||
<strong><?php p($l->t('Read Access')); ?></strong>
|
||||
<p><?php p($l->t('View your Notes, Calendar, Files, and other Nextcloud data')); ?></p>
|
||||
<strong><?php p($l->t('Notes & Files')); ?></strong>
|
||||
<p><?php p($l->t('Your notes and documents will be searchable by meaning')); ?></p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<span class="icon icon-rename"></span>
|
||||
<span class="icon icon-calendar"></span>
|
||||
<div>
|
||||
<strong><?php p($l->t('Write Access')); ?></strong>
|
||||
<p><?php p($l->t('Create and modify Notes, Calendar events, Files, and other Nextcloud data')); ?></p>
|
||||
<strong><?php p($l->t('Calendar & Tasks')); ?></strong>
|
||||
<p><?php p($l->t('Find events and tasks with natural language queries')); ?></p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<span class="icon icon-category-dashboard"></span>
|
||||
<div>
|
||||
<strong><?php p($l->t('Deck Cards')); ?></strong>
|
||||
<p><?php p($l->t('Search across your Deck boards and cards')); ?></p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -91,47 +91,35 @@ Util::addStyle('astroglobe', 'astroglobe-settings');
|
||||
<?php if (isset($_['has_expired']) && $_['has_expired']): ?>
|
||||
<?php p($l->t('Sign In Again')); ?>
|
||||
<?php else: ?>
|
||||
<?php p($l->t('Authorize Access')); ?>
|
||||
<?php p($l->t('Enable Semantic Search')); ?>
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<p class="mcp-help-text" style="margin-top: 16px;">
|
||||
<?php p($l->t('By authorizing, you allow Nextcloud to access the MCP server at:')); ?>
|
||||
<br>
|
||||
<code><?php p($_['server_url']); ?></code>
|
||||
</p>
|
||||
|
||||
<p class="mcp-help-text">
|
||||
<?php p($l->t('You can revoke this access at any time from this settings page.')); ?>
|
||||
<?php p($l->t('You can disable indexing at any time from this settings page.')); ?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="mcp-status-card">
|
||||
<h3>
|
||||
<span class="icon icon-info"></span>
|
||||
<?php p($l->t('About MCP Server')); ?>
|
||||
<?php p($l->t('About Astroglobe')); ?>
|
||||
</h3>
|
||||
|
||||
<p>
|
||||
<?php p($l->t('The Model Context Protocol (MCP) server provides AI assistants with access to your Nextcloud data.')); ?>
|
||||
<?php p($l->t('Astroglobe enables semantic search - finding content by meaning rather than exact keywords. Ask questions like "meeting notes from last week" or "recipes with chicken" to find relevant documents.')); ?>
|
||||
</p>
|
||||
|
||||
<p class="mcp-help-text">
|
||||
<?php p($l->t('Once authorized, you can use AI tools like Claude Desktop to interact with your Notes, Calendar, Files, and more through natural language.')); ?>
|
||||
<?php p($l->t('Your content is processed to understand its meaning, enabling powerful natural language search across all your Nextcloud data.')); ?>
|
||||
</p>
|
||||
|
||||
<ul class="mcp-links">
|
||||
<li>
|
||||
<a href="https://github.com/cbcoutinho/nextcloud-mcp-server" target="_blank" rel="noopener noreferrer">
|
||||
<span class="icon icon-external"></span>
|
||||
<?php p($l->t('MCP Server Documentation')); ?>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://modelcontextprotocol.io" target="_blank" rel="noopener noreferrer">
|
||||
<span class="icon icon-external"></span>
|
||||
<?php p($l->t('Learn about Model Context Protocol')); ?>
|
||||
<?php p($l->t('Learn More')); ?>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
+35
-51
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* Personal settings template for MCP Server UI.
|
||||
* Personal settings template for Astroglobe.
|
||||
*
|
||||
* Displays user session information, background access status,
|
||||
* and provides controls for managing MCP server integration.
|
||||
* Displays semantic search status, background indexing access,
|
||||
* and provides controls for managing content indexing.
|
||||
*
|
||||
* @var array $_ Template parameters
|
||||
* @var string $_['userId'] Current user ID
|
||||
@@ -11,7 +11,7 @@
|
||||
* @var array $_['session'] User session details from API
|
||||
* @var bool $_['vectorSyncEnabled'] Whether vector sync is enabled
|
||||
* @var bool $_['backgroundAccessGranted'] Whether user has granted background access
|
||||
* @var string $_['serverUrl'] MCP server URL
|
||||
* @var string $_['serverUrl'] Astroglobe service URL
|
||||
*/
|
||||
|
||||
// Get URL generator from Nextcloud's service container
|
||||
@@ -22,50 +22,42 @@ style('astroglobe', 'astroglobe-settings');
|
||||
?>
|
||||
|
||||
<div id="mcp-personal-settings" class="section">
|
||||
<h2><?php p($l->t('MCP Server')); ?></h2>
|
||||
<h2><?php p($l->t('Astroglobe')); ?></h2>
|
||||
|
||||
<div class="mcp-settings-info">
|
||||
<p><?php p($l->t('Manage your connection to the Nextcloud MCP (Model Context Protocol) Server.')); ?></p>
|
||||
<p><?php p($l->t('AI-powered semantic search across your Nextcloud content. Find documents by meaning, not just keywords.')); ?></p>
|
||||
</div>
|
||||
|
||||
<!-- Server Connection Status -->
|
||||
<!-- Service Status -->
|
||||
<div class="mcp-status-card">
|
||||
<h3><?php p($l->t('Server Connection')); ?></h3>
|
||||
<h3><?php p($l->t('Service Status')); ?></h3>
|
||||
<table class="mcp-info-table">
|
||||
<tr>
|
||||
<td><strong><?php p($l->t('Server URL')); ?></strong></td>
|
||||
<td><strong><?php p($l->t('Service URL')); ?></strong></td>
|
||||
<td><code><?php p($_['serverUrl']); ?></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong><?php p($l->t('Server Version')); ?></strong></td>
|
||||
<td><strong><?php p($l->t('Version')); ?></strong></td>
|
||||
<td><?php p($_['serverStatus']['version'] ?? 'Unknown'); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong><?php p($l->t('Auth Mode')); ?></strong></td>
|
||||
<td><?php p($_['serverStatus']['auth_mode'] ?? 'Unknown'); ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- Session Information -->
|
||||
<!-- Indexing Status -->
|
||||
<div class="mcp-status-card">
|
||||
<h3><?php p($l->t('Session Information')); ?></h3>
|
||||
<h3><?php p($l->t('Content Indexing')); ?></h3>
|
||||
<table class="mcp-info-table">
|
||||
<tr>
|
||||
<td><strong><?php p($l->t('User ID')); ?></strong></td>
|
||||
<td><code><?php p($_['userId']); ?></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong><?php p($l->t('Background Access')); ?></strong></td>
|
||||
<td><strong><?php p($l->t('Status')); ?></strong></td>
|
||||
<td>
|
||||
<?php if ($_['backgroundAccessGranted']): ?>
|
||||
<span class="badge badge-success">
|
||||
<span class="icon icon-checkmark-white"></span>
|
||||
<?php p($l->t('Granted')); ?>
|
||||
<?php p($l->t('Active')); ?>
|
||||
</span>
|
||||
<?php else: ?>
|
||||
<span class="badge badge-neutral">
|
||||
<?php p($l->t('Not Granted')); ?>
|
||||
<?php p($l->t('Not Enabled')); ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
@@ -75,33 +67,25 @@ style('astroglobe', 'astroglobe-settings');
|
||||
<?php if (!$_['backgroundAccessGranted']): ?>
|
||||
<div class="mcp-grant-section">
|
||||
<p class="mcp-help-text">
|
||||
<?php p($l->t('Background access allows the MCP server to sync your documents in the background for semantic search. Without it, your documents will not be indexed.')); ?>
|
||||
<?php p($l->t('Enable background indexing to use semantic search. Your Notes, Files, Calendar events, and Deck cards will be indexed so you can search by meaning.')); ?>
|
||||
</p>
|
||||
<a href="<?php p($_['serverUrl']); ?>/oauth/login?next=<?php p(urlencode($urlGenerator->getAbsoluteURL($urlGenerator->linkToRoute('settings.PersonalSettings.index', ['section' => 'astroglobe'])))); ?>" class="button primary" id="mcp-grant-button">
|
||||
<span class="icon icon-confirm"></span>
|
||||
<?php p($l->t('Grant Background Access')); ?>
|
||||
<?php p($l->t('Enable Semantic Search')); ?>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($_['backgroundAccessGranted'] && isset($_['session']['background_access_details'])): ?>
|
||||
<div class="mcp-background-details">
|
||||
<h4><?php p($l->t('Background Access Details')); ?></h4>
|
||||
<h4><?php p($l->t('Indexing Details')); ?></h4>
|
||||
<table class="mcp-info-table">
|
||||
<tr>
|
||||
<td><strong><?php p($l->t('Flow Type')); ?></strong></td>
|
||||
<td><?php p($_['session']['background_access_details']['flow_type'] ?? 'N/A'); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong><?php p($l->t('Provisioned At')); ?></strong></td>
|
||||
<td><strong><?php p($l->t('Enabled Since')); ?></strong></td>
|
||||
<td><?php p($_['session']['background_access_details']['provisioned_at'] ?? 'N/A'); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong><?php p($l->t('Token Audience')); ?></strong></td>
|
||||
<td><?php p($_['session']['background_access_details']['token_audience'] ?? 'N/A'); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong><?php p($l->t('Scopes')); ?></strong></td>
|
||||
<td><strong><?php p($l->t('Indexed Content')); ?></strong></td>
|
||||
<td><code style="font-size: 11px;"><?php p($_['session']['background_access_details']['scopes'] ?? 'N/A'); ?></code></td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -111,10 +95,10 @@ style('astroglobe', 'astroglobe-settings');
|
||||
<input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']); ?>">
|
||||
<button type="submit" class="button warning" id="mcp-revoke-button">
|
||||
<span class="icon icon-delete"></span>
|
||||
<?php p($l->t('Revoke Background Access')); ?>
|
||||
<?php p($l->t('Disable Indexing')); ?>
|
||||
</button>
|
||||
<p class="mcp-help-text">
|
||||
<?php p($l->t('This will delete the refresh token and prevent background operations from running on your behalf.')); ?>
|
||||
<?php p($l->t('This will stop background indexing and remove your content from semantic search. You can re-enable it at any time.')); ?>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
@@ -143,39 +127,39 @@ style('astroglobe', 'astroglobe-settings');
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Vector Sync Features -->
|
||||
<!-- Semantic Search Features -->
|
||||
<?php if ($_['vectorSyncEnabled']): ?>
|
||||
<div class="mcp-status-card">
|
||||
<h3><?php p($l->t('Semantic Search')); ?></h3>
|
||||
<p><?php p($l->t('Search your indexed content using semantic similarity. Find documents by meaning, not just keywords.')); ?></p>
|
||||
<h3><?php p($l->t('Search Your Content')); ?></h3>
|
||||
<p><?php p($l->t('Use natural language to search across your Notes, Files, Calendar, and Deck cards. Ask questions like "meeting notes from last week" or "recipes with chicken".')); ?></p>
|
||||
<a href="<?php p($urlGenerator->linkToRoute('astroglobe.page.index')); ?>" class="button primary">
|
||||
<span class="icon icon-search"></span>
|
||||
<?php p($l->t('Open MCP Server UI')); ?>
|
||||
<?php p($l->t('Open Astroglobe')); ?>
|
||||
</a>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="mcp-status-card mcp-disabled">
|
||||
<h3><?php p($l->t('Semantic Search')); ?></h3>
|
||||
<p class="mcp-help-text">
|
||||
<?php p($l->t('Vector sync is not enabled on the MCP server. Contact your administrator to enable this feature.')); ?>
|
||||
<?php p($l->t('Semantic search is not enabled on this server. Contact your administrator to enable this feature.')); ?>
|
||||
</p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- OAuth Connection Management -->
|
||||
<!-- Connection Management -->
|
||||
<div class="mcp-status-card">
|
||||
<h3><?php p($l->t('Connection Management')); ?></h3>
|
||||
<p><?php p($l->t('You are currently connected to the MCP server via OAuth.')); ?></p>
|
||||
<h3><?php p($l->t('Manage Connection')); ?></h3>
|
||||
<p><?php p($l->t('You are connected to the Astroglobe service.')); ?></p>
|
||||
|
||||
<div class="mcp-revoke-section">
|
||||
<form method="post" action="<?php p($urlGenerator->linkToRoute('astroglobe.oauth.disconnect')); ?>" id="mcp-disconnect-form">
|
||||
<input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']); ?>">
|
||||
<button type="submit" class="button warning" id="mcp-disconnect-button">
|
||||
<span class="icon icon-close"></span>
|
||||
<?php p($l->t('Disconnect from MCP Server')); ?>
|
||||
<?php p($l->t('Disconnect')); ?>
|
||||
</button>
|
||||
<p class="mcp-help-text">
|
||||
<?php p($l->t('This will remove your OAuth connection to the MCP server. You will need to authorize access again to use MCP features.')); ?>
|
||||
<?php p($l->t('This will disconnect from the Astroglobe service. You will need to re-authorize to use semantic search features.')); ?>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
@@ -183,12 +167,12 @@ style('astroglobe', 'astroglobe-settings');
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// Confirm revoke and disconnect actions
|
||||
// Confirm disable and disconnect actions
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const revokeForm = document.getElementById('mcp-revoke-form');
|
||||
if (revokeForm) {
|
||||
revokeForm.addEventListener('submit', function(e) {
|
||||
if (!confirm('<?php p($l->t('Are you sure you want to revoke background access? This action cannot be undone.')); ?>')) {
|
||||
if (!confirm('<?php p($l->t('Are you sure you want to disable indexing? Your content will be removed from semantic search.')); ?>')) {
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
@@ -197,7 +181,7 @@ style('astroglobe', 'astroglobe-settings');
|
||||
const disconnectForm = document.getElementById('mcp-disconnect-form');
|
||||
if (disconnectForm) {
|
||||
disconnectForm.addEventListener('submit', function(e) {
|
||||
if (!confirm('<?php p($l->t('Are you sure you want to disconnect from the MCP server? You will need to authorize access again.')); ?>')) {
|
||||
if (!confirm('<?php p($l->t('Are you sure you want to disconnect from Astroglobe? You will need to re-authorize to use semantic search.')); ?>')) {
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user