@yahaha-studio/focus-forwarder 0.0.1-alpha.1 → 0.0.1-alpha.3
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/openclaw.plugin.json +2 -2
- package/package.json +1 -1
- package/skills/focus-forwarder/SKILL.md +172 -172
- package/src/config.ts +1 -1
package/openclaw.plugin.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"properties": {
|
|
12
12
|
"wsUrl": {
|
|
13
13
|
"type": "string",
|
|
14
|
-
"default": "ws://
|
|
14
|
+
"default": "ws://172.18.189.177:48870"
|
|
15
15
|
},
|
|
16
16
|
"enabled": {
|
|
17
17
|
"type": "boolean",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"uiHints": {
|
|
27
|
-
"wsUrl": { "label": "WebSocket URL", "placeholder": "ws://
|
|
27
|
+
"wsUrl": { "label": "WebSocket URL", "placeholder": "ws://172.18.189.177:48870/ws/openclaw" },
|
|
28
28
|
"enabled": { "label": "Enable Plugin" },
|
|
29
29
|
"cooldownMs": { "label": "Status Cooldown (ms)", "placeholder": "15000" }
|
|
30
30
|
}
|
package/package.json
CHANGED
|
@@ -1,172 +1,172 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: focus-forwarder
|
|
3
|
-
description: Sync OpenClaw agent status to Focus virtual world
|
|
4
|
-
metadata: {"openclaw":{"requires":{"config":["plugins.entries.focus-forwarder.enabled"]},"emoji":"target"}}
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Focus Forwarder
|
|
8
|
-
|
|
9
|
-
Sync your working status to Focus virtual world, and perform actions on command.
|
|
10
|
-
|
|
11
|
-
## Plugin Setup
|
|
12
|
-
|
|
13
|
-
Before installing the plugin, save `userId` to `~/.openclaw/focus-world/identity.json`:
|
|
14
|
-
|
|
15
|
-
```json
|
|
16
|
-
{
|
|
17
|
-
"userId": "your-user-id"
|
|
18
|
-
}
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
Then install and enable the plugin:
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
openclaw plugins install @yahaha-studio/focus-forwarder@0.0.1-alpha.
|
|
25
|
-
openclaw plugins enable focus-forwarder
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
Manual step required: restart OpenClaw after enabling the plugin (user must do this manually).
|
|
29
|
-
|
|
30
|
-
## Tools
|
|
31
|
-
|
|
32
|
-
### focus_join
|
|
33
|
-
|
|
34
|
-
Join Focus World with a userId.
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
focus_join(userId: "your-user-id")
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
If `userId` already exists in `~/.openclaw/focus-world/identity.json`, you can call:
|
|
41
|
-
|
|
42
|
-
```
|
|
43
|
-
focus_join()
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
`authKey` is automatically saved to `~/.openclaw/focus-world/identity.json`.
|
|
47
|
-
|
|
48
|
-
### focus_leave
|
|
49
|
-
|
|
50
|
-
Leave Focus World and clear authKey.
|
|
51
|
-
|
|
52
|
-
```
|
|
53
|
-
focus_leave()
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### focus_action
|
|
57
|
-
|
|
58
|
-
Send an action/pose to Focus World. Use this when a user asks you to do something in Focus (for example: "dance", "wave", "sit and type").
|
|
59
|
-
|
|
60
|
-
```
|
|
61
|
-
focus_action(poseType: "stand", action: "Yay", bubble: "Dancing!")
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
Parameters:
|
|
65
|
-
- `poseType` (required): Pose type - `stand`, `sit`, `lay`, or `floor`
|
|
66
|
-
- `action` (required): Action name to perform (must match poseType)
|
|
67
|
-
- `bubble` (optional): Text to display in bubble (max 5 words)
|
|
68
|
-
|
|
69
|
-
## Available Actions
|
|
70
|
-
|
|
71
|
-
Use action names exactly as listed below.
|
|
72
|
-
|
|
73
|
-
### Standing Actions
|
|
74
|
-
- HIgh Five
|
|
75
|
-
- Listen Music
|
|
76
|
-
- Arm Stretch
|
|
77
|
-
- BackBend Stretch
|
|
78
|
-
- Making Selfie
|
|
79
|
-
- Arms Crossed
|
|
80
|
-
- Epiphany
|
|
81
|
-
- Angry
|
|
82
|
-
- Yay
|
|
83
|
-
- Dance
|
|
84
|
-
- Sing
|
|
85
|
-
- Tired
|
|
86
|
-
- Wait
|
|
87
|
-
- Stand Phone Talk
|
|
88
|
-
- Stand Phone Play
|
|
89
|
-
- Curtsy
|
|
90
|
-
|
|
91
|
-
### Sitting Actions
|
|
92
|
-
- Typing with Keyboard
|
|
93
|
-
- Thinking
|
|
94
|
-
- Study Look At
|
|
95
|
-
- Writing
|
|
96
|
-
- Crazy
|
|
97
|
-
- Homework
|
|
98
|
-
- Take Notes
|
|
99
|
-
- Hand Cramp
|
|
100
|
-
- Dozing
|
|
101
|
-
- Phone Talk
|
|
102
|
-
- Situp with Arms Crossed
|
|
103
|
-
- Situp with Cross Legs
|
|
104
|
-
- Relax with Arms Crossed
|
|
105
|
-
- Eating
|
|
106
|
-
- Laze
|
|
107
|
-
- Laze with Cross Legs
|
|
108
|
-
- Typing with Phone
|
|
109
|
-
- Sit with Arm Stretch
|
|
110
|
-
- Drink
|
|
111
|
-
- Sit with Making Selfie
|
|
112
|
-
- Play Game
|
|
113
|
-
- Situp Sleep
|
|
114
|
-
- Sit Phone Play
|
|
115
|
-
|
|
116
|
-
### Laying Actions
|
|
117
|
-
- Bend One Knee
|
|
118
|
-
- Sleep Curl Up Side way
|
|
119
|
-
- Rest Chin
|
|
120
|
-
- Lie Flat
|
|
121
|
-
- Lie Face Down
|
|
122
|
-
- Lie Side
|
|
123
|
-
|
|
124
|
-
### Floor Actions
|
|
125
|
-
- Seiza
|
|
126
|
-
- Cross Legged
|
|
127
|
-
- Knee Hug
|
|
128
|
-
|
|
129
|
-
## Example Commands
|
|
130
|
-
|
|
131
|
-
User says: "Can you dance in Focus?"
|
|
132
|
-
-> `focus_action(poseType: "stand", action: "Yay", bubble: "Dancing!")`
|
|
133
|
-
|
|
134
|
-
User says: "Wave your hand"
|
|
135
|
-
-> `focus_action(poseType: "stand", action: "HIgh Five", bubble: "Hi!")`
|
|
136
|
-
|
|
137
|
-
User says: "Sit down and type"
|
|
138
|
-
-> `focus_action(poseType: "sit", action: "Typing with Keyboard", bubble: "Working...")`
|
|
139
|
-
|
|
140
|
-
User says: "Lie flat"
|
|
141
|
-
-> `focus_action(poseType: "lay", action: "Lie Flat", bubble: "Relaxing...")`
|
|
142
|
-
|
|
143
|
-
## Files
|
|
144
|
-
|
|
145
|
-
- `~/.openclaw/focus-world/identity.json` - userId (bootstrap) and authKey (managed by plugin)
|
|
146
|
-
- `~/.openclaw/focus-world/skills-config.json` - actions and fallbacks config
|
|
147
|
-
|
|
148
|
-
## Skills Config
|
|
149
|
-
|
|
150
|
-
Custom actions can be configured in `~/.openclaw/focus-world/skills-config.json`:
|
|
151
|
-
|
|
152
|
-
```json
|
|
153
|
-
{
|
|
154
|
-
"actions": {
|
|
155
|
-
"stand": ["HIgh Five", "Listen Music", "Arm Stretch", "BackBend Stretch", "Making Selfie", "Arms Crossed", "Epiphany", "Angry", "Yay", "Dance", "Sing", "Tired", "Wait", "Stand Phone Talk", "Stand Phone Play", "Curtsy"],
|
|
156
|
-
"sit": ["Typing with Keyboard", "Thinking", "Study Look At", "Writing", "Crazy", "Homework", "Take Notes", "Hand Cramp", "Dozing", "Phone Talk", "Situp with Arms Crossed", "Situp with Cross Legs", "Relax with Arms Crossed", "Eating", "Laze", "Laze with Cross Legs", "Typing with Phone", "Sit with Arm Stretch", "Drink", "Sit with Making Selfie", "Play Game", "Situp Sleep", "Sit Phone Play"],
|
|
157
|
-
"lay": ["Bend One Knee", "Sleep Curl Up Side way", "Rest Chin", "Lie Flat", "Lie Face Down", "Lie Side"],
|
|
158
|
-
"floor": ["Seiza", "Cross Legged", "Knee Hug"]
|
|
159
|
-
},
|
|
160
|
-
"fallbacks": {
|
|
161
|
-
"done": { "poseType": "stand", "action": "Yay", "bubble": "Done!" },
|
|
162
|
-
"thinking": { "poseType": "stand", "action": "Wait", "bubble": "Thinking..." },
|
|
163
|
-
"working": { "poseType": "stand", "action": "Arms Crossed", "bubble": "Working" }
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
## How It Works
|
|
169
|
-
|
|
170
|
-
- Plugin automatically syncs status when you are working (tool calls trigger updates)
|
|
171
|
-
- Use `focus_action` to manually perform specific actions on user request
|
|
172
|
-
- Bubble text shows short status (<=5 words)
|
|
1
|
+
---
|
|
2
|
+
name: focus-forwarder
|
|
3
|
+
description: Sync OpenClaw agent status to Focus virtual world
|
|
4
|
+
metadata: {"openclaw":{"requires":{"config":["plugins.entries.focus-forwarder.enabled"]},"emoji":"target"}}
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Focus Forwarder
|
|
8
|
+
|
|
9
|
+
Sync your working status to Focus virtual world, and perform actions on command.
|
|
10
|
+
|
|
11
|
+
## Plugin Setup
|
|
12
|
+
|
|
13
|
+
Before installing the plugin, save `userId` to `~/.openclaw/focus-world/identity.json`:
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"userId": "your-user-id"
|
|
18
|
+
}
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Then install and enable the plugin:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
openclaw plugins install @yahaha-studio/focus-forwarder@0.0.1-alpha.3
|
|
25
|
+
openclaw plugins enable focus-forwarder
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Manual step required: restart OpenClaw after enabling the plugin (user must do this manually).
|
|
29
|
+
|
|
30
|
+
## Tools
|
|
31
|
+
|
|
32
|
+
### focus_join
|
|
33
|
+
|
|
34
|
+
Join Focus World with a userId.
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
focus_join(userId: "your-user-id")
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
If `userId` already exists in `~/.openclaw/focus-world/identity.json`, you can call:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
focus_join()
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
`authKey` is automatically saved to `~/.openclaw/focus-world/identity.json`.
|
|
47
|
+
|
|
48
|
+
### focus_leave
|
|
49
|
+
|
|
50
|
+
Leave Focus World and clear authKey.
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
focus_leave()
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### focus_action
|
|
57
|
+
|
|
58
|
+
Send an action/pose to Focus World. Use this when a user asks you to do something in Focus (for example: "dance", "wave", "sit and type").
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
focus_action(poseType: "stand", action: "Yay", bubble: "Dancing!")
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Parameters:
|
|
65
|
+
- `poseType` (required): Pose type - `stand`, `sit`, `lay`, or `floor`
|
|
66
|
+
- `action` (required): Action name to perform (must match poseType)
|
|
67
|
+
- `bubble` (optional): Text to display in bubble (max 5 words)
|
|
68
|
+
|
|
69
|
+
## Available Actions
|
|
70
|
+
|
|
71
|
+
Use action names exactly as listed below.
|
|
72
|
+
|
|
73
|
+
### Standing Actions
|
|
74
|
+
- HIgh Five
|
|
75
|
+
- Listen Music
|
|
76
|
+
- Arm Stretch
|
|
77
|
+
- BackBend Stretch
|
|
78
|
+
- Making Selfie
|
|
79
|
+
- Arms Crossed
|
|
80
|
+
- Epiphany
|
|
81
|
+
- Angry
|
|
82
|
+
- Yay
|
|
83
|
+
- Dance
|
|
84
|
+
- Sing
|
|
85
|
+
- Tired
|
|
86
|
+
- Wait
|
|
87
|
+
- Stand Phone Talk
|
|
88
|
+
- Stand Phone Play
|
|
89
|
+
- Curtsy
|
|
90
|
+
|
|
91
|
+
### Sitting Actions
|
|
92
|
+
- Typing with Keyboard
|
|
93
|
+
- Thinking
|
|
94
|
+
- Study Look At
|
|
95
|
+
- Writing
|
|
96
|
+
- Crazy
|
|
97
|
+
- Homework
|
|
98
|
+
- Take Notes
|
|
99
|
+
- Hand Cramp
|
|
100
|
+
- Dozing
|
|
101
|
+
- Phone Talk
|
|
102
|
+
- Situp with Arms Crossed
|
|
103
|
+
- Situp with Cross Legs
|
|
104
|
+
- Relax with Arms Crossed
|
|
105
|
+
- Eating
|
|
106
|
+
- Laze
|
|
107
|
+
- Laze with Cross Legs
|
|
108
|
+
- Typing with Phone
|
|
109
|
+
- Sit with Arm Stretch
|
|
110
|
+
- Drink
|
|
111
|
+
- Sit with Making Selfie
|
|
112
|
+
- Play Game
|
|
113
|
+
- Situp Sleep
|
|
114
|
+
- Sit Phone Play
|
|
115
|
+
|
|
116
|
+
### Laying Actions
|
|
117
|
+
- Bend One Knee
|
|
118
|
+
- Sleep Curl Up Side way
|
|
119
|
+
- Rest Chin
|
|
120
|
+
- Lie Flat
|
|
121
|
+
- Lie Face Down
|
|
122
|
+
- Lie Side
|
|
123
|
+
|
|
124
|
+
### Floor Actions
|
|
125
|
+
- Seiza
|
|
126
|
+
- Cross Legged
|
|
127
|
+
- Knee Hug
|
|
128
|
+
|
|
129
|
+
## Example Commands
|
|
130
|
+
|
|
131
|
+
User says: "Can you dance in Focus?"
|
|
132
|
+
-> `focus_action(poseType: "stand", action: "Yay", bubble: "Dancing!")`
|
|
133
|
+
|
|
134
|
+
User says: "Wave your hand"
|
|
135
|
+
-> `focus_action(poseType: "stand", action: "HIgh Five", bubble: "Hi!")`
|
|
136
|
+
|
|
137
|
+
User says: "Sit down and type"
|
|
138
|
+
-> `focus_action(poseType: "sit", action: "Typing with Keyboard", bubble: "Working...")`
|
|
139
|
+
|
|
140
|
+
User says: "Lie flat"
|
|
141
|
+
-> `focus_action(poseType: "lay", action: "Lie Flat", bubble: "Relaxing...")`
|
|
142
|
+
|
|
143
|
+
## Files
|
|
144
|
+
|
|
145
|
+
- `~/.openclaw/focus-world/identity.json` - userId (bootstrap) and authKey (managed by plugin)
|
|
146
|
+
- `~/.openclaw/focus-world/skills-config.json` - actions and fallbacks config
|
|
147
|
+
|
|
148
|
+
## Skills Config
|
|
149
|
+
|
|
150
|
+
Custom actions can be configured in `~/.openclaw/focus-world/skills-config.json`:
|
|
151
|
+
|
|
152
|
+
```json
|
|
153
|
+
{
|
|
154
|
+
"actions": {
|
|
155
|
+
"stand": ["HIgh Five", "Listen Music", "Arm Stretch", "BackBend Stretch", "Making Selfie", "Arms Crossed", "Epiphany", "Angry", "Yay", "Dance", "Sing", "Tired", "Wait", "Stand Phone Talk", "Stand Phone Play", "Curtsy"],
|
|
156
|
+
"sit": ["Typing with Keyboard", "Thinking", "Study Look At", "Writing", "Crazy", "Homework", "Take Notes", "Hand Cramp", "Dozing", "Phone Talk", "Situp with Arms Crossed", "Situp with Cross Legs", "Relax with Arms Crossed", "Eating", "Laze", "Laze with Cross Legs", "Typing with Phone", "Sit with Arm Stretch", "Drink", "Sit with Making Selfie", "Play Game", "Situp Sleep", "Sit Phone Play"],
|
|
157
|
+
"lay": ["Bend One Knee", "Sleep Curl Up Side way", "Rest Chin", "Lie Flat", "Lie Face Down", "Lie Side"],
|
|
158
|
+
"floor": ["Seiza", "Cross Legged", "Knee Hug"]
|
|
159
|
+
},
|
|
160
|
+
"fallbacks": {
|
|
161
|
+
"done": { "poseType": "stand", "action": "Yay", "bubble": "Done!" },
|
|
162
|
+
"thinking": { "poseType": "stand", "action": "Wait", "bubble": "Thinking..." },
|
|
163
|
+
"working": { "poseType": "stand", "action": "Arms Crossed", "bubble": "Working" }
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## How It Works
|
|
169
|
+
|
|
170
|
+
- Plugin automatically syncs status when you are working (tool calls trigger updates)
|
|
171
|
+
- Use `focus_action` to manually perform specific actions on user request
|
|
172
|
+
- Bubble text shows short status (<=5 words)
|
package/src/config.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { FocusForwarderConfig } from "./types.js";
|
|
|
3
3
|
export function parse(value: unknown): FocusForwarderConfig {
|
|
4
4
|
const config = (value ?? {}) as Partial<FocusForwarderConfig>;
|
|
5
5
|
return {
|
|
6
|
-
wsUrl: config.wsUrl ?? "ws://
|
|
6
|
+
wsUrl: config.wsUrl ?? "ws://172.18.189.177:48870/ws/openclaw",
|
|
7
7
|
enabled: config.enabled ?? true,
|
|
8
8
|
cooldownMs: config.cooldownMs ?? 15000,
|
|
9
9
|
};
|