Skip to content

Commit 660f872

Browse files
committed
refactor: plugin catalog + nextcloud policy
1 parent 9ec1fb4 commit 660f872

33 files changed

Lines changed: 2863 additions & 211 deletions

‎CHANGELOG.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Docs: https://docs.clawd.bot
77
### Changes
88
- Repo: remove the Peekaboo git submodule now that the SPM release is used.
99
- Plugins: require manifest-embedded config schemas, validate configs without loading plugin code, and surface plugin config warnings. (#1272) — thanks @thewilloftheshadow.
10-
10+
- Plugins: move channel catalog metadata into plugin manifests; align Nextcloud Talk policy helpers with core patterns. (#1290) — thanks @NicholaiVogel.
1111
### Fixes
1212
- Web search: infer Perplexity base URL from API key source (direct vs OpenRouter).
1313
- TUI: keep thinking blocks ordered before content during streaming and isolate per-run assembly. (#1202) — thanks @aaronveklabs.

‎docs/channels/index.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Text is supported everywhere; media and reactions vary by channel.
1919
- [iMessage](/channels/imessage) — macOS only; native integration.
2020
- [BlueBubbles](/channels/bluebubbles) — iMessage via BlueBubbles macOS server (bundled plugin, disabled by default).
2121
- [Microsoft Teams](/channels/msteams) — Bot Framework; enterprise support (plugin, installed separately).
22+
- [Nextcloud Talk](/channels/nextcloud-talk) — Self-hosted chat via Nextcloud Talk (plugin, installed separately).
2223
- [Matrix](/channels/matrix) — Matrix protocol (plugin, installed separately).
2324
- [Zalo](/channels/zalo) — Zalo Bot API; Vietnam's popular messenger (plugin, installed separately).
2425
- [Zalo Personal](/channels/zalouser) — Zalo personal account via QR login (plugin, installed separately).

‎docs/channels/nextcloud-talk.md‎

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
---
2+
summary: "Nextcloud Talk support status, capabilities, and configuration"
3+
read_when:
4+
- Working on Nextcloud Talk channel features
5+
---
6+
# Nextcloud Talk (plugin)
7+
8+
Status: supported via plugin (webhook bot). Direct messages, rooms, reactions, and markdown messages are supported.
9+
10+
## Plugin required
11+
Nextcloud Talk ships as a plugin and is not bundled with the core install.
12+
13+
Install via CLI (npm registry):
14+
```bash
15+
clawdbot plugins install @clawdbot/nextcloud-talk
16+
```
17+
18+
Local checkout (when running from a git repo):
19+
```bash
20+
clawdbot plugins install ./extensions/nextcloud-talk
21+
```
22+
23+
If you choose Nextcloud Talk during configure/onboarding and a git checkout is detected,
24+
Clawdbot will offer the local install path automatically.
25+
26+
Details: [Plugins](/plugin)
27+
28+
## Quick setup (beginner)
29+
1) Install the Nextcloud Talk plugin.
30+
2) On your Nextcloud server, create a bot:
31+
```bash
32+
./occ talk:bot:install "Clawdbot" "<shared-secret>" "<webhook-url>" --feature reaction
33+
```
34+
3) Enable the bot in the target room settings.
35+
4) Configure Clawdbot:
36+
- Config: `channels.nextcloud-talk.baseUrl` + `channels.nextcloud-talk.botSecret`
37+
- Or env: `NEXTCLOUD_TALK_BOT_SECRET` (default account only)
38+
5) Restart the gateway (or finish onboarding).
39+
40+
Minimal config:
41+
```json5
42+
{
43+
channels: {
44+
"nextcloud-talk": {
45+
enabled: true,
46+
baseUrl: "https://cloud.example.com",
47+
botSecret: "shared-secret",
48+
dmPolicy: "pairing"
49+
}
50+
}
51+
}
52+
```
53+
54+
## Notes
55+
- Bots cannot initiate DMs. The user must message the bot first.
56+
- Webhook URL must be reachable by the Gateway; set `webhookPublicUrl` if behind a proxy.
57+
- Media uploads are not supported by the bot API; media is sent as URLs.
58+
- The webhook payload does not distinguish DMs vs rooms; set `apiUser` + `apiPassword` to enable room-type lookups (otherwise DMs are treated as rooms).
59+
60+
## Access control (DMs)
61+
- Default: `channels.nextcloud-talk.dmPolicy = "pairing"`. Unknown senders get a pairing code.
62+
- Approve via:
63+
- `clawdbot pairing list nextcloud-talk`
64+
- `clawdbot pairing approve nextcloud-talk <CODE>`
65+
- Public DMs: `channels.nextcloud-talk.dmPolicy="open"` plus `channels.nextcloud-talk.allowFrom=["*"]`.
66+
67+
## Rooms (groups)
68+
- Default: `channels.nextcloud-talk.groupPolicy = "allowlist"` (mention-gated).
69+
- Allowlist rooms with `channels.nextcloud-talk.rooms`:
70+
```json5
71+
{
72+
channels: {
73+
"nextcloud-talk": {
74+
rooms: {
75+
"room-token": { requireMention: true }
76+
}
77+
}
78+
}
79+
}
80+
```
81+
- To allow no rooms, keep the allowlist empty or set `channels.nextcloud-talk.groupPolicy="disabled"`.
82+
83+
## Capabilities
84+
| Feature | Status |
85+
|---------|--------|
86+
| Direct messages | Supported |
87+
| Rooms | Supported |
88+
| Threads | Not supported |
89+
| Media | URL-only |
90+
| Reactions | Supported |
91+
| Native commands | Not supported |
92+
93+
## Configuration reference (Nextcloud Talk)
94+
Full configuration: [Configuration](/gateway/configuration)
95+
96+
Provider options:
97+
- `channels.nextcloud-talk.enabled`: enable/disable channel startup.
98+
- `channels.nextcloud-talk.baseUrl`: Nextcloud instance URL.
99+
- `channels.nextcloud-talk.botSecret`: bot shared secret.
100+
- `channels.nextcloud-talk.botSecretFile`: secret file path.
101+
- `channels.nextcloud-talk.apiUser`: API user for room lookups (DM detection).
102+
- `channels.nextcloud-talk.apiPassword`: API/app password for room lookups.
103+
- `channels.nextcloud-talk.apiPasswordFile`: API password file path.
104+
- `channels.nextcloud-talk.webhookPort`: webhook listener port (default: 8788).
105+
- `channels.nextcloud-talk.webhookHost`: webhook host (default: 0.0.0.0).
106+
- `channels.nextcloud-talk.webhookPath`: webhook path (default: /nextcloud-talk-webhook).
107+
- `channels.nextcloud-talk.webhookPublicUrl`: externally reachable webhook URL.
108+
- `channels.nextcloud-talk.dmPolicy`: `pairing | allowlist | open | disabled`.
109+
- `channels.nextcloud-talk.allowFrom`: DM allowlist (user IDs). `open` requires `"*"`.
110+
- `channels.nextcloud-talk.groupPolicy`: `allowlist | open | disabled`.
111+
- `channels.nextcloud-talk.groupAllowFrom`: group allowlist (user IDs).
112+
- `channels.nextcloud-talk.rooms`: per-room settings and allowlist.
113+
- `channels.nextcloud-talk.historyLimit`: group history limit (0 disables).
114+
- `channels.nextcloud-talk.dmHistoryLimit`: DM history limit (0 disables).
115+
- `channels.nextcloud-talk.dms`: per-DM overrides (historyLimit).
116+
- `channels.nextcloud-talk.textChunkLimit`: outbound text chunk size (chars).
117+
- `channels.nextcloud-talk.blockStreaming`: disable block streaming for this channel.
118+
- `channels.nextcloud-talk.blockStreamingCoalesce`: block streaming coalesce tuning.
119+
- `channels.nextcloud-talk.mediaMaxMb`: inbound media cap (MB).

