devlens-mcp 0.3.0 → 0.3.1

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 (162) hide show
  1. package/README.md +10 -21
  2. package/docs/setup-guide.md +11 -31
  3. package/package.json +1 -1
  4. package/.claude/settings.json +0 -12
  5. package/.claude/settings.local.json +0 -17
  6. package/bin/cli.ts +0 -22
  7. package/bin/register.ts +0 -96
  8. package/dist/src/config/devlens-config.d.ts +0 -92
  9. package/dist/src/config/devlens-config.d.ts.map +0 -1
  10. package/dist/src/config/devlens-config.js +0 -70
  11. package/dist/src/config/devlens-config.js.map +0 -1
  12. package/dist/src/index.d.ts +0 -35
  13. package/dist/src/index.d.ts.map +0 -1
  14. package/dist/src/index.js +0 -8
  15. package/dist/src/index.js.map +0 -1
  16. package/dist/src/metro/cdp-client.d.ts +0 -48
  17. package/dist/src/metro/cdp-client.d.ts.map +0 -1
  18. package/dist/src/metro/cdp-client.js +0 -127
  19. package/dist/src/metro/cdp-client.js.map +0 -1
  20. package/dist/src/metro/log-collector.d.ts +0 -30
  21. package/dist/src/metro/log-collector.d.ts.map +0 -1
  22. package/dist/src/metro/log-collector.js +0 -114
  23. package/dist/src/metro/log-collector.js.map +0 -1
  24. package/dist/src/metro/metro-bridge.d.ts +0 -56
  25. package/dist/src/metro/metro-bridge.d.ts.map +0 -1
  26. package/dist/src/metro/metro-bridge.js +0 -255
  27. package/dist/src/metro/metro-bridge.js.map +0 -1
  28. package/dist/src/metro/network-inspector.d.ts +0 -34
  29. package/dist/src/metro/network-inspector.d.ts.map +0 -1
  30. package/dist/src/metro/network-inspector.js +0 -100
  31. package/dist/src/metro/network-inspector.js.map +0 -1
  32. package/dist/src/platform/android/adb.d.ts +0 -50
  33. package/dist/src/platform/android/adb.d.ts.map +0 -1
  34. package/dist/src/platform/android/adb.js +0 -137
  35. package/dist/src/platform/android/adb.js.map +0 -1
  36. package/dist/src/platform/android/android-device.d.ts +0 -21
  37. package/dist/src/platform/android/android-device.d.ts.map +0 -1
  38. package/dist/src/platform/android/android-device.js +0 -94
  39. package/dist/src/platform/android/android-device.js.map +0 -1
  40. package/dist/src/platform/android/ui-automator.d.ts +0 -17
  41. package/dist/src/platform/android/ui-automator.d.ts.map +0 -1
  42. package/dist/src/platform/android/ui-automator.js +0 -126
  43. package/dist/src/platform/android/ui-automator.js.map +0 -1
  44. package/dist/src/platform/device-manager.d.ts +0 -28
  45. package/dist/src/platform/device-manager.d.ts.map +0 -1
  46. package/dist/src/platform/device-manager.js +0 -185
  47. package/dist/src/platform/device-manager.js.map +0 -1
  48. package/dist/src/platform/device.d.ts +0 -86
  49. package/dist/src/platform/device.d.ts.map +0 -1
  50. package/dist/src/platform/device.js +0 -7
  51. package/dist/src/platform/device.js.map +0 -1
  52. package/dist/src/platform/ios/accessibility.d.ts +0 -17
  53. package/dist/src/platform/ios/accessibility.d.ts.map +0 -1
  54. package/dist/src/platform/ios/accessibility.js +0 -159
  55. package/dist/src/platform/ios/accessibility.js.map +0 -1
  56. package/dist/src/platform/ios/ios-device.d.ts +0 -22
  57. package/dist/src/platform/ios/ios-device.d.ts.map +0 -1
  58. package/dist/src/platform/ios/ios-device.js +0 -97
  59. package/dist/src/platform/ios/ios-device.js.map +0 -1
  60. package/dist/src/platform/ios/simctl.d.ts +0 -54
  61. package/dist/src/platform/ios/simctl.d.ts.map +0 -1
  62. package/dist/src/platform/ios/simctl.js +0 -192
  63. package/dist/src/platform/ios/simctl.js.map +0 -1
  64. package/dist/src/server.d.ts +0 -3
  65. package/dist/src/server.d.ts.map +0 -1
  66. package/dist/src/server.js +0 -176
  67. package/dist/src/server.js.map +0 -1
  68. package/dist/src/snapshot/formatter.d.ts +0 -18
  69. package/dist/src/snapshot/formatter.d.ts.map +0 -1
  70. package/dist/src/snapshot/formatter.js +0 -86
  71. package/dist/src/snapshot/formatter.js.map +0 -1
  72. package/dist/src/snapshot/ref-registry.d.ts +0 -67
  73. package/dist/src/snapshot/ref-registry.d.ts.map +0 -1
  74. package/dist/src/snapshot/ref-registry.js +0 -169
  75. package/dist/src/snapshot/ref-registry.js.map +0 -1
  76. package/dist/src/snapshot/snapshot-differ.d.ts +0 -57
  77. package/dist/src/snapshot/snapshot-differ.d.ts.map +0 -1
  78. package/dist/src/snapshot/snapshot-differ.js +0 -153
  79. package/dist/src/snapshot/snapshot-differ.js.map +0 -1
  80. package/dist/src/tools/app-tools.d.ts +0 -71
  81. package/dist/src/tools/app-tools.d.ts.map +0 -1
  82. package/dist/src/tools/app-tools.js +0 -97
  83. package/dist/src/tools/app-tools.js.map +0 -1
  84. package/dist/src/tools/device-tools.d.ts +0 -53
  85. package/dist/src/tools/device-tools.d.ts.map +0 -1
  86. package/dist/src/tools/device-tools.js +0 -86
  87. package/dist/src/tools/device-tools.js.map +0 -1
  88. package/dist/src/tools/ds-tools.d.ts +0 -65
  89. package/dist/src/tools/ds-tools.d.ts.map +0 -1
  90. package/dist/src/tools/ds-tools.js +0 -314
  91. package/dist/src/tools/ds-tools.js.map +0 -1
  92. package/dist/src/tools/interaction-tools.d.ts +0 -248
  93. package/dist/src/tools/interaction-tools.d.ts.map +0 -1
  94. package/dist/src/tools/interaction-tools.js +0 -391
  95. package/dist/src/tools/interaction-tools.js.map +0 -1
  96. package/dist/src/tools/metro-tools.d.ts +0 -115
  97. package/dist/src/tools/metro-tools.d.ts.map +0 -1
  98. package/dist/src/tools/metro-tools.js +0 -270
  99. package/dist/src/tools/metro-tools.js.map +0 -1
  100. package/dist/src/tools/navigation-tools.d.ts +0 -36
  101. package/dist/src/tools/navigation-tools.d.ts.map +0 -1
  102. package/dist/src/tools/navigation-tools.js +0 -60
  103. package/dist/src/tools/navigation-tools.js.map +0 -1
  104. package/dist/src/tools/screenshot-tools.d.ts +0 -298
  105. package/dist/src/tools/screenshot-tools.d.ts.map +0 -1
  106. package/dist/src/tools/screenshot-tools.js +0 -565
  107. package/dist/src/tools/screenshot-tools.js.map +0 -1
  108. package/dist/src/tools/snapshot-tools.d.ts +0 -161
  109. package/dist/src/tools/snapshot-tools.d.ts.map +0 -1
  110. package/dist/src/tools/snapshot-tools.js +0 -479
  111. package/dist/src/tools/snapshot-tools.js.map +0 -1
  112. package/dist/src/utils/image-preprocess.d.ts +0 -49
  113. package/dist/src/utils/image-preprocess.d.ts.map +0 -1
  114. package/dist/src/utils/image-preprocess.js +0 -322
  115. package/dist/src/utils/image-preprocess.js.map +0 -1
  116. package/dist/src/utils/retry.d.ts +0 -21
  117. package/dist/src/utils/retry.d.ts.map +0 -1
  118. package/dist/src/utils/retry.js +0 -33
  119. package/dist/src/utils/retry.js.map +0 -1
  120. package/dist/src/visual/comparator.d.ts +0 -51
  121. package/dist/src/visual/comparator.d.ts.map +0 -1
  122. package/dist/src/visual/comparator.js +0 -119
  123. package/dist/src/visual/comparator.js.map +0 -1
  124. package/dist/src/visual/layout-analyzer.d.ts +0 -64
  125. package/dist/src/visual/layout-analyzer.d.ts.map +0 -1
  126. package/dist/src/visual/layout-analyzer.js +0 -198
  127. package/dist/src/visual/layout-analyzer.js.map +0 -1
  128. package/dist/src/visual/screenshot.d.ts +0 -17
  129. package/dist/src/visual/screenshot.d.ts.map +0 -1
  130. package/dist/src/visual/screenshot.js +0 -39
  131. package/dist/src/visual/screenshot.js.map +0 -1
  132. package/src/config/devlens-config.ts +0 -76
  133. package/src/index.ts +0 -5
  134. package/src/metro/cdp-client.ts +0 -160
  135. package/src/metro/log-collector.ts +0 -137
  136. package/src/metro/metro-bridge.ts +0 -307
  137. package/src/metro/network-inspector.ts +0 -134
  138. package/src/platform/android/adb.ts +0 -200
  139. package/src/platform/android/android-device.ts +0 -116
  140. package/src/platform/android/ui-automator.ts +0 -141
  141. package/src/platform/device-manager.ts +0 -229
  142. package/src/platform/device.ts +0 -110
  143. package/src/platform/ios/accessibility.ts +0 -189
  144. package/src/platform/ios/ios-device.ts +0 -116
  145. package/src/platform/ios/simctl.ts +0 -244
  146. package/src/server.ts +0 -228
  147. package/src/snapshot/formatter.ts +0 -102
  148. package/src/snapshot/ref-registry.ts +0 -230
  149. package/src/snapshot/snapshot-differ.ts +0 -220
  150. package/src/tools/app-tools.ts +0 -111
  151. package/src/tools/device-tools.ts +0 -96
  152. package/src/tools/ds-tools.ts +0 -395
  153. package/src/tools/interaction-tools.ts +0 -467
  154. package/src/tools/metro-tools.ts +0 -320
  155. package/src/tools/navigation-tools.ts +0 -71
  156. package/src/tools/screenshot-tools.ts +0 -698
  157. package/src/tools/snapshot-tools.ts +0 -585
  158. package/src/utils/image-preprocess.ts +0 -430
  159. package/src/utils/retry.ts +0 -51
  160. package/src/visual/comparator.ts +0 -191
  161. package/src/visual/layout-analyzer.ts +0 -283
  162. package/src/visual/screenshot.ts +0 -49
