@metatell/bot-cli 0.0.10 → 0.0.11

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.
@@ -1 +1 @@
1
- {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/utils/commands.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAEvD,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf;AAED,qBAAa,aAAa;IAClB,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;IAuD5E,OAAO,CAAC,QAAQ;YAuBF,GAAG;YAWH,IAAI;YAkBJ,IAAI;YAwCJ,MAAM;YAiBN,SAAS;IASvB,OAAO,CAAC,UAAU;YAYJ,QAAQ;YAWR,YAAY;YAoBZ,UAAU;YAWV,aAAa;YAuBb,aAAa;YAeb,cAAc;CAW7B"}
1
+ {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/utils/commands.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAEvD,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf;AAED,qBAAa,aAAa;IAClB,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;IAuD5E,OAAO,CAAC,QAAQ;YAuBF,GAAG;YAWH,IAAI;YAkBJ,IAAI;YAoEJ,MAAM;YAiBN,SAAS;IASvB,OAAO,CAAC,UAAU;YAYJ,QAAQ;YAWR,YAAY;YAoBZ,UAAU;YAWV,aAAa;YAuBb,aAAa;YAiBb,cAAc;CAW7B"}
@@ -99,9 +99,31 @@ Available commands:
99
99
  if (!targetUser) {
100
100
  return { success: false, message: `User not found: ${username}` };
101
101
  }
102
- // TODO: ユーザーの位置を取得して見る機能はSDKに未実装
103
- console.log(`[Looking at] ${targetUser.name}`);
104
- return { success: true, message: 'Looking at user (position tracking not yet implemented)' };
102
+ const roomWithPosition = client.room;
103
+ if (typeof roomWithPosition.getUserPosition !== 'function') {
104
+ return {
105
+ success: false,
106
+ message: 'Looking at users is not supported by this SDK version.',
107
+ };
108
+ }
109
+ try {
110
+ const position = await roomWithPosition.getUserPosition(targetUser.id);
111
+ if (!position) {
112
+ return {
113
+ success: false,
114
+ message: `Could not get position for user: ${targetUser.name ?? targetUser.id}`,
115
+ };
116
+ }
117
+ await client.avatar.lookAt(position);
118
+ console.log(`[Looking at] ${targetUser.name}`);
119
+ return { success: true };
120
+ }
121
+ catch (_error) {
122
+ return {
123
+ success: false,
124
+ message: `Failed to look at user: ${targetUser.name ?? targetUser.id}`,
125
+ };
126
+ }
105
127
  }
106
128
  // 座標を見る場合
107
129
  if (args.length !== 3) {
@@ -212,11 +234,13 @@ Available commands:
212
234
  loop: true,
213
235
  });
214
236
  console.log('[Stopped animation]');
215
- return { success: true };
216
- }
217
- catch {
218
237
  return { success: true, message: 'Animation stopped' };
219
238
  }
239
+ catch (error) {
240
+ const message = error instanceof Error ? error.message : 'Unknown error';
241
+ console.error('[Failed to stop animation]', message);
242
+ return { success: false, message: `Failed to stop animation: ${message}` };
243
+ }
220
244
  }
221
245
  async listAnimations(client) {
222
246
  const animations = await client.avatar.getAvailableAnimations();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metatell/bot-cli",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "CLI tool for Metatell bot development and testing",
5
5
  "type": "module",
6
6
  "bin": {
@@ -17,16 +17,16 @@
17
17
  "README.md"
18
18
  ],
19
19
  "dependencies": {
20
- "commander": "12.0.0",
21
- "ink": "5.0.1",
22
- "react": "18.3.1",
23
- "@metatell/bot-sdk": "0.0.10"
20
+ "commander": "12.1.0",
21
+ "ink": "6.5.0",
22
+ "react": "19.1.1",
23
+ "@metatell/bot-sdk": "0.0.11"
24
24
  },
25
25
  "devDependencies": {
26
- "@types/node": "22.17.2",
27
- "@types/react": "18.3.12",
28
- "tsx": "4.20.5",
29
- "typescript": "5.6.3"
26
+ "@types/node": "22.19.1",
27
+ "@types/react": "19.1.13",
28
+ "tsx": "4.21.0",
29
+ "typescript": "5.9.2"
30
30
  },
31
31
  "repository": {
32
32
  "type": "git",