mudra-skills 3.0.3 → 3.0.5
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 +2 -5
- package/skills/mudra-master/mudra-preview/SKILL.md +27 -18
- package/skills/mudra-master/mudra-preview/assets/mudra-ultimate-template.html +997 -891
- package/skills/mudra-master/mudra-preview/references/agent_protocol.json +191 -124
- package/skills/mudra-master/mudra-preview/references/prompt.md +182 -197
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mudra-skills",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.5",
|
|
4
4
|
"description": "Mudra Band skills for Claude Code, Codex, and Antigravity — 2D, 3D/XR, or auto-classified",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -24,8 +24,5 @@
|
|
|
24
24
|
"gestures",
|
|
25
25
|
"xr",
|
|
26
26
|
"webxr"
|
|
27
|
-
]
|
|
28
|
-
"dependencies": {
|
|
29
|
-
"mudra-skills": "^3.0.0"
|
|
30
|
-
}
|
|
27
|
+
]
|
|
31
28
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mudra-preview
|
|
3
|
-
version:
|
|
3
|
+
version: 3.0.0
|
|
4
4
|
description: Generate a working Mudra Band interactive app preview as a single-file HTML. Use when the user describes a Mudra-controlled experience (gesture, pressure, navigation, IMU, SNC), wants to prototype a Mudra Companion app, or asks to build/preview a Mudra app.
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -9,7 +9,7 @@ description: Generate a working Mudra Band interactive app preview as a single-f
|
|
|
9
9
|
Generate a complete, working single-file HTML app controlled by Mudra Band signals.
|
|
10
10
|
|
|
11
11
|
**Mandatory feature :** Every generated app MUST
|
|
12
|
-
include a Manual/Mudra **Mode toggle** as defined in `references/
|
|
12
|
+
include a Manual/Mudra **Mode toggle** as defined in `references/prompt.md`
|
|
13
13
|
§ "Mode Toggle (Manual / Mudra) — Required". Manual is the default; Mudra
|
|
14
14
|
opens a single WebSocket lazily and disables the simulator panel so signals
|
|
15
15
|
come only from the band.
|
|
@@ -24,26 +24,32 @@ no banner, no modal.
|
|
|
24
24
|
**"Created by Mudra"** — never "Created with Mudra Studio" or any
|
|
25
25
|
other variant.
|
|
26
26
|
|
|
27
|
-
**Mandatory feature:** Connection state MUST reflect
|
|
28
|
-
the WebSocket. The Companion service accepts socket
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
27
|
+
**Mandatory feature :** Connection state MUST reflect
|
|
28
|
+
the **band**, not the WebSocket. The Companion service accepts socket
|
|
29
|
+
connections even when no band is paired. Every generated app MUST:
|
|
30
|
+
1. Send `{command:"get_status"}` immediately in `ws.onopen` (no waiting for any
|
|
31
|
+
server-initiated frame — the new server sends none).
|
|
32
|
+
2. Poll `get_status` every 2 s while in Mudra mode.
|
|
33
|
+
3. Use the rule **`device.firmware && device.serial_number` both non-null** to
|
|
34
|
+
determine band-connected (not `device.state` alone).
|
|
35
|
+
4. Display a **6-state connection label**: `Connecting…` / `Mudra connected`
|
|
36
|
+
(with hand chip LEFT/RIGHT) / `WebSocket only` (orange `#eab308`, hand
|
|
37
|
+
`None`) / `Reconnecting…` / `Already in use by another tab` (terminal).
|
|
38
|
+
5. Auto-reconnect with backoff [1, 2, 5, 10]s on non-conflict WebSocket drops.
|
|
39
|
+
Do NOT retry after `client_already_connected` — show the terminal message.
|
|
34
40
|
|
|
35
41
|
The canonical protocol is in `references/agent_protocol.json`.
|
|
36
42
|
|
|
37
43
|
## Steps
|
|
38
44
|
|
|
39
|
-
1. **Read the full instructions** from `references/
|
|
45
|
+
1. **Read the full instructions** from `references/prompt.md` inside the skill base directory. That file contains the complete protocol contract, signal compatibility rules, the Mode Toggle architecture (mandatory), build defaults, and sample catalog — follow all of it.
|
|
40
46
|
|
|
41
47
|
2. **Infer intent** from the user's description (or the args passed to this skill). Fill gaps with smart defaults. Ask only if there is genuine ambiguity (e.g., `gesture` vs `pressure`, `navigation` vs `nav_direction`, or directional motion vs IMU+Biometric bundle).
|
|
42
48
|
|
|
43
|
-
3. **Select the best-matching template** from `assets/` inside the skill base directory. Use the selection rule from `references/
|
|
49
|
+
3. **Select the best-matching template** from `assets/` inside the skill base directory. Use the selection rule from `references/prompt.md` (motion mode → interaction pattern → signal overlap).
|
|
44
50
|
|
|
45
51
|
4. **Generate the app** as a single self-contained HTML file:
|
|
46
|
-
- Follow every rule in `references/
|
|
52
|
+
- Follow every rule in `references/prompt.md` (protocol contract, signal compatibility, mock WebSocket, theme, fallbacks)
|
|
47
53
|
- Choose a color palette that matches the concept — never default to dark unless the concept calls for it
|
|
48
54
|
- Include the Mudra badge, connection indicator, telemetry HUD, simulator panel (see below), and keyboard fallbacks
|
|
49
55
|
|
|
@@ -127,24 +133,27 @@ Rules:
|
|
|
127
133
|
`nav_direction` — pick directional motion OR the IMU+Biometric bundle,
|
|
128
134
|
never both.
|
|
129
135
|
- Other gesture subtypes (`twist`, `double_twist`, etc.) and other
|
|
130
|
-
signals (`button`, `imu_acc`, `imu_gyro`, `snc`) are
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
`references/
|
|
136
|
+
signals (`button`, `imu_acc`, `imu_gyro`, `snc`) are **off by
|
|
137
|
+
default**. Only include them when the user's prompt names them,
|
|
138
|
+
names a synonym from the Signal Inference table in
|
|
139
|
+
`references/prompt.md` § "Signal Inference Reference", or describes
|
|
134
140
|
an interaction that genuinely cannot be expressed with the defaults
|
|
135
141
|
(e.g., "tilt to steer" → IMU+Biometric bundle; "hold to charge" →
|
|
136
142
|
`button`).
|
|
143
|
+
- Battery level and charging state are available via `device.battery` / `device.charging` in the
|
|
144
|
+
`get_status` / `get_device_info` response.
|
|
137
145
|
- The simulator panel must mirror whichever subset the app actually
|
|
138
146
|
subscribes to — do not render buttons for signals that are not wired.
|
|
139
147
|
|
|
140
148
|
## Quick Reference
|
|
141
149
|
|
|
142
150
|
- WebSocket endpoint: `ws://127.0.0.1:8766` (bare URL — NOT `/events`)
|
|
143
|
-
- Mode toggle (Manual / Mudra) is **mandatory** in every generated app — see `references/
|
|
151
|
+
- Mode toggle (Manual / Mudra) is **mandatory** in every generated app — see `references/prompt.md` § "Mode Toggle (Manual / Mudra) — Required"
|
|
144
152
|
- Lazy WS lifecycle: open on Manual→Mudra, close on Mudra→Manual. Manual mode opens NO WebSocket.
|
|
145
153
|
- Subscribe one signal per command: `{ "command": "subscribe", "signal": "<name>" }` — singular `signal`, never `signals`, never an array
|
|
146
154
|
- Motion modes are mutually exclusive: Pointer (`navigation`+`button`) / Direction (`nav_direction`) / IMU+Biometric (`imu_acc`+`imu_gyro`+`snc`, always all three together)
|
|
147
155
|
- IMU+Biometric bundle: `imu_acc`, `imu_gyro`, `snc` always subscribed together — never partially. The bundle is mutually exclusive with `navigation` and `nav_direction`.
|
|
148
156
|
- `gesture` and `pressure` are mutually exclusive — never combine them
|
|
149
|
-
-
|
|
157
|
+
- `button` combines freely with `gesture`, `pressure`, `snc`, `imu_acc`, `imu_gyro` (subject to the Pointer/Direction/IMU motion-mode XOR — `button` belongs to Pointer mode and never combines with `nav_direction`).
|
|
158
|
+
- **Navigation sensitivity is gentle by default**: keyboard `step = 3`, sim button `±3`, cursor multiplier `0.002`. Raise only when the prompt explicitly asks for fast/snappy movement. See `references/prompt.md` § "Navigation sensitivity defaults".
|
|
150
159
|
- Canonical protocol JSON: `references/agent_protocol.json`
|