nextcloud-agent 2.4.1__tar.gz → 2.4.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/PKG-INFO +1 -1
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/api/api_client_base.py +12 -3
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/ontology/certification.json +1 -1
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent.egg-info/PKG-INFO +1 -1
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/pyproject.toml +1 -1
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/tests/test_files_webdav.py +10 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/LICENSE +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/README.md +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/__init__.py +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/__main__.py +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/api/__init__.py +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/api/api_client_calendar.py +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/api/api_client_contacts.py +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/api/api_client_files.py +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/api/xml_security.py +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/api_client.py +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/auth.py +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/connector_sources.py +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/kg_ingest.py +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/mcp_config.json +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/mcp_server.py +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/ontology/__init__.py +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/ontology/fixtures/records.json +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/ontology/mappings/source.yaml +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/ontology/migrations/manifest.json +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/ontology/nextcloud.ttl +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/ontology/shapes/connector.shacl.ttl +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/prompts/file_steward.json +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/skills/nextcloud-agent-development/SKILL.md +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/skills/nextcloud-agent-operations/SKILL.md +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/skills/nextcloud-agent-operations/agents/openai.yaml +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/skills/nextcloud-agent-operations/references/catalog.md +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/skills/nextcloud-files/SKILL.md +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/skills/nextcloud-files/WORKFLOW.md +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/skills/nextcloud-ingest/SKILL.md +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/skills/nextcloud-ingest/WORKFLOW.md +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/skills/nextcloud-shares/SKILL.md +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/skills/nextcloud-shares/WORKFLOW.md +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent.egg-info/SOURCES.txt +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent.egg-info/dependency_links.txt +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent.egg-info/entry_points.txt +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent.egg-info/requires.txt +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent.egg-info/top_level.txt +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/setup.cfg +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/tests/conftest.py +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/tests/test_api_client.py +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/tests/test_auth.py +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/tests/test_fleet_name.py +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/tests/test_init.py +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/tests/test_init_dynamics.py +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/tests/test_kg_ingest.py +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/tests/test_mcp_server.py +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/tests/test_publication_workflow.py +0 -0
- {nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/tests/test_xml_security.py +0 -0
|
@@ -33,6 +33,12 @@ class _StreamedResponse(Protocol):
|
|
|
33
33
|
def close(self) -> Any: ...
|
|
34
34
|
|
|
35
35
|
|
|
36
|
+
def _allowed_private_hosts() -> set[str]:
|
|
37
|
+
"""Hosts the operator admits for private addresses and plain http (R002)."""
|
|
38
|
+
raw = setting("NEXTCLOUD_ALLOWED_PRIVATE_HOSTS", "")
|
|
39
|
+
return {host.lower().rstrip(".") for host in csv_values(raw)}
|
|
40
|
+
|
|
41
|
+
|
|
36
42
|
def _origin(url: str, *, require_clean_base: bool = False) -> tuple[str, str, int]:
|
|
37
43
|
try:
|
|
38
44
|
parsed = urlsplit(url)
|
|
@@ -57,8 +63,11 @@ def _origin(url: str, *, require_clean_base: bool = False) -> tuple[str, str, in
|
|
|
57
63
|
loopback = ipaddress.ip_address(host).is_loopback
|
|
58
64
|
except ValueError:
|
|
59
65
|
loopback = host == "localhost"
|
|
60
|
-
if not loopback:
|
|
61
|
-
raise ValueError(
|
|
66
|
+
if not loopback and host not in _allowed_private_hosts():
|
|
67
|
+
raise ValueError(
|
|
68
|
+
"unencrypted service URL is restricted to loopback and "
|
|
69
|
+
"NEXTCLOUD_ALLOWED_PRIVATE_HOSTS"
|
|
70
|
+
)
|
|
62
71
|
return scheme, host, port
|
|
63
72
|
|
|
64
73
|
|
|
@@ -169,7 +178,7 @@ class BaseApiClient:
|
|
|
169
178
|
def files_dav(self) -> WebDavBackend:
|
|
170
179
|
"""The SDK WebDAV backend on the files root (CONN-NEXTCLOUD-AGENT-R002)."""
|
|
171
180
|
if self._files_dav is None:
|
|
172
|
-
hosts = tuple(
|
|
181
|
+
hosts = tuple(sorted(_allowed_private_hosts()))
|
|
173
182
|
self._files_dav = WebDavBackend(
|
|
174
183
|
self.webdav_base,
|
|
175
184
|
username=self.username,
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "nextcloud-agent"
|
|
7
|
-
version = "2.4.
|
|
7
|
+
version = "2.4.2"
|
|
8
8
|
description = "Nextcloud MCP Server for Agentic AI!"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
classifiers = [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Environment :: Console", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3",]
|
|
@@ -143,3 +143,13 @@ def test_sdk_pin_carries_storage_backend():
|
|
|
143
143
|
from scion_sdk.storage import WebDavBackend as Backend
|
|
144
144
|
|
|
145
145
|
assert Backend.backend_type == "webdav"
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
@pytest.mark.spec("CONN-NEXTCLOUD-AGENT-R002")
|
|
149
|
+
def test_plain_http_is_admitted_only_for_listed_hosts(monkeypatch):
|
|
150
|
+
monkeypatch.delenv("NEXTCLOUD_ALLOWED_PRIVATE_HOSTS", raising=False)
|
|
151
|
+
with pytest.raises(ValueError, match="restricted to loopback"):
|
|
152
|
+
NextcloudAPI(base_url="http://files.example", username="svc", password="pw")
|
|
153
|
+
monkeypatch.setenv("NEXTCLOUD_ALLOWED_PRIVATE_HOSTS", "files.example")
|
|
154
|
+
client = NextcloudAPI(base_url="http://files.example", username="svc", password="pw")
|
|
155
|
+
assert client.files_dav.backend_type == "webdav"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/ontology/fixtures/records.json
RENAMED
|
File without changes
|
{nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/ontology/mappings/source.yaml
RENAMED
|
File without changes
|
{nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/ontology/migrations/manifest.json
RENAMED
|
File without changes
|
|
File without changes
|
{nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/ontology/shapes/connector.shacl.ttl
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/skills/nextcloud-files/SKILL.md
RENAMED
|
File without changes
|
{nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/skills/nextcloud-files/WORKFLOW.md
RENAMED
|
File without changes
|
{nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/skills/nextcloud-ingest/SKILL.md
RENAMED
|
File without changes
|
{nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/skills/nextcloud-ingest/WORKFLOW.md
RENAMED
|
File without changes
|
{nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/skills/nextcloud-shares/SKILL.md
RENAMED
|
File without changes
|
{nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent/skills/nextcloud-shares/WORKFLOW.md
RENAMED
|
File without changes
|
|
File without changes
|
{nextcloud_agent-2.4.1 → nextcloud_agent-2.4.2}/nextcloud_agent.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|