‎docs/plugin.md‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,37 @@ becomes `name/<fileBase>`.
112112
If your plugin imports npm deps, install them in that directory so
113113
`node_modules` is available (`npm install` / `pnpm install`).
114114

115+
### Channel catalog metadata
116+
117+
Channel plugins can advertise onboarding metadata via `clawdbot.channel` and
118+
install hints via `clawdbot.install`. This keeps the core catalog data-free.
119+
120+
Example:
121+
122+
```json
123+
{
124+
"name": "@clawdbot/nextcloud-talk",
125+
"clawdbot": {
126+
"extensions": ["./index.ts"],
127+
"channel": {
128+
"id": "nextcloud-talk",
129+
"label": "Nextcloud Talk",
130+
"selectionLabel": "Nextcloud Talk (self-hosted)",
131+
"docsPath": "/channels/nextcloud-talk",
132+
"docsLabel": "nextcloud-talk",
133+
"blurb": "Self-hosted chat via Nextcloud Talk webhook bots.",
134+
"order": 65,
135+
"aliases": ["nc-talk", "nc"]
136+
},
137+
"install": {
138+
"npmSpec": "@clawdbot/nextcloud-talk",
139+
"localPath": "extensions/nextcloud-talk",
140+
"defaultChoice": "npm"
141+
}
142+
}
143+
}
144+
```
145+
115146
## Plugin IDs
116147

