dingtalk-pingo 0.0.0-stage → 0.2.0
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/README.md +335 -2
- package/dist/pingo.js +9506 -0
- package/package.json +36 -4
- package/skills/pingo/SKILL.md +130 -0
- package/skills/pingo-follow/SKILL.md +132 -0
package/package.json
CHANGED
|
@@ -1,6 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dingtalk-pingo",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Send text and Markdown messages from your terminal, scripts, or AI coding agents to your phone through a DingTalk robot.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"dingtalk",
|
|
7
|
+
"notification",
|
|
8
|
+
"cli",
|
|
9
|
+
"robot",
|
|
10
|
+
"markdown",
|
|
11
|
+
"ai-agent"
|
|
12
|
+
],
|
|
13
|
+
"type": "module",
|
|
14
|
+
"bin": {
|
|
15
|
+
"pingo": "dist/pingo.js"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist/pingo.js",
|
|
19
|
+
"skills/",
|
|
20
|
+
"README.md"
|
|
21
|
+
],
|
|
22
|
+
"engines": {
|
|
23
|
+
"node": ">=18"
|
|
24
|
+
},
|
|
25
|
+
"scripts": {
|
|
26
|
+
"test": "node --test \"tests/**/*.test.ts\"",
|
|
27
|
+
"typecheck": "tsc --noEmit",
|
|
28
|
+
"build": "node scripts/build.mjs",
|
|
29
|
+
"check:dist": "node scripts/build.mjs --check",
|
|
30
|
+
"prepublishOnly": "npm run typecheck && npm test && npm run check:dist"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@types/node": "26.6.6",
|
|
34
|
+
"esbuild": "0.28.2",
|
|
35
|
+
"typescript": "7.0.2",
|
|
36
|
+
"yaml": "2.9.1"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pingo
|
|
3
|
+
description: Send a text, Markdown report, or screenshot from this session to the user's phone via DingTalk, using the `pingo` CLI. Use when the user explicitly asks to send/notify/report something "via Pingo" or "to DingTalk" (e.g. "send me this via pingo", "notify me on DingTalk when done", "pingo this screenshot"). Do not use for routine progress updates, successful tool calls, or when the user has not asked for a notification.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Pingo — send a message to the user's phone via DingTalk
|
|
7
|
+
|
|
8
|
+
`pingo` is a local CLI. It sends one message per invocation to the
|
|
9
|
+
user's phone through their own DingTalk robot, then exits. It does not
|
|
10
|
+
run in the background and it does not receive messages.
|
|
11
|
+
|
|
12
|
+
## When to use this skill
|
|
13
|
+
|
|
14
|
+
Only when the user explicitly asks for it: phrases like "send me this
|
|
15
|
+
via pingo", "notify me on DingTalk", "pingo this", "text me when done".
|
|
16
|
+
|
|
17
|
+
Do not use this skill on your own initiative. A request to "summarize
|
|
18
|
+
this" or "let me know the status" is not, by itself, a request to send
|
|
19
|
+
a DingTalk notification — only act on an explicit ask for one.
|
|
20
|
+
|
|
21
|
+
For ongoing, rule-based notifications across a whole session (only
|
|
22
|
+
notifying on major milestones, blockers, or approvals), use the
|
|
23
|
+
`pingo-follow` skill instead. This skill is for one-off sends.
|
|
24
|
+
|
|
25
|
+
## How to send
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
pingo send --type <success|warning|error|info> --message "..."
|
|
29
|
+
pingo send --type success --title "Deploy finished" --message "Build and tests passed" \
|
|
30
|
+
--agent kiro --project payment-sdk
|
|
31
|
+
pingo send --type warning --action-required --message "Please review the token permission change"
|
|
32
|
+
pingo send --markdown ./report.md --type success # body comes from a Markdown file
|
|
33
|
+
pingo send --message "x" --json # machine-readable result
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
- `--type` picks the icon/semantics: `success`, `warning`, `error`, `info`.
|
|
37
|
+
- `--action-required` marks a message as needing the user's decision —
|
|
38
|
+
use it together with `warning` when you need the user to approve or
|
|
39
|
+
decide something, not for routine failures.
|
|
40
|
+
- `--agent`, `--project`, `--task` are optional context fields shown in
|
|
41
|
+
the message body.
|
|
42
|
+
- Prefer `--markdown` for structured reports (multi-step summaries, test
|
|
43
|
+
results); use `--message` for short one-line updates.
|
|
44
|
+
|
|
45
|
+
## Three usage patterns
|
|
46
|
+
|
|
47
|
+
1. **Send now.** The user asks for an immediate message (e.g. a
|
|
48
|
+
screenshot or a quick status). Send it right away and report the
|
|
49
|
+
result.
|
|
50
|
+
2. **Send once when the current task finishes.** The user asks to be
|
|
51
|
+
notified "when done". This is a one-time promise scoped to the
|
|
52
|
+
current session, not a persistent background job: if you exit or your
|
|
53
|
+
context is reset before the task finishes, the message will not be
|
|
54
|
+
sent. Say so if asked whether this is guaranteed.
|
|
55
|
+
3. **Report failure honestly.** If sending fails, say so — never claim a
|
|
56
|
+
message was sent when it was not.
|
|
57
|
+
|
|
58
|
+
## Content limits (measured against the live DingTalk API)
|
|
59
|
+
|
|
60
|
+
- Markdown does **not** support tables or task-list checkbox syntax.
|
|
61
|
+
Use plain bullet or numbered lists instead.
|
|
62
|
+
- There is a local limit of roughly 8000 bytes per message; keep content
|
|
63
|
+
short and actionable for a phone screen rather than relying on the CLI
|
|
64
|
+
to split it.
|
|
65
|
+
- Never put secrets, access tokens, card numbers, or long raw logs in a
|
|
66
|
+
message body.
|
|
67
|
+
|
|
68
|
+
## Screenshots, images and videos
|
|
69
|
+
|
|
70
|
+
`pingo` can attach local images and one mp4 video to a message:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
pingo send --title "Checkout page" --message "Current layout after the fix" --image ./shot.png
|
|
74
|
+
pingo send --message "Repro recording" --video ./repro.mp4 [--cover ./frame.jpg]
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
- `--image` accepts png / jpg / gif / bmp, up to 5 images, each up to 10 MiB.
|
|
78
|
+
The file content must match its extension.
|
|
79
|
+
- `--video` accepts one `.mp4` up to 19 MiB. It is sent as a separate video
|
|
80
|
+
message right after the main message. Without `--cover`, Pingo grabs a frame
|
|
81
|
+
with `ffmpeg` if it is installed, otherwise it generates a plain cover.
|
|
82
|
+
- `--image` and `--video` do not replace the text: always pass `--message` or
|
|
83
|
+
`--markdown` with a short explanation.
|
|
84
|
+
|
|
85
|
+
To send a screenshot: capture it with whatever tooling you already have, save
|
|
86
|
+
it to a file, then pass the file with `--image`.
|
|
87
|
+
|
|
88
|
+
**Before sending any screenshot or recording, check it for sensitive
|
|
89
|
+
content** — secrets, access tokens, passwords, customer data, private
|
|
90
|
+
messages, or anything else visible on screen that should not leave the
|
|
91
|
+
machine. A screenshot can capture far more than intended. If you are not
|
|
92
|
+
sure it is safe, ask the user first instead of sending it.
|
|
93
|
+
|
|
94
|
+
## Links and cards
|
|
95
|
+
|
|
96
|
+
- Add buttons with `--link "Text=https://..."` (up to 3, http(s) only), for
|
|
97
|
+
example a PR, a CI log or a deployment URL.
|
|
98
|
+
- If the user's config has a card template (`card.templateId`), messages are
|
|
99
|
+
sent as cards automatically: the sender (machine, agent, project) is shown at
|
|
100
|
+
the top. You do not need to choose a format; if the card is rejected, Pingo
|
|
101
|
+
falls back to Markdown on its own and says so in its output.
|
|
102
|
+
- Card-only extras: `--date "<text>"` sets the card's time line, and
|
|
103
|
+
`--chart <file.json>` adds a chart (`type` is `lineChart`, `histogram` or
|
|
104
|
+
`pieChart`; `data` is a non-empty array). Both only work with cards, not
|
|
105
|
+
Markdown/text.
|
|
106
|
+
- For tabular data, put a Markdown table in `--message` or `--markdown`
|
|
107
|
+
(`| a | b |` rows with a `| :- | -: |` separator row).
|
|
108
|
+
- `pingo send --json` returns a `cardId` for card messages. One-off sends do not
|
|
109
|
+
need it; `pingo-follow` uses it to update a card in place.
|
|
110
|
+
|
|
111
|
+
## Handling failures
|
|
112
|
+
|
|
113
|
+
- A non-zero exit code means the message was not confirmed sent.
|
|
114
|
+
Report the exit code and the CLI's error message to the user; never
|
|
115
|
+
claim success on failure.
|
|
116
|
+
- Exit code `6` means the result is unknown — the message **may have
|
|
117
|
+
already been sent**. Do not retry; tell the user to check their phone
|
|
118
|
+
instead.
|
|
119
|
+
- A send with images or a video can be partly delivered: the output (and
|
|
120
|
+
`--json` `sent` / `failed`) lists what went out and what did not. Do not
|
|
121
|
+
resend the parts that were already sent; tell the user what is missing.
|
|
122
|
+
- If sending keeps failing, suggest the user run `pingo doctor` to check
|
|
123
|
+
configuration, permissions, and whether a token can be obtained.
|
|
124
|
+
|
|
125
|
+
## What this skill does not do
|
|
126
|
+
|
|
127
|
+
- It does not keep monitoring the task after a one-off send completes.
|
|
128
|
+
- It does not decide on its own what counts as "important" — that
|
|
129
|
+
judgment belongs to `pingo-follow`, and only after the user opts in.
|
|
130
|
+
- Installing this skill does not grant permission to notify proactively.
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pingo-follow
|
|
3
|
+
description: Enable or disable proactive DingTalk notifications for the current session only, sent via the `pingo` CLI at major milestones, blockers, or when human approval is needed. Use only when the user explicitly asks to "follow" this session, enable Pingo follow-up, or stop such notifications (e.g. "/pingo-follow", "follow this task and notify me when done", "/pingo-follow off"). Never activate proactive notifications on your own.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Pingo Follow — session-scoped proactive notifications
|
|
7
|
+
|
|
8
|
+
This skill makes an agent proactively send DingTalk messages (via the
|
|
9
|
+
`pingo` CLI) at significant points during the *current session only* —
|
|
10
|
+
but only after the user explicitly opts in. There is no persistent
|
|
11
|
+
state file: "follow" is a rule you hold in your own context for this
|
|
12
|
+
conversation, nothing more.
|
|
13
|
+
|
|
14
|
+
## Activation
|
|
15
|
+
|
|
16
|
+
Invoke this skill only on an explicit request. Typical phrasing:
|
|
17
|
+
`/pingo-follow`, `/pingo-follow only notify me when you need my review
|
|
18
|
+
or the task is finished`, or in hosts that use `$`-mentions,
|
|
19
|
+
`$pingo-follow`. To turn it off: `/pingo-follow off` or an equivalent
|
|
20
|
+
explicit request (exact slash-command support varies by host — confirm
|
|
21
|
+
the working syntax for the current tool if unsure).
|
|
22
|
+
|
|
23
|
+
**Never turn this on by yourself.** A user saying "let me know when
|
|
24
|
+
it's done" in passing is a request for the `pingo` skill's one-off
|
|
25
|
+
"send once when finished" pattern, not a request for ongoing
|
|
26
|
+
session-wide monitoring — only treat it as `pingo-follow` activation
|
|
27
|
+
when the user names following/monitoring the session explicitly.
|
|
28
|
+
|
|
29
|
+
When you turn follow on: confirm the rules you will use in the chat
|
|
30
|
+
only. Activating follow does not send a DingTalk message — the first
|
|
31
|
+
message is the one earned by an actual event.
|
|
32
|
+
Calling this skill again while already active updates the rules for
|
|
33
|
+
this session; it does not restart or duplicate anything.
|
|
34
|
+
|
|
35
|
+
## Default notification rules
|
|
36
|
+
|
|
37
|
+
Notify (via `pingo send`) when:
|
|
38
|
+
|
|
39
|
+
- The task reaches a final, substantive conclusion → `success`.
|
|
40
|
+
- A major milestone with real delivery value is reached → `success` or
|
|
41
|
+
`info`.
|
|
42
|
+
- A major error makes the task unable to continue, or there is a
|
|
43
|
+
significant security/compatibility risk → `error` / `warning`.
|
|
44
|
+
- The user must make a decision, approve something, or grant
|
|
45
|
+
authorization before you can continue → `warning` with
|
|
46
|
+
`--action-required`.
|
|
47
|
+
|
|
48
|
+
Stay silent for:
|
|
49
|
+
|
|
50
|
+
- Routine file edits, ordinary tool calls, normal progress updates.
|
|
51
|
+
- Test failures or errors you can diagnose and fix yourself without
|
|
52
|
+
user input.
|
|
53
|
+
|
|
54
|
+
## Custom rules take priority
|
|
55
|
+
|
|
56
|
+
- "Only notify me for A or B" is a **strict allowlist** — it replaces
|
|
57
|
+
the default rules above; nothing else gets notified unless the user
|
|
58
|
+
says so.
|
|
59
|
+
- "Pay extra attention to A" raises A's priority on top of the default
|
|
60
|
+
rules; it does not remove the defaults.
|
|
61
|
+
- If a custom rule is ambiguous, ask the user in this conversation
|
|
62
|
+
before acting on it — never widen the scope of notifications on your
|
|
63
|
+
own guess.
|
|
64
|
+
|
|
65
|
+
## Judgment checklist
|
|
66
|
+
|
|
67
|
+
Before sending, ask:
|
|
68
|
+
|
|
69
|
+
1. Does this affect whether the main goal can continue?
|
|
70
|
+
2. Does the user need to make an explicit decision here?
|
|
71
|
+
3. Is this an agreed, key delivery milestone?
|
|
72
|
+
4. Is there a major security, compatibility, data, or release risk?
|
|
73
|
+
5. Does this match a condition the user specified for this session?
|
|
74
|
+
|
|
75
|
+
## Anti-spam and deduplication
|
|
76
|
+
|
|
77
|
+
- Do not send a new message for the same root cause twice.
|
|
78
|
+
- Do not message on every tool call or every conversation turn.
|
|
79
|
+
- Merge multiple minor, same-category updates into one message instead
|
|
80
|
+
of sending several.
|
|
81
|
+
- Do not let a general "avoid repeat notifications" habit suppress a
|
|
82
|
+
genuinely new request for human approval — those always go through.
|
|
83
|
+
|
|
84
|
+
## One card per followed task
|
|
85
|
+
|
|
86
|
+
When the user's Pingo config sends cards, keep a followed task to a single
|
|
87
|
+
card where it makes sense:
|
|
88
|
+
|
|
89
|
+
1. The first time something is worth notifying, send it with
|
|
90
|
+
`pingo send --json ...` and keep the returned `cardId` in this
|
|
91
|
+
conversation (never write it to a file).
|
|
92
|
+
2. For later progress milestones of the same task, update that card in place
|
|
93
|
+
instead of sending another message:
|
|
94
|
+
`pingo update <cardId> --type info --title "Tests passing" --message "..."`.
|
|
95
|
+
`--message` / `--markdown` replace the whole body, so pass the full text.
|
|
96
|
+
3. **Always send a new message** (not an update) when the user's approval or
|
|
97
|
+
decision is needed (`--action-required`) and for the final completion
|
|
98
|
+
report — these must reach the user's phone as a fresh notification.
|
|
99
|
+
4. If `pingo send --json` returned no `cardId` (the message fell back to
|
|
100
|
+
Markdown or text), keep sending new messages as usual.
|
|
101
|
+
5. If `pingo update` fails, report it; do not silently send a duplicate.
|
|
102
|
+
|
|
103
|
+
## Turning it off and session boundaries
|
|
104
|
+
|
|
105
|
+
- Turning follow off stops proactive notifications for the current
|
|
106
|
+
session only; it never affects other sessions.
|
|
107
|
+
- When the task being followed completes, send one final summary
|
|
108
|
+
message and consider follow finished for that task — re-enable it
|
|
109
|
+
explicitly for a new task.
|
|
110
|
+
- A new session always starts with follow off by default. If you
|
|
111
|
+
cannot reliably confirm whether follow was left on (e.g. after a
|
|
112
|
+
context compaction or restart), default to off rather than guessing
|
|
113
|
+
it is still active.
|
|
114
|
+
- Never write a "follow is enabled" marker into a global rules/config
|
|
115
|
+
file such as `AGENTS.md`. This is session-scoped, in-context state
|
|
116
|
+
only — nothing is persisted to disk by this skill.
|
|
117
|
+
|
|
118
|
+
## Follow is not an automatic approval
|
|
119
|
+
|
|
120
|
+
Enabling follow only means you notify at the right moments — it does
|
|
121
|
+
not expand your authority. Deployments, data deletion, permission
|
|
122
|
+
changes, or security/payment-sensitive design changes still go through
|
|
123
|
+
whatever approval process already applies. Send the notification, then
|
|
124
|
+
wait for the user to act from their terminal; do not proceed on their
|
|
125
|
+
behalf just because you reported it.
|
|
126
|
+
|
|
127
|
+
## Known limitations
|
|
128
|
+
|
|
129
|
+
Follow state lives only in this conversation's context. It is not
|
|
130
|
+
guaranteed to survive a context compaction, an agent crash, a
|
|
131
|
+
disconnected session, or a host that does not reliably support slash
|
|
132
|
+
commands — delivery is best-effort, not guaranteed, in this version.
|