diff --git a/.github/workflows/astroglobe-ci.yml b/.github/workflows/astrolabe-ci.yml
similarity index 97%
rename from .github/workflows/astroglobe-ci.yml
rename to .github/workflows/astrolabe-ci.yml
index a87a562..8d7afd8 100644
--- a/.github/workflows/astroglobe-ci.yml
+++ b/.github/workflows/astrolabe-ci.yml
@@ -1,24 +1,24 @@
-# Consolidated CI workflow for Astroglobe Nextcloud app
+# Consolidated CI workflow for Astrolabe Nextcloud app
#
-# Runs on PRs that modify the astroglobe directory
+# Runs on PRs that modify the astrolabe directory
# Based on Nextcloud app skeleton workflows
#
# SPDX-FileCopyrightText: 2025 Nextcloud MCP Server contributors
# SPDX-License-Identifier: MIT
-name: Astroglobe CI
+name: Astrolabe CI
on:
pull_request:
paths:
- 'third_party/astrolabe/**'
- - '.github/workflows/astroglobe-ci.yml'
+ - '.github/workflows/astrolabe-ci.yml'
permissions:
contents: read
concurrency:
- group: astroglobe-ci-${{ github.head_ref || github.run_id }}
+ group: astrolabe-ci-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
@@ -308,7 +308,7 @@ jobs:
runs-on: ubuntu-latest
needs: [changes, node-build, eslint, stylelint, php-cs, psalm, phpunit]
if: always()
- name: astroglobe-ci-summary
+ name: astrolabe-ci-summary
steps:
- name: Summary status
run: |
diff --git a/third_party/astrolabe/lib/Controller/ApiController.php b/third_party/astrolabe/lib/Controller/ApiController.php
index 5dbd6ec..a2139b9 100644
--- a/third_party/astrolabe/lib/Controller/ApiController.php
+++ b/third_party/astrolabe/lib/Controller/ApiController.php
@@ -26,13 +26,13 @@ use Psr\Log\LoggerInterface;
* Handles form submissions and AJAX requests from settings panels.
*/
class ApiController extends Controller {
- private $client;
- private $userSession;
- private $urlGenerator;
- private $logger;
- private $tokenStorage;
- private $config;
- private $tokenRefresher;
+ private McpServerClient $client;
+ private IUserSession $userSession;
+ private IURLGenerator $urlGenerator;
+ private LoggerInterface $logger;
+ private McpTokenStorage $tokenStorage;
+ private IConfig $config;
+ private IdpTokenRefresher $tokenRefresher;
public function __construct(
string $appName,
diff --git a/third_party/astrolabe/lib/Controller/CredentialsController.php b/third_party/astrolabe/lib/Controller/CredentialsController.php
index 9786e9f..2ba87ff 100644
--- a/third_party/astrolabe/lib/Controller/CredentialsController.php
+++ b/third_party/astrolabe/lib/Controller/CredentialsController.php
@@ -112,7 +112,7 @@ class CredentialsController extends Controller {
// Get MCP server URL from system config (set in config.php)
$mcpServerUrl = $this->config->getSystemValue('mcp_server_url', '');
if (empty($mcpServerUrl)) {
- $this->logger->warning("MCP server URL not configured, app password stored locally only");
+ $this->logger->warning('MCP server URL not configured, app password stored locally only');
return new JSONResponse([
'success' => true,
'partial_success' => true,
diff --git a/third_party/astrolabe/psalm-baseline.xml b/third_party/astrolabe/psalm-baseline.xml
new file mode 100644
index 0000000..8cd76ea
--- /dev/null
+++ b/third_party/astrolabe/psalm-baseline.xml
@@ -0,0 +1,774 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ getBody()]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ getBody()]]>
+ getBody()]]>
+
+ getBody()]]>
+ getBody()]]>
+ urlGenerator->linkToRoute('settings.PersonalSettings.index', [
+ 'section' => 'astrolabe',
+ 'error' => urlencode($e->getMessage())
+ ])]]>
+ urlGenerator->linkToRoute('settings.PersonalSettings.index', ['section' => 'astrolabe'])]]>
+ urlGenerator->linkToRoute('settings.PersonalSettings.index', ['section' => 'astrolabe'])]]>
+ urlGenerator->linkToRoute('settings.PersonalSettings.index', ['section' => 'astrolabe'])]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ getUID()]]>
+ getUID()]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ getBody()]]>
+
+ getBody()]]>
+ getBody()]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ getBody()]]>
+ getBody()]]>
+ getBody()]]>
+ getBody()]]>
+ getBody()]]>
+ getBody()]]>
+ getBody()]]>
+ getBody()]]>
+ getBody()]]>
+ getBody()]]>
+ getBody()]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ,
+ * error?: string
+ * }]]>
+
+
+ ,
+ * total_found?: int,
+ * algorithm_used?: string,
+ * error?: string
+ * }]]>
+
+
+
+ ,
+ * error?: string
+ * }]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ baseUrl]]>
+ baseUrl]]>
+ baseUrl]]>
+ baseUrl]]>
+ baseUrl]]>
+ baseUrl]]>
+ baseUrl]]>
+ baseUrl]]>
+ baseUrl]]>
+ baseUrl]]>
+ baseUrl]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ baseUrl]]>
+ config->getSystemValue('mcp_server_public_url', $this->baseUrl)]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $eventConfig['event']]]>
+
+
+
+
+
+
+
+
+ ]]>
+ $eventConfig['event'],
+ $preset['events']
+ )]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/third_party/astrolabe/psalm.xml b/third_party/astrolabe/psalm.xml
index e2853b7..920055b 100644
--- a/third_party/astrolabe/psalm.xml
+++ b/third_party/astrolabe/psalm.xml
@@ -8,6 +8,7 @@
findUnusedBaselineEntry="true"
findUnusedCode="true"
phpVersion="8.1"
+ errorBaseline="psalm-baseline.xml"
>
diff --git a/third_party/astrolabe/templates/settings/personal.php b/third_party/astrolabe/templates/settings/personal.php
index 61db152..9efdd7a 100644
--- a/third_party/astrolabe/templates/settings/personal.php
+++ b/third_party/astrolabe/templates/settings/personal.php
@@ -47,12 +47,12 @@ style('astrolabe', 'astrolabe-main'); // All CSS bundled into main
// Determine if hybrid mode (multi_user_basic + app passwords)
// In hybrid mode, user needs BOTH OAuth AND app password to be "fully configured"
$isHybridMode = ($_['authMode'] ?? '') === 'multi_user_basic' && !empty($_['supportsAppPasswords']);
- $hasOAuthToken = !empty($_['hasOAuthToken']);
- $hasBackgroundAccess = !empty($_['hasBackgroundAccess']) || !empty($_['backgroundAccessGranted']);
+$hasOAuthToken = !empty($_['hasOAuthToken']);
+$hasBackgroundAccess = !empty($_['hasBackgroundAccess']) || !empty($_['backgroundAccessGranted']);
- // In hybrid mode: both credentials required; otherwise just background access
- $isFullyConfigured = $isHybridMode ? ($hasOAuthToken && $hasBackgroundAccess) : $hasBackgroundAccess;
- ?>
+// In hybrid mode: both credentials required; otherwise just background access
+$isFullyConfigured = $isHybridMode ? ($hasOAuthToken && $hasBackgroundAccess) : $hasBackgroundAccess;
+?>