cortico-world-hands 0.20.68 → 0.20.69

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.
Files changed (2) hide show
  1. package/dist/index.js +9 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1193,9 +1193,8 @@ var EyesClient = class {
1193
1193
  }
1194
1194
  /** 只截一块并放大:x,y,w,h 是真实像素。 */
1195
1195
  async zoom(x, y, w, h, maxWidth = 1080, quality = 80) {
1196
- const cfg = this.cfg();
1197
1196
  const path = `/screen.jpg?x=${Math.max(0, Math.round(x))}&y=${Math.max(0, Math.round(y))}&w=${Math.max(8, Math.round(w))}&h=${Math.max(8, Math.round(h))}&max=${Math.round(maxWidth)}&q=${Math.round(quality)}`;
1198
- const res = await get(this.handPort(), path, 12e3);
1197
+ const res = await get(this.port(), path, 12e3);
1199
1198
  if (res.status !== 200 || res.body.length === 0) return null;
1200
1199
  return {
1201
1200
  bytes: new Uint8Array(res.body),
@@ -1260,6 +1259,14 @@ var describeCommand = (command) => {
1260
1259
  var Hands = class {
1261
1260
  /** 「我们的日子」:新增一条。 */
1262
1261
  /** 整屏切四块放大:交给眼睛那边做。 */
1262
+ /** 健康检查:交给眼睛那边。 */
1263
+ async health() {
1264
+ return this.eyes.health();
1265
+ }
1266
+ /** 局部放大:交给眼睛那边。 */
1267
+ async zoom(x, y, w, h, maxWidth = 1080, quality = 80) {
1268
+ return this.eyes.zoom(x, y, w, h, maxWidth, quality);
1269
+ }
1263
1270
  async quadFrame(maxWidth = 1440, quality = 76) {
1264
1271
  return this.eyes.quadFrame(maxWidth, quality);
1265
1272
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cortico-world-hands",
3
- "version": "0.20.68",
3
+ "version": "0.20.69",
4
4
  "type": "module",
5
5
  "description": "Cortico World: hands for the desktop pet — looks at the phone screen, then taps, swipes, pinches, drags, types and presses keys through whatever actuator the device actually has",
6
6
  "license": "MIT",