@@ -1,220 +0,0 @@
1
- import type { SnapshotNode } from "../platform/device.js";
2
-
3
- /**
4
- * Incremental snapshot differ — compares two snapshot trees and returns
5
- * only the changed portions. Saves 60-80% tokens in iterative workflows.
6
- */
7
-
8
- export interface SnapshotDiff {
9
- /** Nodes that were added since the last snapshot */
10
- added: SnapshotNode[];
11
- /** Nodes that were removed since the last snapshot */
12
- removed: SnapshotNode[];
13
- /** Nodes whose properties changed (text, value, focus, etc.) */
14
- changed: Array<{
15
- node: SnapshotNode;
16
- changes: string[];
17
- }>;
18
- /** Elements that are the same content but moved to a different position */
19
- moved: Array<{
20
- node: SnapshotNode;
21
- from: { x: number; y: number };
22
- to: { x: number; y: number };
23
- deltaX: number;
24
- deltaY: number;
25
- }>;
26
- /** Elements that kept position but changed size */
27
- resized: Array<{
28
- node: SnapshotNode;
29
- from: { width: number; height: number };
30
- to: { width: number; height: number };
31
- }>;
32
- /** Whether the tree structure changed significantly */
33
- structuralChange: boolean;
34
- }
35
-
36
- /**
37
- * Content-based signature — used for element identity.
38
- * Intentionally excludes position/size so moved elements are matched
39
- * to their previous version rather than treated as add+remove.
40
- */
41
- function contentSignature(node: SnapshotNode): string {
42
- return [node.type, node.resourceId || "", node.text || "", node.label || ""].join("|");
43
- }
44
-
45
- /**
46
- * Compute a diff between two snapshot trees.
47
- *
48
- * Identity matching: uses content signature (type + resourceId + text + label).
49
- * Elements with matching content but different position are reported as "moved".
50
- * Elements with matching content+position but different size are reported as "resized".
51
- * Elements present in current but not previous are "added".
52
- * Elements present in previous but not current are "removed".
53
- */
54
- export function diffSnapshots(
55
- previous: SnapshotNode,
56
- current: SnapshotNode
57
- ): SnapshotDiff {
58
- const prevNodes = flattenTree(previous);
59
- const currNodes = flattenTree(current);
60
-
61
- const prevByContent = new Map<string, SnapshotNode>();
62
- for (const node of prevNodes) {
63
- prevByContent.set(contentSignature(node), node);
64
- }
65
-
66
- const currByContent = new Map<string, SnapshotNode>();
67
- for (const node of currNodes) {
68
- currByContent.set(contentSignature(node), node);
69
- }
70
-
71
- const added: SnapshotNode[] = [];
72
- const removed: SnapshotNode[] = [];
73
- const changed: Array<{ node: SnapshotNode; changes: string[] }> = [];
74
- const moved: SnapshotDiff["moved"] = [];
75
- const resized: SnapshotDiff["resized"] = [];
76
-
77
- // Pass 1: find added, moved, resized, changed nodes
78
- for (const [sig, currNode] of currByContent) {
79
- const prevNode = prevByContent.get(sig);
80
-
81
- if (!prevNode) {
82
- added.push(currNode);
83
- continue;
84
- }
85
-
86
- const posChanged =
87
- prevNode.bounds.x !== currNode.bounds.x ||
88
- prevNode.bounds.y !== currNode.bounds.y;
89
-
90
- const sizeChanged =
91
- prevNode.bounds.width !== currNode.bounds.width ||
92
- prevNode.bounds.height !== currNode.bounds.height;
93
-
94
- if (posChanged) {
95
- moved.push({
96
- node: currNode,
97
- from: { x: prevNode.bounds.x, y: prevNode.bounds.y },
98
- to: { x: currNode.bounds.x, y: currNode.bounds.y },
99
- deltaX: currNode.bounds.x - prevNode.bounds.x,
100
- deltaY: currNode.bounds.y - prevNode.bounds.y,
101
- });
102
- }
103
-
104
- if (sizeChanged) {
105
- resized.push({
106
- node: currNode,
107
- from: { width: prevNode.bounds.width, height: prevNode.bounds.height },
108
- to: { width: currNode.bounds.width, height: currNode.bounds.height },
109
- });
110
- }
111
-
112
- const changes = detectChanges(prevNode, currNode);
113
- if (changes.length > 0) {
114
- changed.push({ node: currNode, changes });
115
- }
116
- }
117
-
118
- // Pass 2: find removed nodes
119
- for (const [sig, node] of prevByContent) {
120
- if (!currByContent.has(sig)) {
121
- removed.push(node);
122
- }
123
- }
124
-
125
- const structuralChange =
126
- added.length > prevNodes.length * 0.3 ||
127
- removed.length > prevNodes.length * 0.3;
128
-
129
- return { added, removed, changed, moved, resized, structuralChange };
130
- }
131
-
132
- /** Detect property-level changes between two nodes with the same identity */
133
- function detectChanges(prev: SnapshotNode, curr: SnapshotNode): string[] {
134
- const changes: string[] = [];
135
-
136
- if (prev.text !== curr.text) {
137
- changes.push(`text: "${prev.text}" → "${curr.text}"`);
138
- }
139
- if (prev.value !== curr.value) {
140
- changes.push(`value: "${prev.value}" → "${curr.value}"`);
141
- }
142
- if (prev.focused !== curr.focused) {
143
- changes.push(`focused: ${prev.focused} → ${curr.focused}`);
144
- }
145
- if (prev.enabled !== curr.enabled) {
146
- changes.push(`enabled: ${prev.enabled} → ${curr.enabled}`);
147
- }
148
- if (prev.label !== curr.label) {
149
- changes.push(`label: "${prev.label}" → "${curr.label}"`);
150
- }
151
-
152
- return changes;
153
- }
154
-
155
- /** Flatten a tree into a list of all nodes */
156
- function flattenTree(node: SnapshotNode): SnapshotNode[] {
157
- const result: SnapshotNode[] = [node];
158
- for (const child of node.children) {
159
- result.push(...flattenTree(child));
160
- }
161
- return result;
162
- }
163
-
164
- /** Format a diff for LLM consumption */
165
- export function formatDiff(diff: SnapshotDiff): string {
166
- if (diff.structuralChange) {
167
- return "[Major structural change — use full snapshot]";
168
- }
169
-
170
- const lines: string[] = [];
171
-
172
- if (diff.added.length > 0) {
173
- lines.push("ADDED:");
174
- for (const node of diff.added) {
175
- lines.push(` + ${node.type} ${node.text ? `"${node.text}"` : ""}`);
176
- }
177
- }
178
-
179
- if (diff.removed.length > 0) {
180
- lines.push("REMOVED:");
181
- for (const node of diff.removed) {
182
- lines.push(` - ${node.type} ${node.text ? `"${node.text}"` : ""}`);
183
- }
184
- }
185
-
186
- if (diff.moved.length > 0) {
187
- lines.push("MOVED:");
188
- for (const m of diff.moved) {
189
- const label = m.node.text ? `"${m.node.text}"` : m.node.type;
190
- const dx = m.deltaX > 0 ? `+${m.deltaX}` : `${m.deltaX}`;
191
- const dy = m.deltaY > 0 ? `+${m.deltaY}` : `${m.deltaY}`;
192
- lines.push(` -> ${label} moved by (${dx}, ${dy})px`);
193
- }
194
- }
195
-
196
- if (diff.resized.length > 0) {
197
- lines.push("RESIZED:");
198
- for (const r of diff.resized) {
199
- const label = r.node.text ? `"${r.node.text}"` : r.node.type;
200
- lines.push(
201
- ` <> ${label}: ${r.from.width}x${r.from.height} → ${r.to.width}x${r.to.height}`
202
- );
203
- }
204
- }
205
-
206
- if (diff.changed.length > 0) {
207
- lines.push("CHANGED:");
208
- for (const { node, changes } of diff.changed) {
209
- lines.push(
210
- ` ~ ${node.type} ${node.text ? `"${node.text}"` : ""}: ${changes.join(", ")}`
211
- );
212
- }
213
- }
214
-
215
- if (lines.length === 0) {
216
- return "[No changes detected]";
217
- }
218
-
219
- return lines.join("\n");
220
- }
@@ -1,111 +0,0 @@
1
- import { z } from "zod";
2
- import type { DeviceManager } from "../platform/device-manager.js";
3
-
4
- export const appToolSchemas = {
5
- devlens_launch_app: {
6
- description:
7
- "Launch an app on the device by its bundle ID (iOS) or package name (Android). The app must already be installed.",
8
- parameters: z.object({
9
- appId: z
10
- .string()
11
- .describe(
12
- "Bundle ID (iOS, e.g., com.example.app) or package name (Android, e.g., com.example.app)"
13
- ),
14
- }),
15
- },
16
- devlens_terminate_app: {
17
- description: "Force stop a running app on the device.",
18
- parameters: z.object({
19
- appId: z.string().describe("Bundle ID or package name of the app to stop"),
20
- }),
21
- },
22
- devlens_install_app: {
23
- description:
24
- "Install an app from a local file path. Supports .apk (Android), .app/.ipa (iOS).",
25
- parameters: z.object({
26
- path: z
27
- .string()
28
- .describe("Local file path to the app binary (.apk, .app, or .ipa)"),
29
- }),
30
- },
31
- devlens_list_apps: {
32
- description:
33
- "List all third-party apps installed on the device. Returns app IDs and names.",
34
- parameters: z.object({}),
35
- },
36
- };
37
-
38
- export function createAppToolHandlers(deviceManager: DeviceManager) {
39
- return {
40
- devlens_launch_app: async (params: { appId: string }) => {
41
- const device = await deviceManager.getDevice();
42
- await device.launchApp(params.appId);
43
-
44
- return {
45
- content: [
46
- {
47
- type: "text" as const,
48
- text: `Launched app: ${params.appId}`,
49
- },
50
- ],
51
- };
52
- },
53
-
54
- devlens_terminate_app: async (params: { appId: string }) => {
55
- const device = await deviceManager.getDevice();
56
- await device.terminateApp(params.appId);
57
-
58
- return {
59
- content: [
60
- {
61
- type: "text" as const,
62
- text: `Terminated app: ${params.appId}`,
63
- },
64
- ],
65
- };
66
- },
67
-
68
- devlens_install_app: async (params: { path: string }) => {
69
- const device = await deviceManager.getDevice();
70
- await device.installApp(params.path);
71
-
72
- return {
73
- content: [
74
- {
75
- type: "text" as const,
76
- text: `Installed app from: ${params.path}`,
77
- },
78
- ],
79
- };
80
- },
81
-
82
- devlens_list_apps: async () => {
83
- const device = await deviceManager.getDevice();
84
- const apps = await device.listApps();
85
-
86
- if (apps.length === 0) {
87
- return {
88
- content: [
89
- {
90
- type: "text" as const,
91
- text: "No third-party apps found on the device.",
92
- },
93
- ],
94
- };
95
- }
96
-
97
- const lines = apps.map(
98
- (app) => `${app.name} — ${app.appId}${app.isRunning ? " (running)" : ""}`
99
- );
100
-
101
- return {
102
- content: [
103
- {
104
- type: "text" as const,
105
- text: `Installed apps (${apps.length}):\n\n${lines.join("\n")}`,
106
- },
107
- ],
108
- };
109
- },
110
- };
111
- }
@@ -1,96 +0,0 @@
1
- import { z } from "zod";
2
- import type { DeviceManager } from "../platform/device-manager.js";
3
-
4
- export const deviceToolSchemas = {
5
- devlens_list_devices: {
6
- description:
7
- "List all running iOS Simulators and Android Emulators. Returns device IDs, names, platforms, and OS versions.",
8
- parameters: z.object({}),
9
- },
10
- devlens_device_info: {
11
- description:
12
- "Get detailed information about a specific device: screen size, OS version, orientation. If no deviceId is provided, uses the first available device.",
13
- parameters: z.object({
14
- deviceId: z
15
- .string()
16
- .optional()
17
- .describe("Device ID from devlens_list_devices. Optional."),
18
- }),
19
- },
20
- devlens_set_orientation: {
21
- description: "Set the device orientation to portrait or landscape.",
22
- parameters: z.object({
23
- orientation: z
24
- .enum(["portrait", "landscape"])
25
- .describe("Target orientation"),
26
- }),
27
- },
28
- };
29
-
30
- export function createDeviceToolHandlers(deviceManager: DeviceManager) {
31
- return {
32
- devlens_list_devices: async () => {
33
- const devices = await deviceManager.discoverDevices();
34
- if (devices.length === 0) {
35
- return {
36
- content: [
37
- {
38
- type: "text" as const,
39
- text: "No running simulators or emulators found.\n\nTo start a device:\n- Android: Open Android Studio → Device Manager → Start an emulator\n- iOS: Open Xcode → Window → Devices and Simulators → Boot a simulator",
40
- },
41
- ],
42
- };
43
- }
44
-
45
- const lines = devices.map(
46
- (d) =>
47
- `${d.isBooted ? "●" : "○"} ${d.name} (${d.platform}, ${d.osVersion}) — id: ${d.id}`
48
- );
49
-
50
- return {
51
- content: [
52
- {
53
- type: "text" as const,
54
- text: `Found ${devices.length} device(s):\n\n${lines.join("\n")}`,
55
- },
56
- ],
57
- };
58
- },
59
-
60
- devlens_device_info: async (params: { deviceId?: string }) => {
61
- const device = await deviceManager.getDevice(params.deviceId);
62
- const info = await device.getInfo();
63
-
64
- return {
65
- content: [
66
- {
67
- type: "text" as const,
68
- text: [
69
- `Device: ${info.name}`,
70
- `Platform: ${info.platform}`,
71
- `OS Version: ${info.osVersion}`,
72
- `Screen: ${info.screenWidth}x${info.screenHeight}`,
73
- `Orientation: ${info.orientation}`,
74
- `ID: ${info.id}`,
75
- ].join("\n"),
76
- },
77
- ],
78
- };
79
- },
80
-
81
- devlens_set_orientation: async (params: {
82
- orientation: "portrait" | "landscape";
83
- }) => {
84
- const device = await deviceManager.getDevice();
85
- await device.setOrientation(params.orientation);
86
- return {
87
- content: [
88
- {
89
- type: "text" as const,
90
- text: `Orientation set to ${params.orientation}.`,
91
- },
92
- ],
93
- };
94
- },
95
- };
96
- }