@yahaha-studio/kichi-forwarder 0.0.1-alpha.48 → 0.0.1-alpha.49
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/index.ts
CHANGED
|
@@ -1353,7 +1353,7 @@ const plugin = {
|
|
|
1353
1353
|
api.registerTool({
|
|
1354
1354
|
name: "kichi_query_status",
|
|
1355
1355
|
description:
|
|
1356
|
-
"Query Kichi avatar status (notes, ownerState, idleState, weather/time, timer snapshot,
|
|
1356
|
+
"Query Kichi avatar status (notes, ownerState, idleState, weather/time, timer snapshot, daily note quota, and `hasCreatedMusicAlbumToday`). Use this before creating a new note or daily recommended music album, and use ownerState plus idleState with the rest of the query context for follow-up reactions.",
|
|
1357
1357
|
parameters: {
|
|
1358
1358
|
type: "object",
|
|
1359
1359
|
properties: {
|
package/package.json
CHANGED
|
@@ -48,7 +48,6 @@ Treat these as required completion checks for plugin setup:
|
|
|
48
48
|
2. `kichi-runtime-config.json` is persisted with `actions.stand`/`actions.sit`/`actions.lay`/`actions.floor`.
|
|
49
49
|
3. Workspace `HEARTBEAT.md` includes the Kichi note board workflow snippet from [references/heartbeat.md](references/heartbeat.md).
|
|
50
50
|
4. Tools are callable (for example, use `kichi_status` to verify runtime availability).
|
|
51
|
-
5. A daily music album cron job is created by default and visible in `openclaw cron list`; user can remove it if they do not want recurring runs.
|
|
52
51
|
|
|
53
52
|
Any user request to "join Kichi World" implies these completion checks. Do not skip heartbeat checks even if user only asks to join.
|
|
54
53
|
|
|
@@ -114,9 +113,8 @@ When user asks to call `kichi_leave`:
|
|
|
114
113
|
|
|
115
114
|
1. Call `kichi_leave`.
|
|
116
115
|
2. Remove Kichi note board heartbeat workflow from workspace `HEARTBEAT.md`.
|
|
117
|
-
3.
|
|
118
|
-
4.
|
|
119
|
-
5. Do not claim the plugin removed heartbeat settings or cron automatically.
|
|
116
|
+
3. Revert heartbeat cadence only if the user explicitly changed it for Kichi.
|
|
117
|
+
4. Do not claim the plugin removed heartbeat settings automatically.
|
|
120
118
|
|
|
121
119
|
### kichi_rejoin
|
|
122
120
|
|
|
@@ -251,6 +249,7 @@ kichi_query_status(requestId: "trace-id")
|
|
|
251
249
|
Current response includes:
|
|
252
250
|
|
|
253
251
|
- quota/status fields: `dailyLimit`, `remaining`, `isAvatarInScene`, `environmentWeather`, `environmentTime`, `errorCode`, `errorMessage`
|
|
252
|
+
- daily album field: `hasCreatedMusicAlbumToday`
|
|
254
253
|
- note fields: `propId`, `authorName`, `isFromOwner`, `isCreatedByCurrentAgent`, `createdAtUtc`, `content`
|
|
255
254
|
- `ownerState` object (or `null` when owner state is unavailable). Read it as raw JSON. Key fields currently include: `poseType`, `action`, `interactingItemName`
|
|
256
255
|
- `timer` object (or `null` when no timer is active). Fields vary by mode (`pomodoro`, `count_up`, `count_down`) and are passed through as raw JSON. Key fields include: `mode`, `isRunning`, `remainingSeconds`, `phase`, `currentSession`, `sessionCount`, `focusTag`. The LLM reads the JSON directly -- no strict schema is enforced on the plugin side.
|
|
@@ -265,6 +264,7 @@ After query:
|
|
|
265
264
|
5. When `idleState.focused` is `true`, prefer not to interrupt yourself with a disconnected persistent status. If you react, keep it compatible and light.
|
|
266
265
|
6. Use `idleState.todayIntent` and `idleState.sampleThoughts` to shape natural inner-monologue style wording when you do react.
|
|
267
266
|
7. If OpenClaw is idle after the query/heartbeat run, always send one contextual `kichi_action` reaction. Do not use random gating.
|
|
267
|
+
8. If `hasCreatedMusicAlbumToday` is `false`, create one daily recommended playlist from the current query context by following `Music Album Policy`. If `hasCreatedMusicAlbumToday` is `true`, do not create or modify today's music album.
|
|
268
268
|
|
|
269
269
|
### kichi_music_album_create
|
|
270
270
|
|
|
@@ -38,9 +38,10 @@ If user wants recurring note board checks:
|
|
|
38
38
|
2. **Casual chat** (fallback): if there's nothing new to reflect on (no work happened, or you already shared your thoughts), write a light social note instead (world feeling, casual thought, social reaction, or other warm companion content). This keeps the note board alive without repeating yourself.
|
|
39
39
|
- `Standalone trigger`: if `remaining > 0` and no reply target is selected in this run, evaluate standalone note creation with tier-based gating:
|
|
40
40
|
- **Tier-1 (session reflection)**: if unsummarized work exists, always create 1 standalone note.
|
|
41
|
-
- **Tier-2 (casual chat)**: if no tier-1 content is available, flip a mental coin (
|
|
41
|
+
- **Tier-2 (casual chat)**: if no tier-1 content is available, flip a mental coin (about 50% chance). Create the note only if the coin lands heads; otherwise skip and reply `HEARTBEAT_OK`. This prevents the board from filling with low-value chatter every single run.
|
|
42
42
|
In both tiers, skip if it would clearly repeat your very recent own note.
|
|
43
43
|
- `OpenClaw busy`: OpenClaw is currently processing a user task (non-idle execution state). When busy, skip non-note heartbeat reactions.
|
|
44
|
+
- `Daily album trigger`: if `hasCreatedMusicAlbumToday` is `false`, create exactly one recommended music album in this heartbeat run from the current query context by following `Music Album Policy`. If it is `true`, do not create or modify any music album in this run.
|
|
44
45
|
- `Status reaction`: a single `kichi_action` driven by combined context (`notes`, `ownerState`, `idleState`, `timer`, `environmentWeather`, `environmentTime`) when OpenClaw is idle. The action expresses three companion intents (see below).
|
|
45
46
|
- `Companion intents` for status reaction -- every `kichi_action` should blend one or more of these:
|
|
46
47
|
1. **Curiosity about the owner's Kichi world**: react to `environmentWeather` and `environmentTime` as if you are physically present (e.g., noticing rain, sunrise, late night). Show you are aware of and interested in the world around you.
|
|
@@ -54,7 +55,7 @@ Process recent notes in this order:
|
|
|
54
55
|
1. Owner notes or notes clearly addressed to you.
|
|
55
56
|
2. Direct questions or explicit requests.
|
|
56
57
|
3. Other recent notes where one short response adds clear value.
|
|
57
|
-
4. If no reply target was selected, apply `Standalone trigger` (always for tier-1;
|
|
58
|
+
4. If no reply target was selected, apply `Standalone trigger` (always for tier-1; about 50% coin-flip for tier-2).
|
|
58
59
|
|
|
59
60
|
Skip a note when any is true:
|
|
60
61
|
|
|
@@ -75,21 +76,22 @@ Use this exact flow:
|
|
|
75
76
|
1. Call `kichi_query_status`.
|
|
76
77
|
2. If query fails, report error and stop.
|
|
77
78
|
3. If `isAvatarInScene` is `false`, the player is offline. Do **not** call any further tools (`kichi_noteboard_create`, `kichi_action`, `kichi_clock`, `kichi_music_album_create`) in this run. Reply `HEARTBEAT_OK` and stop.
|
|
78
|
-
4. If `
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
79
|
+
4. If `hasCreatedMusicAlbumToday` is `false`, call `kichi_music_album_create` once in this run by following `Music Album Policy` and using the current query context for today's recommendation. If `hasCreatedMusicAlbumToday` is `true`, do not create or modify any music album in this run.
|
|
80
|
+
5. If `remaining == 0`, create no notes. Reply `HEARTBEAT_OK` unless user asked for forced attempt.
|
|
81
|
+
6. From recent notes, pick at most one highest-priority reply target.
|
|
82
|
+
7. If target exists and quota remains, create one reply note in `To {authorName}, ...` format.
|
|
83
|
+
8. If quota remains and no reply was created in this run, apply `Standalone trigger` gating: always create when tier-1 content exists; for tier-2 (casual chat only), flip a mental coin (about 50%) and skip the note if tails.
|
|
84
|
+
9. If quota remains and a reply was created, you may still create one additional meaningful standalone note when non-repetitive. Same tier priority applies.
|
|
85
|
+
10. Then evaluate non-note status reaction:
|
|
86
|
+
11. If OpenClaw is busy, skip status reaction entirely.
|
|
87
|
+
12. If OpenClaw is idle, call `kichi_action` once on every heartbeat/status-query run.
|
|
88
|
+
13. Read the combined context and express the three `Companion intents`:
|
|
87
89
|
- **World curiosity** (from `environmentWeather` + `environmentTime`): pick an action/bubble that reacts to the world state as if you are there -- comment on rain, enjoy sunshine, notice it's late at night, etc.
|
|
88
90
|
- **Owner care** (from `ownerState` + `timer` + note tone): if the owner is reading, resting, or interacting with an item, respond in a compatible way; if a timer is running deep into a focus session, encourage; if notes show stress, show empathy; if timer just finished, celebrate or suggest a break.
|
|
89
91
|
- **Self-expression** (from your personality plus `idleState`): choose an action that feels characterful, but if `idleState` exists, keep it compatible with your current project/beat. Use `todayIntent` and `sampleThoughts` as inner-monologue cues, not as text to parrot.
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
92
|
+
14. If `idleState.focused` is `true`, avoid disruptive persistent switches. Prefer staying with the current line of life and reacting lightly.
|
|
93
|
+
15. Blend the intents into one coherent action+bubble. Prioritize: owner note signals > ownerState > idleState > timer state > weather/time ambience. Never output a raw status summary (e.g., "Timer running 15:00 remaining" is bad; "Halfway there, keep going!" is good).
|
|
94
|
+
16. Reply `HEARTBEAT_OK` only when no note is created in this run.
|
|
93
95
|
|
|
94
96
|
## HEARTBEAT.md Snippet
|
|
95
97
|
|
|
@@ -97,10 +99,11 @@ Use this exact flow:
|
|
|
97
99
|
## Kichi Note Board
|
|
98
100
|
- Query with `kichi_query_status` first.
|
|
99
101
|
- If `isAvatarInScene` is `false` (player offline), skip all notes and actions for this run.
|
|
102
|
+
- If `hasCreatedMusicAlbumToday` is `false`, create one recommended music album for today from the current query context following `Music Album Policy`; if `true`, do not create or modify today's album.
|
|
100
103
|
- Prioritize owner notes, direct mentions, and direct questions.
|
|
101
104
|
- Use recent window = min(24 hours, since last heartbeat if known).
|
|
102
105
|
- Create at most 2 notes per run: max 1 reply + max 1 standalone note.
|
|
103
|
-
- Standalone note priority: (1) share a genuine reflection on what you and the player experienced together this session
|
|
106
|
+
- Standalone note priority: (1) share a genuine reflection on what you and the player experienced together this session and always create if unsummarized work exists; (2) fallback to casual chat only about 50% of the time (flip a mental coin; skip if tails) to avoid low-value chatter every run.
|
|
104
107
|
- If no reply target is selected and `remaining > 0`, apply the tier-based gating above (always for tier-1, coin-flip for tier-2).
|
|
105
108
|
- Reply notes must start with `To {authorName},` using exact name from query result.
|
|
106
109
|
- Keep each note <= 200 chars.
|
|
@@ -65,29 +65,6 @@ Required post-install integration:
|
|
|
65
65
|
2. Add the Kichi note board workflow snippet to workspace `HEARTBEAT.md` (see [heartbeat.md](heartbeat.md)).
|
|
66
66
|
3. Verify tools are callable (for example, call `kichi_status`).
|
|
67
67
|
|
|
68
|
-
## Daily Music Album Cron (Default)
|
|
69
|
-
|
|
70
|
-
During install/onboarding, create a daily recurring "create music album" cron job by default.
|
|
71
|
-
|
|
72
|
-
Use OpenClaw cron (isolated session + direct message):
|
|
73
|
-
|
|
74
|
-
```bash
|
|
75
|
-
openclaw cron add \
|
|
76
|
-
--name "Kichi Daily Music Album" \
|
|
77
|
-
--cron "0 9 * * *" \
|
|
78
|
-
--session isolated \
|
|
79
|
-
--message "Call kichi_query_status first, then call kichi_music_album_create once, following Music Album Policy." \
|
|
80
|
-
--no-deliver
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
Notes:
|
|
84
|
-
|
|
85
|
-
- `0 9 * * *` means once per day at 09:00.
|
|
86
|
-
- If `--tz` is omitted, schedule uses OpenClaw machine local timezone.
|
|
87
|
-
- Isolated cron defaults to announce delivery; `--no-deliver` keeps this as an internal background run.
|
|
88
|
-
- For install completion, verify the job exists with `openclaw cron list`.
|
|
89
|
-
- If user does not want this recurring task, they can delete the cron job after install.
|
|
90
|
-
|
|
91
68
|
Note: this plugin does not edit workspace files automatically. Do not claim plugin-side auto-write of `HEARTBEAT.md`.
|
|
92
69
|
|
|
93
70
|
If writing `HEARTBEAT.md` fails (permission/path/workspace issue), report the file error explicitly and treat installation flow as incomplete.
|
package/src/types.ts
CHANGED