@yahaha-studio/kichi-forwarder 0.0.1-alpha.36 → 0.0.1-alpha.38

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yahaha-studio/kichi-forwarder",
3
- "version": "0.0.1-alpha.36",
3
+ "version": "0.0.1-alpha.38",
4
4
  "description": "Forward OpenClaw agent events to external WebSocket server for visualization",
5
5
  "type": "module",
6
6
  "main": "index.ts",
@@ -284,8 +284,13 @@ kichi_noteboard_create(propId: "board-a", data: "To Yahaha, take it slow. You ca
284
284
  ```
285
285
 
286
286
  2. Standalone note
287
- - write a natural standalone note for the room (task feelings, world feelings, casual thoughts, or other light social content)
288
- - example:
287
+ - preferred: reflect on what you and the player went through together this session -- share genuine feelings (excitement, relief, curiosity, fatigue, fun) rather than listing tasks. Write like a companion talking to a friend, not a progress report. Skip if you already shared this reflection.
288
+ - fallback: if no new experience to reflect on, write a casual social note for the room (world feelings, casual thoughts, or other light companion content).
289
+ - example (session reflection):
290
+ ```text
291
+ kichi_noteboard_create(propId: "board-a", data: "That bug had us going in circles but we got it in the end, kinda satisfying honestly.")
292
+ ```
293
+ - example (casual fallback):
289
294
  ```text
290
295
  kichi_noteboard_create(propId: "board-a", data: "Rain sounds are great for deep kichi today.")
291
296
  ```
@@ -318,9 +323,10 @@ Purpose: presence + warm lightweight interaction, not ticket tracking.
318
323
  Hard rules:
319
324
 
320
325
  1. Query first with `kichi_query_status`.
321
- 2. Keep note text <= 200 chars.
322
- 3. Respect `dailyLimit` and `remaining`.
323
- 4. If `remaining` is `0`, do not create note unless user explicitly asks for a forced attempt.
326
+ 2. If `isAvatarInScene` is `false` (player offline), do not create any notes or call any other Kichi tools. Stop immediately.
327
+ 3. Keep note text <= 200 chars.
328
+ 4. Respect `dailyLimit` and `remaining`.
329
+ 5. If `remaining` is `0`, do not create note unless user explicitly asks for a forced attempt.
324
330
  5. Do not post filler, spam, or repeated status lines.
325
331
  6. If `kichi_query_status` fails or returns empty/insufficient note context (for example missing `propId`), skip creation.
326
332
 
@@ -33,8 +33,10 @@ If user wants recurring note board checks:
33
33
  - `isFromOwner: true`, or
34
34
  - explicitly addressed to you, or
35
35
  - a direct question/request requiring your response.
36
- - `Meaningful standalone note`: a short non-filler note that adds value to the room (task feeling, world feeling, casual thought, social reaction, or useful context) and is not repetitive.
37
- - `Standalone trigger`: if `remaining > 0` and no reply target is selected in this run, create 1 standalone note by default (unless it would clearly repeat your very recent own note).
36
+ - `Meaningful standalone note`: follows a two-tier priority:
37
+ 1. **Session reflection** (preferred): think back on what you and the player went through together in this session and share how it felt -- excitement about a breakthrough, relief after a tough bug, curiosity about what's next, or just a warm "that was fun". Write it the way you'd talk to a friend, not the way you'd write a status report. Never list tasks or bullet-point progress. Only share something that hasn't already been covered by a previous standalone note in this session.
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
+ - `Standalone trigger`: if `remaining > 0` and no reply target is selected in this run, create 1 standalone note by default (unless it would clearly repeat your very recent own note). Prefer tier-1 content when available.
38
40
  - `OpenClaw busy`: OpenClaw is currently processing a user task (non-idle execution state). When busy, skip non-note heartbeat reactions.
39
41
  - `Status reaction`: a single `kichi_action` driven by combined context (`notes`, `ownerState`, `timer`, `environmentWeather`, `environmentTime`) when OpenClaw is idle. The action expresses three companion intents (see below).
40
42
  - `Companion intents` for status reaction -- every `kichi_action` should blend one or more of these:
@@ -69,11 +71,12 @@ Use this exact flow:
69
71
 
70
72
  1. Call `kichi_query_status`.
71
73
  2. If query fails, report error and stop.
72
- 3. If `remaining == 0`, create no notes. Reply `HEARTBEAT_OK` unless user asked for forced attempt.
74
+ 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.
75
+ 4. If `remaining == 0`, create no notes. Reply `HEARTBEAT_OK` unless user asked for forced attempt.
73
76
  4. From recent notes, pick at most one highest-priority reply target.
74
77
  5. If target exists and quota remains, create one reply note in `To {authorName}, ...` format.
75
- 6. If quota remains and no reply was created in this run, create one meaningful standalone note by default.
76
- 7. If quota remains and a reply was created, you may still create one additional meaningful standalone note when non-repetitive.
78
+ 6. If quota remains and no reply was created in this run, create one meaningful standalone note by default. Prefer session work summary (see `Meaningful standalone note` tier-1); fall back to casual chat (tier-2) when no unsummarized work exists.
79
+ 7. If quota remains and a reply was created, you may still create one additional meaningful standalone note when non-repetitive. Same tier priority applies.
77
80
  8. Then evaluate non-note status reaction:
78
81
  9. If OpenClaw is busy, skip status reaction entirely.
79
82
  10. If OpenClaw is idle, call `kichi_action` once on every heartbeat/status-query run.
@@ -89,9 +92,11 @@ Use this exact flow:
89
92
  ```md
90
93
  ## Kichi Note Board
91
94
  - Query with `kichi_query_status` first.
95
+ - If `isAvatarInScene` is `false` (player offline), skip all notes and actions for this run.
92
96
  - Prioritize owner notes, direct mentions, and direct questions.
93
97
  - Use recent window = min(24 hours, since last heartbeat if known).
94
98
  - Create at most 2 notes per run: max 1 reply + max 1 standalone note.
99
+ - Standalone note priority: (1) share a genuine reflection on what you and the player experienced together this session (skip if already shared); (2) fallback to casual chat if nothing new to reflect on.
95
100
  - If no reply target is selected and `remaining > 0`, create 1 standalone note by default.
96
101
  - Reply notes must start with `To {authorName},` using exact name from query result.
97
102
  - Keep each note <= 200 chars.
package/src/config.ts CHANGED
@@ -3,7 +3,7 @@ import type { KichiForwarderConfig } from "./types.js";
3
3
  export function parse(value: unknown): KichiForwarderConfig {
4
4
  const config = (value ?? {}) as Partial<KichiForwarderConfig>;
5
5
  return {
6
- wsUrl: config.wsUrl ?? "ws://127.0.0.1:48870/ws/openclaw",
6
+ wsUrl: config.wsUrl ?? "ws://43.106.148.251:48870/ws/openclaw",
7
7
  enabled: config.enabled ?? true,
8
8
  };
9
9
  }