117148
Default plugin ids:

‎extensions/bluebubbles/package.json‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,20 @@
44
"type": "module",
55
"description": "Clawdbot BlueBubbles channel plugin",
66
"clawdbot": {
7-
"extensions": ["./index.ts"]
7+
"extensions": ["./index.ts"],
8+
"channel": {
9+
"id": "bluebubbles",
10+
"label": "BlueBubbles",
11+
"selectionLabel": "BlueBubbles (macOS app)",
12+
"docsPath": "/channels/bluebubbles",
13+
"docsLabel": "bluebubbles",
14+
"blurb": "iMessage via the BlueBubbles mac app + REST API.",
15+
"order": 75
16+
},
17+
"install": {
18+
"npmSpec": "@clawdbot/bluebubbles",
19+
"localPath": "extensions/bluebubbles",
20+
"defaultChoice": "npm"
21+
}
822
}
923
}

‎extensions/matrix/package.json‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,22 @@
66
"clawdbot": {
77
"extensions": [
88
"./index.ts"
9-
]
9+
],
10+
"channel": {
11+
"id": "matrix",
12+
"label": "Matrix",
13+
"selectionLabel": "Matrix (plugin)",
14+
"docsPath": "/channels/matrix",
15+
"docsLabel": "matrix",
16+
"blurb": "open protocol; install the plugin to enable.",
17+
"order": 70,
18+
"quickstartAllowFrom": true
19+
},
20+
"install": {
21+
"npmSpec": "@clawdbot/matrix",
22+
"localPath": "extensions/matrix",
23+
"defaultChoice": "npm"
24+
}
1025
},
1126
"dependencies": {
1227
"clawdbot": "workspace:*",

‎extensions/msteams/package.json‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,22 @@
66
"clawdbot": {
77
"extensions": [
88
"./index.ts"
9-
]
9+
],
10+
"channel": {
11+
"id": "msteams",
12+
"label": "Microsoft Teams",
13+
"selectionLabel": "Microsoft Teams (Bot Framework)",
14+
"docsPath": "/channels/msteams",
15+
"docsLabel": "msteams",
16+
"blurb": "Bot Framework; enterprise support.",
17+
"aliases": ["teams"],
18+
"order": 60
19+
},
20+
"install": {
21+
"npmSpec": "@clawdbot/msteams",
22+
"localPath": "extensions/msteams",
23+
"defaultChoice": "npm"
24+
}
1025
},
1126
"dependencies": {
1227
"@microsoft/agents-hosting": "^1.2.2",

‎extensions/nextcloud-talk/index.ts‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import type { ClawdbotPluginApi } from "clawdbot/plugin-sdk";
2+
import { emptyPluginConfigSchema } from "clawdbot/plugin-sdk";
3+
4+
import { nextcloudTalkPlugin } from "./src/channel.js";
5+
import { setNextcloudTalkRuntime } from "./src/runtime.js";
6+
7+
const plugin = {
8+
id: "nextcloud-talk",
9+
name: "Nextcloud Talk",
10+
description: "Nextcloud Talk channel plugin",
11+
configSchema: emptyPluginConfigSchema(),
12+
register(api: ClawdbotPluginApi) {
13+
setNextcloudTalkRuntime(api.runtime);
14+
api.registerChannel({ plugin: nextcloudTalkPlugin });
15+
},
16+
};
17+
18+
export default plugin;
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "@clawdbot/nextcloud-talk",
3+
"version": "2026.1.17-1",
4+
"type": "module",
5+
"description": "Clawdbot Nextcloud Talk channel plugin",
6+
"clawdbot": {
7+
"extensions": ["./index.ts"],
8+
"channel": {
9+
"id": "nextcloud-talk",
10+
"label": "Nextcloud Talk",
11+
"selectionLabel": "Nextcloud Talk (self-hosted)",
12+
"docsPath": "/channels/nextcloud-talk",
13+
"docsLabel": "nextcloud-talk",
14+
"blurb": "Self-hosted chat via Nextcloud Talk webhook bots.",
15+
"aliases": ["nc-talk", "nc"],
16+
"order": 65,
17+
"quickstartAllowFrom": true
18+
},
19+
"install": {
20+
"npmSpec": "@clawdbot/nextcloud-talk",
21+
"localPath": "extensions/nextcloud-talk",
22+
"defaultChoice": "npm"
23+
}
24+
}
25+
}

0 commit comments

Comments
 (0)