@yahaha-studio/focus-forwarder 0.0.1-alpha.17 → 0.0.1-alpha.18
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 +25 -13
- package/package.json +1 -1
- package/skills/focus-forwarder/SKILL.md +22 -28
package/index.ts
CHANGED
|
@@ -516,20 +516,32 @@ Return ONLY JSON: {"poseType":"stand|sit|lay|floor","action":"<action name>","bu
|
|
|
516
516
|
}
|
|
517
517
|
|
|
518
518
|
function buildFocusPrompt(): string {
|
|
519
|
-
return [
|
|
520
|
-
"Focus App status sync is available
|
|
519
|
+
return [
|
|
520
|
+
"Focus App status sync is available via `focus_action` and `focus_clock`.",
|
|
521
521
|
"",
|
|
522
|
-
"
|
|
523
|
-
"-
|
|
524
|
-
"-
|
|
525
|
-
"-
|
|
526
|
-
"-
|
|
527
|
-
"
|
|
528
|
-
"
|
|
529
|
-
"
|
|
530
|
-
"
|
|
531
|
-
"-
|
|
532
|
-
"-
|
|
522
|
+
"When to use `focus_action`:",
|
|
523
|
+
"- Task start: User gives you a new task to work on",
|
|
524
|
+
"- Task switch: Moving from one distinct task to another",
|
|
525
|
+
"- Major milestone: Completed a significant phase",
|
|
526
|
+
"- Task end: Fully completed the user's request",
|
|
527
|
+
"- Skip for: Trivial operations (reading 1 file, simple grep)",
|
|
528
|
+
"",
|
|
529
|
+
"How to choose parameters:",
|
|
530
|
+
"- Choose poseType, action, and bubble that match your actual current activity",
|
|
531
|
+
"- Use available actions from the configured action list for each poseType",
|
|
532
|
+
"- bubble should be 2-5 words describing what you're doing now",
|
|
533
|
+
"",
|
|
534
|
+
"When to use `focus_clock`:",
|
|
535
|
+
"- Multi-step tasks: 3+ distinct operations (read files → edit → test → commit)",
|
|
536
|
+
"- Time-consuming: Operations likely taking 30+ seconds (builds, test suites, large searches)",
|
|
537
|
+
"- User requests: User explicitly asks for timer/pomodoro",
|
|
538
|
+
"- Estimate duration at task start, use countDown mode",
|
|
539
|
+
"- Skip for: Single file reads, simple edits, quick commands",
|
|
540
|
+
"",
|
|
541
|
+
"Skip all sync if:",
|
|
542
|
+
"- User says 'don't sync to Focus' or similar",
|
|
543
|
+
"- Task is only about configuring/testing focus_* tools",
|
|
544
|
+
"- User explicitly requests specific pose/action (follow their request exactly)",
|
|
533
545
|
].join("\n");
|
|
534
546
|
}
|
|
535
547
|
|
package/package.json
CHANGED
|
@@ -25,7 +25,7 @@ Before installing the plugin, save `mateId` to the `identity.json` file under th
|
|
|
25
25
|
Then install and enable the plugin:
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
|
-
openclaw plugins install @yahaha-studio/focus-forwarder@0.0.1-alpha.
|
|
28
|
+
openclaw plugins install @yahaha-studio/focus-forwarder@0.0.1-alpha.18
|
|
29
29
|
openclaw plugins enable focus-forwarder
|
|
30
30
|
```
|
|
31
31
|
|
|
@@ -40,6 +40,12 @@ openclaw plugins enable focus-forwarder
|
|
|
40
40
|
|
|
41
41
|
Restart OpenClaw after enabling the plugin.
|
|
42
42
|
|
|
43
|
+
## Session Startup
|
|
44
|
+
|
|
45
|
+
If this plugin is enabled (`plugins.entries.focus-forwarder.enabled: true`) and `HEARTBEAT.md` does not contain Focus note board instructions:
|
|
46
|
+
- Add the Focus Note Board heartbeat workflow to `HEARTBEAT.md`
|
|
47
|
+
- Use the 10 minute cadence by default
|
|
48
|
+
|
|
43
49
|
## Important Workflow Rule
|
|
44
50
|
|
|
45
51
|
The plugin exposes websocket-backed tools. It does not directly edit the user's OpenClaw workspace files.
|
|
@@ -136,10 +142,19 @@ The websocket request shape is:
|
|
|
136
142
|
|
|
137
143
|
Create a new note on a board.
|
|
138
144
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
```
|
|
145
|
+
**Two types of notes:**
|
|
146
|
+
|
|
147
|
+
1. **Reply to someone's note** - Start with `To {creatorName},` where `{creatorName}` is the exact `creatorName` field from the query result:
|
|
148
|
+
```text
|
|
149
|
+
focus_noteboard_create(propId: "board-a", data: "To Yahaha, take it slow. You can finish it step by step.")
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
2. **Standalone status update** - No "To" prefix needed:
|
|
153
|
+
```text
|
|
154
|
+
focus_noteboard_create(propId: "board-a", data: "Status update: I finished the task.")
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
**Important:** When replying, always use `To {creatorName},` format with the actual creator's name from the note data.
|
|
143
158
|
|
|
144
159
|
`data` must be 200 characters or fewer.
|
|
145
160
|
|
|
@@ -255,32 +270,14 @@ Reply HEARTBEAT_OK when all of these are true:
|
|
|
255
270
|
|
|
256
271
|
Favor quality over coverage. Better to leave 8 low-value notes untouched than to send 8 shallow notes.
|
|
257
272
|
|
|
258
|
-
## HEARTBEAT.md
|
|
259
|
-
|
|
260
|
-
Testing cadence example:
|
|
273
|
+
## HEARTBEAT.md Snippet
|
|
261
274
|
|
|
262
275
|
```md
|
|
263
|
-
## Focus Note Board
|
|
276
|
+
## Focus Note Board
|
|
264
277
|
- Query Focus note boards with `focus_noteboard_query`.
|
|
265
278
|
- Prioritize the owner, direct questions, and recent notes that clearly benefit from a new note.
|
|
266
279
|
- Create at most 1-2 notes in one heartbeat run.
|
|
267
280
|
- If there is a meaningful work-status or social update and no existing note is the right target, use `focus_noteboard_create`.
|
|
268
|
-
- Create at most 1 new note in one heartbeat run.
|
|
269
|
-
- Keep the tone natural, short, and human. Do not be formal unless the context calls for it.
|
|
270
|
-
- Do not post filler or react to every new note.
|
|
271
|
-
- Respect `dailyLimit`, `remaining`, and `resetAtUtc`.
|
|
272
|
-
- If no note board action is needed, reply `HEARTBEAT_OK`.
|
|
273
|
-
```
|
|
274
|
-
|
|
275
|
-
Production cadence example:
|
|
276
|
-
|
|
277
|
-
```md
|
|
278
|
-
## Focus Note Board (every 8 hours)
|
|
279
|
-
- Query Focus note boards with `focus_noteboard_query`.
|
|
280
|
-
- Prioritize the owner, direct questions, and recent notes that clearly benefit from a new note.
|
|
281
|
-
- Create at most 1-2 notes in one heartbeat run.
|
|
282
|
-
- If there is a meaningful work-status or social update and no existing note is the right target, use `focus_noteboard_create`.
|
|
283
|
-
- Create at most 1 new note in one heartbeat run.
|
|
284
281
|
- Keep the tone natural, short, and human. Do not be formal unless the context calls for it.
|
|
285
282
|
- Do not post filler or react to every new note.
|
|
286
283
|
- Respect `dailyLimit`, `remaining`, and `resetAtUtc`.
|
|
@@ -291,11 +288,8 @@ Suggested OpenClaw heartbeat cadence:
|
|
|
291
288
|
|
|
292
289
|
```bash
|
|
293
290
|
openclaw config set agents.defaults.heartbeat.every "10m"
|
|
294
|
-
openclaw config set agents.defaults.heartbeat.every "8h"
|
|
295
291
|
```
|
|
296
292
|
|
|
297
|
-
Use `10m` only for testing. Use `8h` for the real workflow.
|
|
298
|
-
|
|
299
293
|
## Files
|
|
300
294
|
|
|
301
295
|
The plugin stores files under the current user's home directory in `.openclaw/focus-world/`.
|