shadok-ai 0.3.87 → 0.3.89
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/context/scheduler-skill/SKILL.md +4 -4
- package/package.json +1 -1
- package/public/echo-author.js +11 -11
- package/public/index.html +513 -534
- package/public/live-text.d.ts +5 -5
- package/public/live-text.js +27 -30
- package/public/notify.js +30 -30
- package/public/profile-card.js +39 -40
|
@@ -5,8 +5,8 @@ description: Schedule recurring prompts (monitoring, reporting, watching) for th
|
|
|
5
5
|
|
|
6
6
|
# shadok-scheduler
|
|
7
7
|
|
|
8
|
-
Turn a natural-language request like *"
|
|
9
|
-
|
|
8
|
+
Turn a natural-language request like *"watch the Google Ads budget every morning
|
|
9
|
+
and alert me when a cap is exceeded"* into a token-efficient scheduled job on
|
|
10
10
|
**this channel**.
|
|
11
11
|
|
|
12
12
|
Only works inside a shadok-ai channel — it needs `SHADOK_SESSION_ID` and
|
|
@@ -84,14 +84,14 @@ An interval (`every:30m`) is a duration, so it has no timezone.
|
|
|
84
84
|
node scripts/schedule.mjs add \
|
|
85
85
|
--schedule daily:09:00 \
|
|
86
86
|
--check "python3 $HOME/.claude/skills/google-ads/scripts/check_budget.py" \
|
|
87
|
-
--prompt "
|
|
87
|
+
--prompt "The monitoring detected a Google Ads budget anomaly. Write a clear, actionable alert for the team."
|
|
88
88
|
```
|
|
89
89
|
|
|
90
90
|
### Example — plain recurring report (runs every time)
|
|
91
91
|
|
|
92
92
|
```
|
|
93
93
|
node scripts/schedule.mjs add --schedule daily:18:00 \
|
|
94
|
-
--prompt "
|
|
94
|
+
--prompt "Review the day on the account and post a short summary."
|
|
95
95
|
```
|
|
96
96
|
|
|
97
97
|
After creating a schedule, confirm to the user in plain language: what it watches,
|
package/package.json
CHANGED
package/public/echo-author.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
// profile-card.js
|
|
1
|
+
// Who sent a prompt that came from ANOTHER client? A pure decision, hence
|
|
2
|
+
// testable without a browser — the same split as live-text.js, notify.js and
|
|
3
|
+
// profile-card.js: loaded as is by the page (ESM) and imported by the tests.
|
|
4
4
|
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
5
|
+
// The author label was frozen on "pilot (elsewhere)", which says neither who
|
|
6
|
+
// spoke nor from where. The Telegram bridge knows the sender's name; the crons
|
|
7
|
+
// know their origin. We may as well say so.
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* @param {{from?: string, origin?: string, auto?: boolean}} msg
|
|
11
|
-
* @returns {string}
|
|
10
|
+
* @param {{from?: string, origin?: string, auto?: boolean}} msg a `prompt-echo`
|
|
11
|
+
* @returns {string} the label to display above the bubble
|
|
12
12
|
*/
|
|
13
13
|
export function echoAuthor(msg) {
|
|
14
|
-
//
|
|
14
|
+
// The pace guard's resume comes from nobody: it comes from the server.
|
|
15
15
|
if (msg?.auto) return "auto-retry";
|
|
16
16
|
const from = (msg?.from ?? "").trim();
|
|
17
17
|
const origin = (msg?.origin ?? "").trim();
|
|
18
|
-
//
|
|
19
|
-
//
|
|
18
|
+
// "web" teaches nothing: another tab of the same cockpit. We only show it for
|
|
19
|
+
// want of a name, and even then through the generic wording.
|
|
20
20
|
const place = origin && origin !== "web" ? origin : "";
|
|
21
21
|
if (from) return place ? `${from} · ${place}` : from;
|
|
22
22
|
return place || "pilot (elsewhere)";
|