Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
36 changes: 36 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# https://editorconfig.org

# SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: AGPL-3.0-or-later

root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = tab
insert_final_newline = true
trim_trailing_whitespace = true

[*.yml]
indent_size = 2
indent_style = space

[*.md]
trim_trailing_whitespace = false

[*.svg]
insert_final_newline = false

[package*.json]
indent_size = 2
indent_style = space

[build/psalm-baseline.xml]
indent_size = 2
indent_style = space

[config/*config.php]
indent_size = 2
indent_style = space
16 changes: 16 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Revisions to skip in `git blame`.
#
# Enable locally, once:
# git config blame.ignoreRevsFile .git-blame-ignore-revs
#
# GitHub reads this file automatically. Your terminal does not, until you run
# the line above.
#
# Only ever add commits that change formatting and NOTHING else. A commit listed
# here becomes invisible to blame, so a behaviour change hidden inside one would
# be very hard to find later.

# style: reformat with nextcloud/coding-standard — whitespace only
# The fleet-wide move from a PEAR-derived PHPCS ruleset (4 spaces, next-line
# braces) to Nextcloud's own standard (tabs, same-line braces).
b2af4befb6163c2844081f507c324430e230a4c2
2 changes: 1 addition & 1 deletion .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ jobs:
# and were an absent dependency. A cell that cannot install this app's
# hard dependency measures nothing, so it is gone, and appinfo/info.xml
# now declares `min-version="32"` to match.
nextcloud-test-refs: '["stable33", "stable32"]'
nextcloud-test-refs: '["stable34"]'
enable-psalm: true
enable-phpstan: true
enable-phpmetrics: true
Expand Down
20 changes: 20 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

// SPDX-FileCopyrightText: 2026 Conduction
// SPDX-License-Identifier: EUPL-1.2

// The require_once is NOT optional. php-cs-fixer includes this file before the
// app's autoloader runs, so without it the run dies with "Class not found" —
// and in --format=json that fatal is reported as ZERO FILES NEEDING CHANGES,
// which reads exactly like a clean tree.
require_once __DIR__ . '/vendor/autoload.php';

$config = new Conduction\CodingStandard\Config();
$config->getFinder()
->notPath('vendor')
->notPath('node_modules')
->notPath('build')
->in(__DIR__ . '/lib')
->in(__DIR__ . '/tests');

return $config;
54 changes: 27 additions & 27 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,19 @@
with this version of the server`, measured in both stable31 cells of
run 31490144919.
-->
<nextcloud min-version="32" max-version="34"/>
<php min-version="8.3"/>
<nextcloud min-version="32" max-version="34"/>
</dependencies>

<navigations>
<navigation>
<id>hermiq</id>
<name>Hermiq</name>
<route>hermiq.dashboard.page</route>
<icon>app.svg</icon>
</navigation>
</navigations>
<!-- @spec openspec/changes/agent-schedule-dispatcher/tasks.md#task-1-2 -->
<!-- @spec openspec/changes/skills-marketplace/tasks.md#task-3-1 -->
<!-- Single <background-jobs> block only — a second block causes an NC upgrade 500. -->
<background-jobs>
<job>OCA\Hermiq\Cron\ScheduleTask</job>
<job>OCA\Hermiq\Cron\SkillCuratorTask</job>
<job>OCA\Hermiq\Cron\SkillLearningsPromotionTask</job>
<job>OCA\Hermiq\Cron\SkillConsolidationTask</job>
</background-jobs>

<!-- @spec openspec/architecture/adr-023-action-authorization.md -->
<!--
Expand All @@ -68,7 +69,7 @@
ReflectionException on a stale-OpenRegister fleet instance.
-->
<repair-steps>
<install>
<post-migration>
<step>OCA\Hermiq\Repair\CheckOpenRegisterCompatibility</step>
<step>OCA\Hermiq\Repair\InitializeSettings</step>
<step>OCA\Hermiq\Repair\InitializeActions</step>
Expand All @@ -91,10 +92,15 @@
<step>OCA\Hermiq\Repair\SeedHydraTriageFlow</step>
<!-- @spec openspec/changes/hydra-console-agent-leaves/tasks.md#task-6-seed-the-hydra-triage-agent -->
<step>OCA\Hermiq\Repair\SeedHydraTriageAgent</step>
<step>OCA\Hermiq\Repair\MigrateAgentData</step>
<step>OCA\Hermiq\Repair\RemoveLegacyLlmKeys</step>
<!-- @spec openspec/changes/talk-chat-bridge/tasks.md#1-bot-registration-and-lifecycle -->
<!-- Registers the in-process Talk bot. A no-op when Talk is absent,
and activates nothing on its own: a Talk moderator must still
enable it per conversation AND the agent must be Talk-enabled. -->
<step>OCA\Hermiq\Repair\InstallTalkBot</step>
</install>
<post-migration>
</post-migration>
<install>
<step>OCA\Hermiq\Repair\CheckOpenRegisterCompatibility</step>
<step>OCA\Hermiq\Repair\InitializeSettings</step>
<step>OCA\Hermiq\Repair\InitializeActions</step>
Expand All @@ -117,28 +123,22 @@
<step>OCA\Hermiq\Repair\SeedHydraTriageFlow</step>
<!-- @spec openspec/changes/hydra-console-agent-leaves/tasks.md#task-6-seed-the-hydra-triage-agent -->
<step>OCA\Hermiq\Repair\SeedHydraTriageAgent</step>
<step>OCA\Hermiq\Repair\MigrateAgentData</step>
<step>OCA\Hermiq\Repair\RemoveLegacyLlmKeys</step>
<!-- @spec openspec/changes/talk-chat-bridge/tasks.md#1-bot-registration-and-lifecycle -->
<!-- Registers the in-process Talk bot. A no-op when Talk is absent,
and activates nothing on its own: a Talk moderator must still
enable it per conversation AND the agent must be Talk-enabled. -->
<step>OCA\Hermiq\Repair\InstallTalkBot</step>
</post-migration>
</install>
</repair-steps>

<settings>
<admin>OCA\Hermiq\Settings\AdminSettings</admin>
<admin-section>OCA\Hermiq\Sections\SettingsSection</admin-section>
</settings>

<!-- @spec openspec/changes/agent-schedule-dispatcher/tasks.md#task-1-2 -->
<!-- @spec openspec/changes/skills-marketplace/tasks.md#task-3-1 -->
<!-- Single <background-jobs> block only — a second block causes an NC upgrade 500. -->
<background-jobs>
<job>OCA\Hermiq\Cron\ScheduleTask</job>
<job>OCA\Hermiq\Cron\SkillCuratorTask</job>
<job>OCA\Hermiq\Cron\SkillLearningsPromotionTask</job>
<job>OCA\Hermiq\Cron\SkillConsolidationTask</job>
</background-jobs>
<navigations>
<navigation>
<id>hermiq</id>
<name>Hermiq</name>
<route>hermiq.dashboard.page</route>
<icon>app.svg</icon>
</navigation>
</navigations>
</info>
203 changes: 102 additions & 101 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,103 +1,104 @@
{
"name": "conductionnl/hermiq",
"description": "Schedule autonomous AI agents in Nextcloud",
"license": "EUPL-1.2",
"authors": [
{
"name": "Conduction b.v.",
"email": "info@conduction.nl",
"homepage": "https://conduction.nl"
}
],
"autoload": {
"psr-4": {
"OCA\\Hermiq\\": "lib/"
}
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/theodo-group/LLPhant"
}
],
"require": {
"php": "^8.3",
"cweagans/composer-patches": "^1.7",
"dragonmantank/cron-expression": "^3.6",
"theodo-group/llphant": "^0.9.3"
},
"require-dev": {
"cyclonedx/cyclonedx-php-composer": "^6.2",
"edgedesign/phpqa": "^1.27",
"nextcloud/coding-standard": "^1.4",
"nextcloud/ocp": "^31.0",
"phpcsstandards/phpcsextra": "^1.4",
"phpmd/phpmd": "^2.15",
"phpmetrics/phpmetrics": "^2.8",
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^10.5",
"roave/security-advisories": "dev-latest",
"squizlabs/php_codesniffer": "^3.9",
"vimeo/psalm": "^5.26"
},
"scripts": {
"lint": "find . -name \\*.php -not -path './vendor/*' -not -path './build/*' -print0 | xargs -0 -n1 php -l",
"cs:check": "./vendor/bin/phpcs --standard=phpcs.xml",
"cs:fix": "./vendor/bin/phpcbf --standard=phpcs.xml",
"phpcs": "./vendor/bin/phpcs --standard=phpcs.xml",
"phpcs:fix": "./vendor/bin/phpcbf --standard=phpcs.xml",
"phpcs:output": "./vendor/bin/phpcs --standard=phpcs.xml --report=json lib/ 2>/dev/null | tail -1 > phpcs-output.json",
"phpmd": "E=0; ./vendor/bin/phpmd lib text phpmd.xml || E=$?; ./vendor/bin/phpmd lib text phpmd-unusedparams.xml || E=$?; exit $E",
"phpmetrics": "./vendor/bin/phpmetrics --report-html=phpmetrics lib/",
"psalm": "./vendor/bin/psalm --threads=1 --no-cache",
"phpstan": "./vendor/bin/phpstan analyse --memory-limit=1G",
"test:unit": "./vendor/bin/phpunit --colors=always",
"test:all": "./vendor/bin/phpunit --colors=always",
"check": "E=0; for CMD in lint phpcs psalm test:unit; do echo; echo \"=== $CMD ===\"; composer $CMD || E=1; done; echo; if [ $E -eq 0 ]; then echo \"ALL CHECKS PASSED\"; else echo \"SOME CHECKS FAILED (see above)\"; fi; exit $E",
"check:full": "E=0; for CMD in lint phpcs psalm phpstan test:all; do echo; echo \"=== $CMD ===\"; composer $CMD || E=1; done; echo; if [ $E -eq 0 ]; then echo \"ALL CHECKS PASSED\"; else echo \"SOME CHECKS FAILED (see above)\"; fi; exit $E",
"check:strict": "E=0; for CMD in lint phpcs phpmd psalm phpstan test:all; do echo; echo \"=== $CMD ===\"; composer $CMD || E=1; done; echo; if [ $E -eq 0 ]; then echo \"ALL CHECKS PASSED\"; else echo \"SOME CHECKS FAILED (see above)\"; fi; exit $E",
"fix": [
"@cs:fix"
],
"phpqa": "./vendor/bin/phpqa --report --analyzedDirs lib --buildDir phpqa",
"phpqa:full": "./vendor/bin/phpqa --report --analyzedDirs lib --buildDir phpqa --tools phpcs:0,phpmd:0,phploc:0,phpmetrics,phpcpd:0,parallel-lint:0",
"phpqa:ci": "./vendor/bin/phpqa --report --analyzedDirs lib --buildDir phpqa --tools phpcs,phpmd,phploc,phpmetrics,phpcpd,parallel-lint",
"qa:check": [
"@phpqa"
],
"qa:full": [
"@phpqa:full"
],
"test:coverage": "./vendor/bin/phpunit --coverage-html=coverage/html --coverage-clover=coverage/clover.xml --colors=always",
"quality:score": [
"@quality:phpcs-score",
"@quality:phpmd-score",
"@quality:psalm-score",
"@quality:phpstan-score"
],
"post-install-cmd": [
"git config core.hooksPath .githooks || true"
]
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"cyclonedx/cyclonedx-php-composer": true,
"cweagans/composer-patches": true
},
"optimize-autoloader": true,
"sort-packages": true,
"platform": {
"php": "8.3"
}
},
"extra": {
"composer-exit-on-patch-failure": true,
"patches": {
"theodo-group/llphant": {
"Forward think:false + keep_alive:-1 to the Ollama API (qwen3 ~5x speedup, no idle-unload wedge) — drop when LLPhant adds a per-call keep_alive/think model option": "patches/llphant-ollama-think-keepalive.patch",
"Capture Ollama token/latency usage on OllamaChat::$lastUsage so the Engine can record per-run cost (run-analytics) — drop when LLPhant exposes response usage": "patches/llphant-ollama-usage-capture.patch"
}
}
}
"name": "conductionnl/hermiq",
"description": "Schedule autonomous AI agents in Nextcloud",
"license": "EUPL-1.2",
"authors": [
{
"name": "Conduction b.v.",
"email": "info@conduction.nl",
"homepage": "https://conduction.nl"
}
],
"autoload": {
"psr-4": {
"OCA\\Hermiq\\": "lib/"
}
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/theodo-group/LLPhant"
}
],
"require": {
"php": "^8.3",
"cweagans/composer-patches": "^1.7",
"dragonmantank/cron-expression": "^3.6",
"theodo-group/llphant": "^0.9.3"
},
"require-dev": {
"conduction/coding-standard": "^1.0",
"conduction/hydra-gates": "^1.0",
"cyclonedx/cyclonedx-php-composer": "^6.2",
"edgedesign/phpqa": "^1.27",
"nextcloud/ocp": "^34.0",
"phpcsstandards/phpcsextra": "^1.4",
"phpmd/phpmd": "^2.15",
"phpmetrics/phpmetrics": "^2.8",
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^10.5",
"roave/security-advisories": "dev-latest",
"squizlabs/php_codesniffer": "^3.9",
"vimeo/psalm": "^5.26"
},
"scripts": {
"lint": "find . -name \\*.php -not -path './vendor/*' -not -path './build/*' -print0 | xargs -0 -n1 php -l",
"cs:check": "php-cs-fixer fix --dry-run --diff",
"cs:fix": "php-cs-fixer fix",
"phpcs": "./vendor/bin/phpcs --standard=phpcs.xml",
"phpcs:fix": "./vendor/bin/phpcbf --standard=phpcs.xml",
"phpcs:output": "./vendor/bin/phpcs --standard=phpcs.xml --report=json lib/ 2>/dev/null | tail -1 > phpcs-output.json",
"phpmd": "E=0; ./vendor/bin/phpmd lib text phpmd.xml || E=$?; ./vendor/bin/phpmd lib text phpmd-unusedparams.xml || E=$?; exit $E",
"phpmetrics": "./vendor/bin/phpmetrics --report-html=phpmetrics lib/",
"psalm": "./vendor/bin/psalm --threads=1 --no-cache",
"phpstan": "./vendor/bin/phpstan analyse --memory-limit=1G",
"test:unit": "./vendor/bin/phpunit --colors=always",
"test:all": "./vendor/bin/phpunit --colors=always",
"check": "E=0; for CMD in lint phpcs psalm test:unit; do echo; echo \"=== $CMD ===\"; composer $CMD || E=1; done; echo; if [ $E -eq 0 ]; then echo \"ALL CHECKS PASSED\"; else echo \"SOME CHECKS FAILED (see above)\"; fi; exit $E",
"check:full": "E=0; for CMD in lint phpcs psalm phpstan test:all; do echo; echo \"=== $CMD ===\"; composer $CMD || E=1; done; echo; if [ $E -eq 0 ]; then echo \"ALL CHECKS PASSED\"; else echo \"SOME CHECKS FAILED (see above)\"; fi; exit $E",
"check:strict": "E=0; for CMD in lint phpcs phpmd psalm phpstan test:all; do echo; echo \"=== $CMD ===\"; composer $CMD || E=1; done; echo; if [ $E -eq 0 ]; then echo \"ALL CHECKS PASSED\"; else echo \"SOME CHECKS FAILED (see above)\"; fi; exit $E",
"fix": [
"@cs:fix"
],
"phpqa": "./vendor/bin/phpqa --report --analyzedDirs lib --buildDir phpqa",
"phpqa:full": "./vendor/bin/phpqa --report --analyzedDirs lib --buildDir phpqa --tools phpcs:0,phpmd:0,phploc:0,phpmetrics,phpcpd:0,parallel-lint:0",
"phpqa:ci": "./vendor/bin/phpqa --report --analyzedDirs lib --buildDir phpqa --tools phpcs,phpmd,phploc,phpmetrics,phpcpd,parallel-lint",
"qa:check": [
"@phpqa"
],
"qa:full": [
"@phpqa:full"
],
"test:coverage": "./vendor/bin/phpunit --coverage-html=coverage/html --coverage-clover=coverage/clover.xml --colors=always",
"quality:score": [
"@quality:phpcs-score",
"@quality:phpmd-score",
"@quality:psalm-score",
"@quality:phpstan-score"
],
"post-install-cmd": [
"git config core.hooksPath .githooks || true"
]
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"cyclonedx/cyclonedx-php-composer": true,
"cweagans/composer-patches": true
},
"optimize-autoloader": true,
"sort-packages": true,
"platform": {
"php": "8.3"
}
},
"extra": {
"composer-exit-on-patch-failure": true,
"patches": {
"theodo-group/llphant": {
"Forward think:false + keep_alive:-1 to the Ollama API (qwen3 ~5x speedup, no idle-unload wedge) \u2014 drop when LLPhant adds a per-call keep_alive/think model option": "patches/llphant-ollama-think-keepalive.patch",
"Capture Ollama token/latency usage on OllamaChat::$lastUsage so the Engine can record per-run cost (run-analytics) \u2014 drop when LLPhant exposes response usage": "patches/llphant-ollama-usage-capture.patch"
}
}
}
}
Loading
Loading