diff --git a/AGENTS.md b/AGENTS.md index b400939..6f3cc4b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1036,11 +1036,12 @@ CLI, unit tests (24) + integration tests (2). skill. The shipped packs: `nextcloud`, `simplex`, `outlook`, `browser` (each owning its bridge), and `essentials` (the built-in local utilities `time` + `calculator`; no bridge). `nextcloud.create_event` is the authoritative worked - example (CalDAV PUT; derives the title/date/time from the query, asks for + example (creates a CalDAV event through the Nextcloud bridge; derives the + title/date/time from the query, asks for missing fields and resumes, resolves the target calendar with a SemIf choice over the owned calendars — a strong winner is used, otherwise the configured - default); `nextcloud.next_event` is the read counterpart (Nextcloud CalDAV, - recurring events expanded server-side); `nextcloud.create_task` + default); `nextcloud.next_event` is the read counterpart (through the Nextcloud + bridge, recurring events expanded server-side); `nextcloud.create_task` adds a task to a Nextcloud task list through the Nextcloud bridge (`GET /tasklists` for a VTODO-capable target, `POST /tasks` to create it, the LLM bridge to phrase the summary/description); `simplex.next_message` (read via the @@ -1638,12 +1639,15 @@ CLI, unit tests (24) + integration tests (2). instantly inside the existing `semif-bridge.service`. HTTP Basic auth uses the username + app password. The connection is configured in `bridges.nextcloud` (`url`/`username`/`app_password`, plus `default_calendar`/`default_addressbook` - and `verify_tls`/`timeout`); `NextcloudBridge.from_config` passes the top-level - `nextcloud_url`/`nextcloud_username`/`nextcloud_app_password`/ - `nextcloud_default_calendar`/`nextcloud_default_addressbook` as a fallback, so - the same account the nextcloud pack skills collect is configured once and a block value - wins. Bodies reach it via the derived `nextcloud_bridge_url` (+ optional + and `verify_tls`/`timeout`); `NextcloudBridge.from_config` also accepts the + top-level `nextcloud_url`/`nextcloud_username`/`nextcloud_app_password`/ + `nextcloud_default_calendar`/`nextcloud_default_addressbook` as a fallback for a + hand-edited config, with a block value + winning. Bodies reach it via the derived `nextcloud_bridge_url` (+ optional `nextcloud_bridge_token`); the `BridgeInfo` declares only those two config vars. + `GET /calendars` also returns `default` (the configured default calendar name), + so a body can reproduce the strong-winner/else-default rule; with a bounded + window, `GET /calendars/events` expands recurrences server-side. Routes (reads `GET`, mutations `POST`): files (`/files`, `/files/stat`, `/files/read` text-or-base64, `/files/search`, `/files/write|mkdir|delete|move|copy`), calendars (`/calendars` with each collection's `supported-calendar-component-set` diff --git a/README.md b/README.md index 0cec852..c75f91e 100644 --- a/README.md +++ b/README.md @@ -359,8 +359,8 @@ fine-tuning loop — it is not yet the fine-tune itself. layer for third-party systems that need state/auth, a native protocol, or a sanitized surface; a plain HTTP API is called directly. - **Seeds** — shipped real starter skills: `nextcloud.create_event` (the - authoritative worked example), `nextcloud.next_event` (Nextcloud CalDAV), - `nextcloud.create_task` (Nextcloud task list), + authoritative worked example), `nextcloud.next_event` (the user's Nextcloud + calendar, through the bridge), `nextcloud.create_task` (Nextcloud task list), `simplex.next_message` / `simplex.send_message` / `simplex.connect_link`, and `calculator.calculate` (two operands, one SemIf-chosen operator, spoken answer). - **Fatal-on-engine-loss** — the engine is always real; its absence exits the app. @@ -835,11 +835,12 @@ tasks, CardDAV contacts, and the OCS Notes API — behind one JSON surface, so a body never speaks DAV/OCS directly. It has **no service daemon** (Nextcloud is plain HTTPS) and is stdlib-only (`urllib` + `xml.etree`), so it starts instantly in the same `semif-bridge` process. The connection (base URL, username, app -password) is configured in `bridges.nextcloud` and falls back to the top-level -`nextcloud_url` / `nextcloud_username` / `nextcloud_app_password` / -`nextcloud_default_calendar` the nextcloud pack skills use, so the account is -configured once. Skills call it at the address derived from `bridges.nextcloud` -(`nextcloud_bridge_url`, + optional `nextcloud_bridge_token`). Its HTTP surface: +password) is configured in `bridges.nextcloud`; `NextcloudBridge.from_config` +also accepts the top-level `nextcloud_url` / `nextcloud_username` / +`nextcloud_app_password` / `nextcloud_default_calendar` as a fallback for a +hand-edited config, with a block value winning. Skills call it at the address +derived from `bridges.nextcloud` (`nextcloud_bridge_url`, + optional +`nextcloud_bridge_token`). Its HTTP surface: ``` GET /health @@ -851,8 +852,8 @@ GET /files/read?path= # text, or base64 for binary GET /files/search?query=&path= POST /files/write {"path","content","encoding"?,"overwrite"?} POST /files/mkdir | /files/delete | /files/move | /files/copy -GET /calendars -GET /calendars/events?calendar=&start=&end= # CalDAV VEVENT +GET /calendars # includes "default" (configured default name) +GET /calendars/events?calendar=&start=&end= # CalDAV VEVENT; recurrences expand with a window POST /calendars/events | /calendars/events/update | /calendars/events/delete GET /tasks?calendar= # CalDAV VTODO POST /tasks | /tasks/update | /tasks/complete | /tasks/delete @@ -996,15 +997,15 @@ the tree at startup. Recorded config is written to the runtime store, so a pack repo never holds secrets. `PACKGEN.md` is the authoritative contract for authoring a new pack (and a new bridge to back one). -- `nextcloud.create_event` — create an event on Nextcloud CalDAV (the - authoritative worked example); resolves the target calendar with a SemIf - choice over the owned calendars (strong winner, else the configured default); - config vars `nextcloud_url`, `nextcloud_username`, `nextcloud_app_password`, - `nextcloud_default_calendar`, plus the LLM bridge (`llm_bridge_url`, - `llm_bridge_token`). -- `nextcloud.next_event` — next upcoming event from Nextcloud CalDAV (recurring - events expanded server-side); config vars `nextcloud_url`, - `nextcloud_username`, `nextcloud_app_password`, `nextcloud_default_calendar`. +- `nextcloud.create_event` — create an event on the user's Nextcloud calendar + through the Nextcloud bridge (`GET /calendars`, `POST /calendars/events`); + resolves the target calendar with a SemIf choice over the owned calendars + (strong winner, else the configured default); config vars + `nextcloud_bridge_url`, `nextcloud_bridge_token`, plus the LLM bridge + (`llm_bridge_url`, `llm_bridge_token`). +- `nextcloud.next_event` — next upcoming event through the Nextcloud bridge + (`GET /calendars`, `GET /calendars/events`; recurring events expanded + server-side); config vars `nextcloud_bridge_url`, `nextcloud_bridge_token`. - `nextcloud.create_task` — add a task to a Nextcloud task list through the Nextcloud bridge (`GET /tasklists`, `POST /tasks`); config vars `nextcloud_bridge_url`, `nextcloud_bridge_token`, `llm_bridge_url`, diff --git a/tests/test_skills.py b/tests/test_skills.py index 48d1e66..25e5fba 100644 --- a/tests/test_skills.py +++ b/tests/test_skills.py @@ -581,10 +581,10 @@ def test_scheduler_loads_committed_seed_skills(tmp_path): next_event = next(s for s in nextcloud if s.name == "next_event") assert next_event.description.startswith("Report the next") assert next_event.status == "ready" - assert next_event.integration["transport"] == "caldav" + assert next_event.integration["transport"] == "http" create_event = next(s for s in nextcloud if s.name == "create_event") assert create_event.description.startswith("Create a calendar event") - assert create_event.integration["transport"] == "caldav" + assert create_event.integration["transport"] == "http" def test_load_config_anchors_runtime_paths_to_checkout(tmp_path):