Skip to content

Commit dc2c192

Browse files
Dev (#1)
2 parents addc82c + 156e489 commit dc2c192

24 files changed

Lines changed: 654 additions & 138 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
node_modules
22
**/node_modules/
33
dist
4+
extensions/*/dist/
45
coverage
56
__pycache__/
67
*.pyc

README.md

Lines changed: 107 additions & 108 deletions
Large diffs are not rendered by default.

extensions/bluebubbles/package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22
"name": "@apilium/mayros-bluebubbles",
33
"version": "0.1.1",
44
"description": "Mayros BlueBubbles channel plugin",
5+
"license": "MIT",
56
"type": "module",
6-
"devDependencies": {
7-
"@apilium/mayros": "workspace:*"
7+
"publishConfig": {
8+
"access": "public"
9+
},
10+
"peerDependencies": {
11+
"@apilium/mayros": ">=0.1.0"
812
},
913
"mayros": {
1014
"extensions": [
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# @apilium/mayros-diagnostics-otel
2+
3+
Mayros diagnostics OpenTelemetry exporter -- exports traces, metrics, and logs to any OTLP-compatible backend.
4+
5+
## Installation
6+
7+
```bash
8+
mayros plugin install @apilium/mayros-diagnostics-otel
9+
```
10+
11+
## Configuration
12+
13+
Add to your `mayros.toml`:
14+
15+
```toml
16+
[diagnostics]
17+
enabled = true
18+
19+
[diagnostics.otel]
20+
enabled = true
21+
endpoint = "http://localhost:4318" # OTLP HTTP endpoint
22+
serviceName = "mayros" # service.name resource attribute
23+
protocol = "http/protobuf" # only http/protobuf is supported
24+
sampleRate = 1.0 # trace sampling ratio (0.0 - 1.0)
25+
traces = true # enable trace export
26+
metrics = true # enable metric export
27+
logs = false # enable log export (opt-in)
28+
flushIntervalMs = 5000 # export interval for metrics and logs
29+
# headers = { Authorization = "Bearer ..." }
30+
```
31+
32+
## Environment Variables
33+
34+
- `OTEL_EXPORTER_OTLP_ENDPOINT` -- fallback OTLP endpoint when `diagnostics.otel.endpoint` is not set
35+
- `OTEL_EXPORTER_OTLP_PROTOCOL` -- fallback protocol (default `http/protobuf`)
36+
- `OTEL_SERVICE_NAME` -- fallback service name (default `mayros`)
37+
38+
## Exported Telemetry
39+
40+
**Metrics:**
41+
42+
- `mayros.tokens` -- token usage by type (input, output, cache_read, cache_write, total)
43+
- `mayros.cost.usd` -- estimated model cost
44+
- `mayros.run.duration_ms` -- agent run duration
45+
- `mayros.context.tokens` -- context window size and usage
46+
- `mayros.webhook.received` / `mayros.webhook.error` / `mayros.webhook.duration_ms`
47+
- `mayros.message.queued` / `mayros.message.processed` / `mayros.message.duration_ms`
48+
- `mayros.queue.depth` / `mayros.queue.wait_ms` / `mayros.queue.lane.*`
49+
- `mayros.session.state` / `mayros.session.stuck` / `mayros.session.stuck_age_ms`
50+
- `mayros.run.attempt`
51+
52+
**Traces:** spans for model usage, webhook processing, message processing, and stuck sessions.
53+
54+
**Logs:** structured log records forwarded from the Mayros logger (when `logs = true`).
55+
56+
## License
57+
58+
MIT -- Apilium Technologies

extensions/diagnostics-otel/package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
"name": "@apilium/mayros-diagnostics-otel",
33
"version": "0.1.1",
44
"description": "Mayros diagnostics OpenTelemetry exporter",
5+
"license": "MIT",
56
"type": "module",
7+
"publishConfig": {
8+
"access": "public"
9+
},
610
"dependencies": {
711
"@opentelemetry/api": "^1.9.0",
812
"@opentelemetry/api-logs": "^0.212.0",
@@ -16,8 +20,8 @@
1620
"@opentelemetry/sdk-trace-base": "^2.5.1",
1721
"@opentelemetry/semantic-conventions": "^1.39.0"
1822
},
19-
"devDependencies": {
20-
"@apilium/mayros": "workspace:*"
23+
"peerDependencies": {
24+
"@apilium/mayros": ">=0.1.0"
2125
},
2226
"mayros": {
2327
"extensions": [

extensions/discord/README.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# @apilium/mayros-discord
2+
3+
Mayros Discord channel plugin -- connect your Mayros agent to Discord as a bot.
4+
5+
## Installation
6+
7+
```bash
8+
mayros plugin install @apilium/mayros-discord
9+
```
10+
11+
## Configuration
12+
13+
Add to your `mayros.toml`:
14+
15+
```toml
16+
[channels.discord]
17+
enabled = true
18+
# token = "your-bot-token" # or use DISCORD_BOT_TOKEN env var
19+
20+
# DM security
21+
# dmPolicy = "pairing" # "open" | "pairing" | "allowlist"
22+
# allowFrom = [] # user IDs allowed to DM
23+
24+
# Group/guild settings
25+
# groupPolicy = "open" # "open" | "allowlist" | "disabled"
26+
# replyToMode = "off" # "off" | "first" | "all"
27+
# mediaMaxMb = 25
28+
# historyLimit = 50
29+
30+
# Multi-account support
31+
# [channels.discord.accounts.secondary]
32+
# token = "another-bot-token"
33+
# enabled = true
34+
```
35+
36+
## Required Environment Variables
37+
38+
- `DISCORD_BOT_TOKEN` -- bot token (used for the default account when not set in config)
39+
40+
## Features
41+
42+
- Direct messages, channel messages, and thread support
43+
- Media attachments (images, files)
44+
- Polls and reactions
45+
- Interactive components (buttons, selects, modals/forms)
46+
- Multi-account support with per-account configuration
47+
- Guild/channel allowlists for granular access control
48+
- Subagent hooks for multi-agent workflows
49+
- Configurable mention requirements per guild/channel
50+
51+
## License
52+
53+
MIT -- Apilium Technologies

extensions/discord/package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22
"name": "@apilium/mayros-discord",
33
"version": "0.1.1",
44
"description": "Mayros Discord channel plugin",
5+
"license": "MIT",
56
"type": "module",
6-
"devDependencies": {
7-
"@apilium/mayros": "workspace:*"
7+
"publishConfig": {
8+
"access": "public"
9+
},
10+
"peerDependencies": {
11+
"@apilium/mayros": ">=0.1.0"
812
},
913
"mayros": {
1014
"extensions": [

extensions/feishu/README.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# @apilium/mayros-feishu
2+
3+
Mayros Feishu/Lark channel plugin -- connect your Mayros agent to Feishu or Lark enterprise messaging.
4+
5+
Community maintained by [@m1heng](https://github.com/m1heng).
6+
7+
## Installation
8+
9+
```bash
10+
mayros plugin install @apilium/mayros-feishu
11+
```
12+
13+
## Configuration
14+
15+
Add to your `mayros.toml`:
16+
17+
```toml
18+
[channels.feishu]
19+
enabled = true
20+
appId = "cli_xxxx"
21+
appSecret = "your-app-secret"
22+
# encryptKey = "" # event subscription encrypt key
23+
# verificationToken = "" # event subscription verification token
24+
# domain = "feishu" # "feishu" | "lark" | custom https:// URL
25+
# connectionMode = "websocket" # "websocket" | "webhook"
26+
27+
# Webhook mode settings (ignored in websocket mode)
28+
# webhookPath = "/feishu/webhook"
29+
# webhookHost = "0.0.0.0"
30+
# webhookPort = 3000
31+
32+
# DM security
33+
# dmPolicy = "pairing" # "open" | "pairing" | "allowlist"
34+
# allowFrom = []
35+
36+
# Group settings
37+
# groupPolicy = "allowlist" # "open" | "allowlist" | "disabled"
38+
# groupAllowFrom = []
39+
# requireMention = true
40+
# historyLimit = 50
41+
# mediaMaxMb = 25
42+
# renderMode = "auto" # "auto" | "raw" | "card"
43+
44+
# Multi-account support
45+
# [channels.feishu.accounts.secondary]
46+
# appId = "cli_yyyy"
47+
# appSecret = "another-secret"
48+
```
49+
50+
## Environment Variables
51+
52+
- `FEISHU_APP_ID` -- fallback app ID (onboarding only)
53+
- `FEISHU_APP_SECRET` -- fallback app secret (onboarding only)
54+
55+
## Features
56+
57+
- Direct messages and group chat support
58+
- WebSocket and webhook connection modes
59+
- Interactive cards for rich messages
60+
- Media attachments (images, files)
61+
- Reactions and message editing
62+
- Integrated tools: Docs, Wiki, Drive, Bitable, and Permissions
63+
- Multi-account support
64+
- Feishu and Lark (international) domain support
65+
66+
## License
67+
68+
MIT -- Apilium Technologies

extensions/feishu/package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,18 @@
22
"name": "@apilium/mayros-feishu",
33
"version": "0.1.1",
44
"description": "Mayros Feishu/Lark channel plugin (community maintained by @m1heng)",
5+
"license": "MIT",
56
"type": "module",
7+
"publishConfig": {
8+
"access": "public"
9+
},
610
"dependencies": {
711
"@larksuiteoapi/node-sdk": "^1.59.0",
812
"@sinclair/typebox": "0.34.48",
913
"zod": "^4.3.6"
1014
},
11-
"devDependencies": {
12-
"@apilium/mayros": "workspace:*"
15+
"peerDependencies": {
16+
"@apilium/mayros": ">=0.1.0"
1317
},
1418
"mayros": {
1519
"extensions": [

extensions/irc/README.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# @apilium/mayros-irc
2+
3+
Mayros IRC channel plugin -- connect your Mayros agent to IRC networks.
4+
5+
## Installation
6+
7+
```bash
8+
mayros plugin install @apilium/mayros-irc
9+
```
10+
11+
## Configuration
12+
13+
Add to your `mayros.toml`:
14+
15+
```toml
16+
[channels.irc]
17+
enabled = true
18+
host = "irc.libera.chat"
19+
port = 6697
20+
tls = true
21+
nick = "mayros-bot"
22+
# username = "mayros"
23+
# realname = "Mayros Bot"
24+
# password = "server-password"
25+
# passwordFile = "/path/to/password"
26+
# channels = ["#mychannel"]
27+
28+
# DM security
29+
# dmPolicy = "pairing" # "open" | "pairing" | "allowlist"
30+
# allowFrom = []
31+
32+
# Group settings
33+
# groupPolicy = "allowlist" # "open" | "allowlist" | "disabled"
34+
# groupAllowFrom = []
35+
# historyLimit = 50
36+
# textChunkLimit = 350
37+
# mediaMaxMb = 10
38+
39+
# NickServ authentication
40+
# [channels.irc.nickserv]
41+
# enabled = true
42+
# password = "nickserv-password"
43+
# passwordFile = "/path/to/ns-password"
44+
# register = false
45+
# registerEmail = "bot@example.com"
46+
47+
# Per-channel overrides
48+
# [channels.irc.groups."#mychannel"]
49+
# requireMention = true
50+
# enabled = true
51+
52+
# Multi-account support
53+
# [channels.irc.accounts.secondary]
54+
# host = "irc.oftc.net"
55+
# nick = "mayros-alt"
56+
```
57+
58+
## Environment Variables
59+
60+
- `IRC_HOST` -- server hostname (default account)
61+
- `IRC_PORT` -- server port (default account)
62+
- `IRC_TLS` -- enable TLS (`true`/`false`, default account)
63+
- `IRC_NICK` -- bot nickname (default account)
64+
- `IRC_USERNAME` -- IRC username (default account)
65+
- `IRC_REALNAME` -- IRC real name (default account)
66+
- `IRC_PASSWORD` -- server password (default account)
67+
- `IRC_CHANNELS` -- comma-separated channel list (default account)
68+
- `IRC_NICKSERV_PASSWORD` -- NickServ password (default account)
69+
- `IRC_NICKSERV_REGISTER_EMAIL` -- NickServ registration email (default account)
70+
71+
## Features
72+
73+
- Direct messages and channel support
74+
- TLS/SSL connections
75+
- NickServ authentication and registration
76+
- Per-channel access control and mention requirements
77+
- Multi-account support for connecting to multiple networks
78+
- Media attachments via URL
79+
- Configurable message chunking for long responses
80+
81+
## License
82+
83+
MIT -- Apilium Technologies

0 commit comments

Comments
 (0)