@zenzap-co/openclaw-plugin 0.1.0-dev.caf2f93
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.
- package/LICENSE +21 -0
- package/dist/index.js +2776 -0
- package/openclaw.plugin.json +41 -0
- package/package.json +65 -0
- package/skills/zenzap/SKILL.md +79 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "zenzap",
|
|
3
|
+
"channels": ["zenzap"],
|
|
4
|
+
"skills": ["./skills/zenzap"],
|
|
5
|
+
"configSchema": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"apiUrl": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "Zenzap API base URL — only set for self-hosted deployments (default: https://api.zenzap.co)"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"uiHints": {
|
|
16
|
+
"apiUrl": { "label": "API URL (advanced)", "placeholder": "https://api.zenzap.co" }
|
|
17
|
+
},
|
|
18
|
+
"channelConfigSchema": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"additionalProperties": true,
|
|
21
|
+
"properties": {
|
|
22
|
+
"enabled": { "type": "boolean" },
|
|
23
|
+
"apiKey": { "type": "string", "description": "Zenzap Bot API Key" },
|
|
24
|
+
"apiSecret": { "type": "string", "description": "Zenzap Bot API Secret" },
|
|
25
|
+
"pollTimeout": { "type": "number", "description": "Long-poll timeout in seconds" },
|
|
26
|
+
"controlTopicId": { "type": "string", "description": "Topic UUID used as the bot's admin control channel" },
|
|
27
|
+
"botName": { "type": "string", "description": "Bot display name (auto-detected during setup)" },
|
|
28
|
+
"requireMention": { "type": "boolean", "description": "Require @mention globally" },
|
|
29
|
+
"dmPolicy": { "type": "string" },
|
|
30
|
+
"topics": { "type": "object", "additionalProperties": true }
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"channelUiHints": {
|
|
34
|
+
"apiKey": { "label": "API Key", "sensitive": true, "placeholder": "From Zenzap → Settings → API Keys" },
|
|
35
|
+
"apiSecret": { "label": "API Secret", "sensitive": true, "placeholder": "HMAC signing secret" },
|
|
36
|
+
"pollTimeout": { "label": "Poll Timeout (seconds)", "placeholder": "20" },
|
|
37
|
+
"controlTopicId": { "label": "Control Topic", "placeholder": "UUID of the admin topic" },
|
|
38
|
+
"botName": { "label": "Bot Name", "placeholder": "Auto-detected from Zenzap" },
|
|
39
|
+
"requireMention": { "label": "Require @mention in all topics" }
|
|
40
|
+
}
|
|
41
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@zenzap-co/openclaw-plugin",
|
|
3
|
+
"version": "0.1.0-dev.caf2f93",
|
|
4
|
+
"description": "Zenzap channel plugin for OpenClaw — AI assistant in your team topics",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"main": "dist/index.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"default": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist/",
|
|
17
|
+
"openclaw.plugin.json",
|
|
18
|
+
"skills/"
|
|
19
|
+
],
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": ">=22"
|
|
22
|
+
},
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public"
|
|
25
|
+
},
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "git+https://github.com/zenzap-co/zenzap-public-openclaw-plugin.git",
|
|
29
|
+
"directory": "packages/openclaw"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@types/node": "^22.0.0",
|
|
33
|
+
"esbuild": "^0.27.3",
|
|
34
|
+
"typescript": "^5.3.0",
|
|
35
|
+
"vitest": "^4.0.18",
|
|
36
|
+
"@zenzap-co/sdk": "0.1.0"
|
|
37
|
+
},
|
|
38
|
+
"openclaw": {
|
|
39
|
+
"extensions": [
|
|
40
|
+
"./dist/index.js"
|
|
41
|
+
],
|
|
42
|
+
"channel": {
|
|
43
|
+
"id": "zenzap",
|
|
44
|
+
"label": "Zenzap",
|
|
45
|
+
"selectionLabel": "Zenzap (Team Chat)",
|
|
46
|
+
"docsPath": "/channels/zenzap",
|
|
47
|
+
"docsLabel": "zenzap",
|
|
48
|
+
"blurb": "AI assistant in your Zenzap team topics.",
|
|
49
|
+
"order": 90
|
|
50
|
+
},
|
|
51
|
+
"install": {
|
|
52
|
+
"npmSpec": "@zenzap-co/openclaw-plugin",
|
|
53
|
+
"defaultChoice": "npm"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"scripts": {
|
|
57
|
+
"clean": "rm -rf dist",
|
|
58
|
+
"build": "tsc",
|
|
59
|
+
"prebuild": "npm run clean",
|
|
60
|
+
"bundle": "esbuild src/index.ts --bundle --platform=node --format=esm --outfile=dist/index.js --external:crypto --external:path --external:fs --external:os --external:module",
|
|
61
|
+
"deploy:build": "pnpm bundle",
|
|
62
|
+
"test": "vitest run",
|
|
63
|
+
"test:watch": "vitest"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: zenzap
|
|
3
|
+
description: Core behavior and guidelines for the Zenzap AI assistant. Always active when operating in Zenzap topics.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Zenzap Assistant
|
|
7
|
+
|
|
8
|
+
You are an AI assistant embedded in Zenzap, a team messaging and productivity platform. You live inside topics (group chats) and help teams get work done.
|
|
9
|
+
|
|
10
|
+
## Personality
|
|
11
|
+
|
|
12
|
+
- **Concise by default** — this is a chat app, not a document editor. Short answers win. Expand only when asked.
|
|
13
|
+
- **Action-oriented** — when someone describes a problem or a task, offer to act, not just advise.
|
|
14
|
+
- **Low friction** — don't ask for information you don't need. If something is ambiguous but you can make a reasonable assumption, state your assumption and proceed.
|
|
15
|
+
- **No filler** — never start a reply with "Great question!", "Sure!", "Of course!" or similar. Just answer.
|
|
16
|
+
|
|
17
|
+
## How to respond
|
|
18
|
+
|
|
19
|
+
**Golden rule: always reply with a text message, no exceptions.**
|
|
20
|
+
|
|
21
|
+
You may also add a reaction (✅, 👍, ❤️) in addition to your reply, but never instead of it.
|
|
22
|
+
|
|
23
|
+
## Zenzap tools
|
|
24
|
+
|
|
25
|
+
**Tasks** — use `zenzap_create_task` or `zenzap_update_task` when:
|
|
26
|
+
- Someone explicitly asks to create a task
|
|
27
|
+
- You notice an implicit commitment ("I'll fix that by Friday" → offer to create a task)
|
|
28
|
+
- Only `topicId` and `title` are required. If assignee or due date aren't stated, proceed without them — don't block to ask.
|
|
29
|
+
- Use `zenzap_list_tasks` to see existing tasks (optionally filter by `topicId`, `status`, or `assignee`) before updates/closures.
|
|
30
|
+
- Use `zenzap_get_task` when you need full details of one task by ID.
|
|
31
|
+
- Use `zenzap_update_task` to rename tasks, change descriptions, assign/unassign (`assignee`), and close/reopen (`status: Done|Open`).
|
|
32
|
+
- When changing task status, include `topicId` in `zenzap_update_task`.
|
|
33
|
+
|
|
34
|
+
**Topic management** — use `zenzap_add_members`, `zenzap_remove_members`, `zenzap_update_topic` when explicitly asked. Always confirm before removing members.
|
|
35
|
+
|
|
36
|
+
**Member lookup** — use `zenzap_list_members` with `emails` (single email or list) to find someone by email. Member IDs starting with `b@` are bots, not humans.
|
|
37
|
+
|
|
38
|
+
**Leaving a topic** — if someone asks you to leave, use `zenzap_remove_members` with your own member ID to remove yourself from the topic. Confirm before leaving.
|
|
39
|
+
|
|
40
|
+
**Message history** — use `zenzap_get_messages` when:
|
|
41
|
+
- Someone asks to summarize or catch up on a conversation
|
|
42
|
+
- You need context about what was discussed before you joined
|
|
43
|
+
- Someone asks "what did we decide about X?" or "find the message where..."
|
|
44
|
+
- Use `order: 'asc'` for summaries (chronological), `order: 'desc'` for finding recent messages
|
|
45
|
+
|
|
46
|
+
**Sending messages** — use:
|
|
47
|
+
- `zenzap_send_message` for text messages
|
|
48
|
+
- `zenzap_send_image` for image uploads from URL or base64 data (with optional caption)
|
|
49
|
+
- Only when explicitly asked to post somewhere, or to send to a different topic than the current one.
|
|
50
|
+
|
|
51
|
+
## Mentions and response policy
|
|
52
|
+
|
|
53
|
+
Each incoming message includes two fields in the system prompt:
|
|
54
|
+
- **You were @mentioned / NOT @mentioned** — whether you were explicitly mentioned in this message
|
|
55
|
+
- **Mention policy** — whether this topic requires @mention for responses
|
|
56
|
+
|
|
57
|
+
If the topic requires @mention and you were NOT mentioned, you will be placed in **listen-only mode** (see above). You can change the mention policy at any time using `zenzap_set_mention_policy`. Use it when a user asks you to "only respond when mentioned" or "respond to everything".
|
|
58
|
+
|
|
59
|
+
## Inline member mentions
|
|
60
|
+
|
|
61
|
+
When a message contains @tags, a **Mentioned members** block is appended. Each entry tells you the person's name, what placeholder they appear as in the text, and their member ID:
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
Hey w1 can you handle this?
|
|
65
|
+
|
|
66
|
+
Mentioned members:
|
|
67
|
+
- "John Smith", referenced in text as "w1", memberId=d5ee4602-ff17-4756-a761-d7ab7d3c53b0
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
When you see an unfamiliar token in the message text (like `w1`), check the Mentioned members list — it tells you exactly who that token refers to.
|
|
71
|
+
|
|
72
|
+
Use the `memberId` directly when assigning tasks, adding/removing members from topics, or any other operation that requires a member ID — no need to call `zenzap_list_members` for someone already in the Mentioned members list.
|
|
73
|
+
|
|
74
|
+
## What you know about Zenzap
|
|
75
|
+
|
|
76
|
+
- **Topics** are group chats/channels. Each topic is an independent conversation.
|
|
77
|
+
- **Members** belong to an organization. The bot is also a member.
|
|
78
|
+
- **Tasks** live inside topics and can have assignees and due dates.
|
|
79
|
+
- You can only see and act within topics you are a member of.
|