bridges: add a Nextcloud bridge (files, calendars, tasks, contacts, notes)

A standalone bridge wrapping the account's native protocols — WebDAV files,
CalDAV events and tasks, CardDAV contacts, and the OCS Notes API — behind one
token-guarded localhost JSON surface, so a codegen-authored body never speaks
DAV/OCS directly.

- nextcloud_client.py: stdlib-only client (urllib + xml.etree + ssl + base64)
  with Basic auth, DAV/OCS request bodies, and minimal iCalendar/vCard build +
  parse; every failure is a NextcloudError carrying the HTTP status.
- nextcloud.py: NextcloudBridge with no service daemon (check_requirements is
  always (True, None)), ~35 routes (GET reads, POST mutations). Event/task
  updates edit the stored iCalendar in place (preserving VALARM/ATTENDEE) behind
  If-Match; creates use If-None-Match. Missing connection is 503; a real
  Nextcloud failure is 502, never a fabricated success.
- registry: CATALOG entry + build_bridge passes the top-level nextcloud_* values
  as a fallback so the account the calendar seeds collect is configured once.
- config.example.json: bridges.nextcloud block + nextcloud_bridge_url/token.
- docs: README, AGENTS, bridges/__init__, bootstrap closing notes.

Tests drive the real client over a loopback http.server faking Nextcloud's
DAV/OCS shapes. One codegen test's context window was raised because the bridge
catalog injected into every prompt grew the baseline prompt.
This commit is contained in:
gabby committed 2026-10-07 12:17:39 +00:00
1 parent e64354e78d
commit d9cc7e4fed
10 files changed
+2819 -14

No files matched your search

+7
View File
@@ -624,6 +624,13 @@ LLM bridge (generation for skills):
- Runs inside the same 'semif-bridge' process. It reuses the top-level `llm`
model (configured once) and serves a generic POST /chat; skills call it via
the top-level llm_bridge_url (default http://127.0.0.1:5229).
Nextcloud bridge (files/calendar/tasks/contacts/notes for skills):
- Runs inside the same 'semif-bridge' process (Nextcloud is plain HTTPS, so
there is no separate daemon). Configure the account once in config.json under
bridges.nextcloud (url/username/app_password) — or reuse the top-level
nextcloud_* values the calendar seeds collect. Skills call it via the
top-level nextcloud_bridge_url (default http://127.0.0.1:5230).
EOF
if [[ "$VOICE" = 1 ]]; then