Extended mobile / enterprise messaging agent skills (Teams + WhatsApp Official + WeCom) for Concinno — httpx REST wrappers, zero new runtime deps.
Project description
concinno-skills-mobile-ext
Extended enterprise-messaging agent skills for
Concinno. Complements the sibling
concinno-skills-mobile (Twilio SMS / Voice / WhatsApp) by adding three
channels Twilio does not natively cover: Microsoft Teams,
WhatsApp Business Cloud API (direct Meta, no Twilio), and WeCom
(企业微信).
All three tools are thin httpx REST wrappers — zero new runtime
dependencies beyond Concinno itself.
Status
MVP (0.1.0) — three one-shot tools:
| Tool class | Platform | Transport | Licence |
|---|---|---|---|
TeamsSend |
MS Teams | Microsoft Graph v1.0 | Apache-2.0 |
WhatsAppOfficial |
WhatsApp (Meta) | Graph v21.0 Cloud API | Apache-2.0 |
WeComSend |
WeCom / 企业微信 | qyapi.weixin.qq.com |
Apache-2.0 |
Install
pip install concinno-skills-mobile-ext
Credentials
Each platform's credentials live under well-known keys in the Concinno
CredentialStore, which reads (in order):
- Process runtime overrides via
CredentialStore.set(...). - Env var
CONCINNO_CRED_<UPPER_KEY>. ~/.concinno/credentials.json.
Microsoft Teams
| Key | Env var |
|---|---|
teams_access_token |
CONCINNO_CRED_TEAMS_ACCESS_TOKEN |
Bring your own Azure AD OAuth Bearer token (e.g. produced via msal or
a manual consent flow). This package never opens a browser.
WhatsApp Business Cloud API (Meta)
| Key | Env var |
|---|---|
whatsapp_access_token |
CONCINNO_CRED_WHATSAPP_ACCESS_TOKEN |
whatsapp_phone_number_id |
CONCINNO_CRED_WHATSAPP_PHONE_NUMBER_ID |
Both values come from the Meta Business Suite / App dashboard.
WeCom (企业微信)
Two supported shapes — group-bot webhook (simplest) is tried first:
| Key | Env var |
|---|---|
wecom_webhook_url |
CONCINNO_CRED_WECOM_WEBHOOK_URL |
…or app-mode credentials:
| Key | Env var |
|---|---|
wecom_corp_id |
CONCINNO_CRED_WECOM_CORP_ID |
wecom_corp_secret |
CONCINNO_CRED_WECOM_CORP_SECRET |
wecom_agent_id |
CONCINNO_CRED_WECOM_AGENT_ID |
Example ~/.concinno/credentials.json:
{
"teams_access_token": "eyJ0eXAiOi…",
"whatsapp_access_token": "EAAB…",
"whatsapp_phone_number_id": "1234567890",
"wecom_webhook_url": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=abcd-1234"
}
If a required token is missing the tool returns
{"error": "no <service> credentials — set via CredentialStore / env"}
rather than crashing.
Usage via Concinno ToolRegistry
When the consumer sets CONCINNO_LOAD_PLUGINS=1, the default registry
auto-mounts every tool:
import os
os.environ["CONCINNO_LOAD_PLUGINS"] = "1"
from concinno.tools.registry import get_default_registry
reg = get_default_registry()
assert {"TeamsSend", "WhatsAppOfficial", "WeComSend"} <= set(
reg.list_deferred()
)
teams = reg.get("TeamsSend")
teams.call(
action="send",
chat_id="19:2da4c29f6d7041eca70b638b43d45437@thread.v2",
content="Deploy succeeded",
content_type="text",
)
Direct Python usage
from concinno_skills_mobile_ext import (
TeamsSend,
WhatsAppOfficial,
WeComSend,
)
TeamsSend().call(
action="send",
chat_id="19:abc@thread.v2",
content="<b>Deploy</b> succeeded",
content_type="html",
)
WhatsAppOfficial().call(
action="send",
to="+15551234567",
body="Your verification code is 123456",
)
WeComSend().call(
action="send_webhook",
content="CI pipeline green on main",
mentioned_list=["@all"],
)
WeComSend().call(
action="send_app",
content="Private alert",
user_ids=["alice", "bob"],
)
All tools return {"ok": True, ...} or a structured payload on success,
or {"error": "..."} on failure — same shape as the other Concinno
built-in tools. No exceptions escape the call() surface.
Concurrency
All three tools set is_concurrency_safe = False:
- Teams — per-app/user Graph throttling and conversational ordering.
- WhatsApp — per-phone-number Meta rate limits + 24-hour conversation window semantics.
- WeCom — shared access-token cache in app mode; per-bot rate limits in webhook mode.
The Concinno scheduler honours this automatically.
Safety caps
- Teams
content≤ 28 000 chars (text or HTML). - WhatsApp
body≤ 4 096 chars (Meta text message cap). - WeCom
content≤ 2 048 bytes UTF-8 (WeCom cap; CJK text is counted at 3 bytes/char).
API pins
- Microsoft Graph:
v1.0(POST /chats/{id}/messages). - Meta WhatsApp Cloud API:
v21.0(POST /{ver}/{phone_number_id}/messages). - WeCom:
- App —
POST /cgi-bin/message/send?access_token=…(access token obtained viaGET /cgi-bin/gettoken, cached 7200 s with a 60 s refresh slack). - Webhook —
POST /cgi-bin/webhook/send?key=….
- App —
Any version bump must call out the full regression-test matrix in
RELEASE_COORDINATION.md.
License
Apache-2.0. See LICENSE in the Concinno monorepo.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file concinno_skills_mobile_ext-0.1.0.tar.gz.
File metadata
- Download URL: concinno_skills_mobile_ext-0.1.0.tar.gz
- Upload date:
- Size: 43.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85e7f2606567bd1e77e1fa54ca485a2fea2d36fd2f9a54013196c4e5070cbf89
|
|
| MD5 |
00b0364f594429a7915ae74ec0edc335
|
|
| BLAKE2b-256 |
f6f0a7714034611dc8868af1d12b20dbf0486a5ecb55be1b3d67414f744ee3f8
|
File details
Details for the file concinno_skills_mobile_ext-0.1.0-py3-none-any.whl.
File metadata
- Download URL: concinno_skills_mobile_ext-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
342e9da73c54d13beefa7e9c53900f449ae92209459542481d1157eb6d0c2399
|
|
| MD5 |
fb5ccfe0cd4a69430a3523391a6d4a31
|
|
| BLAKE2b-256 |
f6c7527cbb792fab5b61a5c3b66e7feab80f746218f4f7913bf2cccce1da5d03
|