capacitor-mobile-claw 1.0.0

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 (172) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +231 -0
  3. package/dist/esm/definitions.d.ts +226 -0
  4. package/dist/esm/definitions.d.ts.map +1 -0
  5. package/dist/esm/definitions.js +16 -0
  6. package/dist/esm/definitions.js.map +1 -0
  7. package/dist/esm/engine.d.ts +93 -0
  8. package/dist/esm/engine.d.ts.map +1 -0
  9. package/dist/esm/engine.js +332 -0
  10. package/dist/esm/engine.js.map +1 -0
  11. package/dist/esm/index.d.ts +24 -0
  12. package/dist/esm/index.d.ts.map +1 -0
  13. package/dist/esm/index.js +25 -0
  14. package/dist/esm/index.js.map +1 -0
  15. package/dist/esm/mcp/mcp-server-manager.d.ts +33 -0
  16. package/dist/esm/mcp/mcp-server-manager.d.ts.map +1 -0
  17. package/dist/esm/mcp/mcp-server-manager.js +99 -0
  18. package/dist/esm/mcp/mcp-server-manager.js.map +1 -0
  19. package/dist/esm/mcp/server/device-mcp-server.d.ts +43 -0
  20. package/dist/esm/mcp/server/device-mcp-server.d.ts.map +1 -0
  21. package/dist/esm/mcp/server/device-mcp-server.js +52 -0
  22. package/dist/esm/mcp/server/device-mcp-server.js.map +1 -0
  23. package/dist/esm/mcp/tools/app-state.tools.d.ts +3 -0
  24. package/dist/esm/mcp/tools/app-state.tools.d.ts.map +1 -0
  25. package/dist/esm/mcp/tools/app-state.tools.js +22 -0
  26. package/dist/esm/mcp/tools/app-state.tools.js.map +1 -0
  27. package/dist/esm/mcp/tools/barcode.tools.d.ts +3 -0
  28. package/dist/esm/mcp/tools/barcode.tools.d.ts.map +1 -0
  29. package/dist/esm/mcp/tools/barcode.tools.js +29 -0
  30. package/dist/esm/mcp/tools/barcode.tools.js.map +1 -0
  31. package/dist/esm/mcp/tools/biometric.tools.d.ts +3 -0
  32. package/dist/esm/mcp/tools/biometric.tools.d.ts.map +1 -0
  33. package/dist/esm/mcp/tools/biometric.tools.js +33 -0
  34. package/dist/esm/mcp/tools/biometric.tools.js.map +1 -0
  35. package/dist/esm/mcp/tools/bluetooth.tools.d.ts +3 -0
  36. package/dist/esm/mcp/tools/bluetooth.tools.d.ts.map +1 -0
  37. package/dist/esm/mcp/tools/bluetooth.tools.js +95 -0
  38. package/dist/esm/mcp/tools/bluetooth.tools.js.map +1 -0
  39. package/dist/esm/mcp/tools/camera.tools.d.ts +3 -0
  40. package/dist/esm/mcp/tools/camera.tools.d.ts.map +1 -0
  41. package/dist/esm/mcp/tools/camera.tools.js +36 -0
  42. package/dist/esm/mcp/tools/camera.tools.js.map +1 -0
  43. package/dist/esm/mcp/tools/categories.d.ts +22 -0
  44. package/dist/esm/mcp/tools/categories.d.ts.map +1 -0
  45. package/dist/esm/mcp/tools/categories.js +242 -0
  46. package/dist/esm/mcp/tools/categories.js.map +1 -0
  47. package/dist/esm/mcp/tools/clipboard.tools.d.ts +3 -0
  48. package/dist/esm/mcp/tools/clipboard.tools.d.ts.map +1 -0
  49. package/dist/esm/mcp/tools/clipboard.tools.js +22 -0
  50. package/dist/esm/mcp/tools/clipboard.tools.js.map +1 -0
  51. package/dist/esm/mcp/tools/contacts.tools.d.ts +3 -0
  52. package/dist/esm/mcp/tools/contacts.tools.d.ts.map +1 -0
  53. package/dist/esm/mcp/tools/contacts.tools.js +58 -0
  54. package/dist/esm/mcp/tools/contacts.tools.js.map +1 -0
  55. package/dist/esm/mcp/tools/device-info.tools.d.ts +3 -0
  56. package/dist/esm/mcp/tools/device-info.tools.d.ts.map +1 -0
  57. package/dist/esm/mcp/tools/device-info.tools.js +39 -0
  58. package/dist/esm/mcp/tools/device-info.tools.js.map +1 -0
  59. package/dist/esm/mcp/tools/discovery.tools.d.ts +3 -0
  60. package/dist/esm/mcp/tools/discovery.tools.d.ts.map +1 -0
  61. package/dist/esm/mcp/tools/discovery.tools.js +41 -0
  62. package/dist/esm/mcp/tools/discovery.tools.js.map +1 -0
  63. package/dist/esm/mcp/tools/geolocation.tools.d.ts +3 -0
  64. package/dist/esm/mcp/tools/geolocation.tools.d.ts.map +1 -0
  65. package/dist/esm/mcp/tools/geolocation.tools.js +25 -0
  66. package/dist/esm/mcp/tools/geolocation.tools.js.map +1 -0
  67. package/dist/esm/mcp/tools/haptics.tools.d.ts +3 -0
  68. package/dist/esm/mcp/tools/haptics.tools.d.ts.map +1 -0
  69. package/dist/esm/mcp/tools/haptics.tools.js +41 -0
  70. package/dist/esm/mcp/tools/haptics.tools.js.map +1 -0
  71. package/dist/esm/mcp/tools/health.tools.d.ts +3 -0
  72. package/dist/esm/mcp/tools/health.tools.d.ts.map +1 -0
  73. package/dist/esm/mcp/tools/health.tools.js +38 -0
  74. package/dist/esm/mcp/tools/health.tools.js.map +1 -0
  75. package/dist/esm/mcp/tools/http.tools.d.ts +3 -0
  76. package/dist/esm/mcp/tools/http.tools.d.ts.map +1 -0
  77. package/dist/esm/mcp/tools/http.tools.js +24 -0
  78. package/dist/esm/mcp/tools/http.tools.js.map +1 -0
  79. package/dist/esm/mcp/tools/index.d.ts +10 -0
  80. package/dist/esm/mcp/tools/index.d.ts.map +1 -0
  81. package/dist/esm/mcp/tools/index.js +70 -0
  82. package/dist/esm/mcp/tools/index.js.map +1 -0
  83. package/dist/esm/mcp/tools/keep-awake.tools.d.ts +3 -0
  84. package/dist/esm/mcp/tools/keep-awake.tools.d.ts.map +1 -0
  85. package/dist/esm/mcp/tools/keep-awake.tools.js +23 -0
  86. package/dist/esm/mcp/tools/keep-awake.tools.js.map +1 -0
  87. package/dist/esm/mcp/tools/motion-sensors.tools.d.ts +3 -0
  88. package/dist/esm/mcp/tools/motion-sensors.tools.d.ts.map +1 -0
  89. package/dist/esm/mcp/tools/motion-sensors.tools.js +60 -0
  90. package/dist/esm/mcp/tools/motion-sensors.tools.js.map +1 -0
  91. package/dist/esm/mcp/tools/network-status.tools.d.ts +3 -0
  92. package/dist/esm/mcp/tools/network-status.tools.d.ts.map +1 -0
  93. package/dist/esm/mcp/tools/network-status.tools.js +16 -0
  94. package/dist/esm/mcp/tools/network-status.tools.js.map +1 -0
  95. package/dist/esm/mcp/tools/nfc.tools.d.ts +3 -0
  96. package/dist/esm/mcp/tools/nfc.tools.d.ts.map +1 -0
  97. package/dist/esm/mcp/tools/nfc.tools.js +52 -0
  98. package/dist/esm/mcp/tools/nfc.tools.js.map +1 -0
  99. package/dist/esm/mcp/tools/notifications.tools.d.ts +3 -0
  100. package/dist/esm/mcp/tools/notifications.tools.d.ts.map +1 -0
  101. package/dist/esm/mcp/tools/notifications.tools.js +30 -0
  102. package/dist/esm/mcp/tools/notifications.tools.js.map +1 -0
  103. package/dist/esm/mcp/tools/push-notifications.tools.d.ts +3 -0
  104. package/dist/esm/mcp/tools/push-notifications.tools.d.ts.map +1 -0
  105. package/dist/esm/mcp/tools/push-notifications.tools.js +43 -0
  106. package/dist/esm/mcp/tools/push-notifications.tools.js.map +1 -0
  107. package/dist/esm/mcp/tools/secure-storage.tools.d.ts +3 -0
  108. package/dist/esm/mcp/tools/secure-storage.tools.d.ts.map +1 -0
  109. package/dist/esm/mcp/tools/secure-storage.tools.js +31 -0
  110. package/dist/esm/mcp/tools/secure-storage.tools.js.map +1 -0
  111. package/dist/esm/mcp/tools/sftp.tools.d.ts +3 -0
  112. package/dist/esm/mcp/tools/sftp.tools.d.ts.map +1 -0
  113. package/dist/esm/mcp/tools/sftp.tools.js +41 -0
  114. package/dist/esm/mcp/tools/sftp.tools.js.map +1 -0
  115. package/dist/esm/mcp/tools/share.tools.d.ts +3 -0
  116. package/dist/esm/mcp/tools/share.tools.d.ts.map +1 -0
  117. package/dist/esm/mcp/tools/share.tools.js +18 -0
  118. package/dist/esm/mcp/tools/share.tools.js.map +1 -0
  119. package/dist/esm/mcp/tools/speech.tools.d.ts +3 -0
  120. package/dist/esm/mcp/tools/speech.tools.d.ts.map +1 -0
  121. package/dist/esm/mcp/tools/speech.tools.js +38 -0
  122. package/dist/esm/mcp/tools/speech.tools.js.map +1 -0
  123. package/dist/esm/mcp/tools/ssh.tools.d.ts +3 -0
  124. package/dist/esm/mcp/tools/ssh.tools.d.ts.map +1 -0
  125. package/dist/esm/mcp/tools/ssh.tools.js +41 -0
  126. package/dist/esm/mcp/tools/ssh.tools.js.map +1 -0
  127. package/dist/esm/mcp/tools/tcp.tools.d.ts +3 -0
  128. package/dist/esm/mcp/tools/tcp.tools.d.ts.map +1 -0
  129. package/dist/esm/mcp/tools/tcp.tools.js +47 -0
  130. package/dist/esm/mcp/tools/tcp.tools.js.map +1 -0
  131. package/dist/esm/mcp/tools/tts.tools.d.ts +3 -0
  132. package/dist/esm/mcp/tools/tts.tools.d.ts.map +1 -0
  133. package/dist/esm/mcp/tools/tts.tools.js +29 -0
  134. package/dist/esm/mcp/tools/tts.tools.js.map +1 -0
  135. package/dist/esm/mcp/tools/types.d.ts +18 -0
  136. package/dist/esm/mcp/tools/types.d.ts.map +1 -0
  137. package/dist/esm/mcp/tools/types.js +2 -0
  138. package/dist/esm/mcp/tools/types.js.map +1 -0
  139. package/dist/esm/mcp/tools/udp.tools.d.ts +3 -0
  140. package/dist/esm/mcp/tools/udp.tools.d.ts.map +1 -0
  141. package/dist/esm/mcp/tools/udp.tools.js +22 -0
  142. package/dist/esm/mcp/tools/udp.tools.js.map +1 -0
  143. package/dist/esm/mcp/tools/wol.tools.d.ts +3 -0
  144. package/dist/esm/mcp/tools/wol.tools.d.ts.map +1 -0
  145. package/dist/esm/mcp/tools/wol.tools.js +16 -0
  146. package/dist/esm/mcp/tools/wol.tools.js.map +1 -0
  147. package/dist/esm/mcp/transport/bridge-server-transport.d.ts +27 -0
  148. package/dist/esm/mcp/transport/bridge-server-transport.d.ts.map +1 -0
  149. package/dist/esm/mcp/transport/bridge-server-transport.js +72 -0
  150. package/dist/esm/mcp/transport/bridge-server-transport.js.map +1 -0
  151. package/dist/esm/mcp/transport/stomp-server-transport.d.ts +43 -0
  152. package/dist/esm/mcp/transport/stomp-server-transport.d.ts.map +1 -0
  153. package/dist/esm/mcp/transport/stomp-server-transport.js +128 -0
  154. package/dist/esm/mcp/transport/stomp-server-transport.js.map +1 -0
  155. package/dist/esm/mcp/transport/transport-manager.d.ts +38 -0
  156. package/dist/esm/mcp/transport/transport-manager.d.ts.map +1 -0
  157. package/dist/esm/mcp/transport/transport-manager.js +70 -0
  158. package/dist/esm/mcp/transport/transport-manager.js.map +1 -0
  159. package/dist/esm/plugin.d.ts +79 -0
  160. package/dist/esm/plugin.d.ts.map +1 -0
  161. package/dist/esm/plugin.js +81 -0
  162. package/dist/esm/plugin.js.map +1 -0
  163. package/dist/esm/services/bridge-protocol.d.ts +107 -0
  164. package/dist/esm/services/bridge-protocol.d.ts.map +1 -0
  165. package/dist/esm/services/bridge-protocol.js +6 -0
  166. package/dist/esm/services/bridge-protocol.js.map +1 -0
  167. package/nodejs-assets/nodejs-project/main.js +1971 -0
  168. package/nodejs-assets/nodejs-project/mcp-agent-tools.js +57 -0
  169. package/nodejs-assets/nodejs-project/mcp-bridge-client.js +98 -0
  170. package/nodejs-assets/nodejs-project/package-lock.json +3639 -0
  171. package/nodejs-assets/nodejs-project/package.json +18 -0
  172. package/package.json +80 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contacts.tools.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tools/contacts.tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEzC,eAAO,MAAM,aAAa,EAAE,UAAU,EA0DrC,CAAA"}
@@ -0,0 +1,58 @@
1
+ export const contactsTools = [
2
+ {
3
+ name: 'contacts_list',
4
+ description: 'List contacts from the device address book. Returns names, phone numbers, and emails.',
5
+ inputSchema: { "type": "object", "properties": {}, "additionalProperties": false },
6
+ execute: async () => {
7
+ const { Contacts } = await import('@capacitor-community/contacts');
8
+ await Contacts.requestPermissions();
9
+ const result = await Contacts.getContacts({
10
+ projection: {
11
+ name: true,
12
+ phones: true,
13
+ emails: true,
14
+ organization: true,
15
+ },
16
+ });
17
+ return {
18
+ contacts: result.contacts.map(c => ({
19
+ contactId: c.contactId,
20
+ name: c.name?.display,
21
+ phones: c.phones?.map(p => ({ number: p.number, type: p.type })),
22
+ emails: c.emails?.map(e => ({ address: e.address, type: e.type })),
23
+ organization: c.organization?.company,
24
+ })),
25
+ };
26
+ },
27
+ },
28
+ {
29
+ name: 'contacts_search',
30
+ description: 'Search contacts by name. Returns matching contacts with phone numbers and emails.',
31
+ inputSchema: { "type": "object", "properties": { "query": { "type": "string", "description": "Name to search for" } }, "required": ["query"], "additionalProperties": false },
32
+ execute: async (args) => {
33
+ const { Contacts } = await import('@capacitor-community/contacts');
34
+ await Contacts.requestPermissions();
35
+ const result = await Contacts.getContacts({
36
+ projection: {
37
+ name: true,
38
+ phones: true,
39
+ emails: true,
40
+ organization: true,
41
+ },
42
+ });
43
+ const query = args.query.toLowerCase();
44
+ const filtered = result.contacts.filter(c => c.name?.display?.toLowerCase().includes(query) ||
45
+ c.organization?.company?.toLowerCase().includes(query));
46
+ return {
47
+ contacts: filtered.map(c => ({
48
+ contactId: c.contactId,
49
+ name: c.name?.display,
50
+ phones: c.phones?.map(p => ({ number: p.number, type: p.type })),
51
+ emails: c.emails?.map(e => ({ address: e.address, type: e.type })),
52
+ organization: c.organization?.company,
53
+ })),
54
+ };
55
+ },
56
+ },
57
+ ];
58
+ //# sourceMappingURL=contacts.tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contacts.tools.js","sourceRoot":"","sources":["../../../../src/mcp/tools/contacts.tools.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,aAAa,GAAiB;IACzC;QACE,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,uFAAuF;QACpG,WAAW,EAAE,EAAC,MAAM,EAAC,QAAQ,EAAC,YAAY,EAAC,EAAE,EAAC,sBAAsB,EAAC,KAAK,EAAC;QAC3E,OAAO,EAAE,KAAK,IAAI,EAAE;YAClB,MA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C,YAAY,EAAE,OAAO;iBACtC,CAAC,CAAC;aACJ,CAAA;QACH,CAAC;KACF;CACF,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { DeviceTool } from './types';
2
+ export declare const deviceInfoTools: DeviceTool[];
3
+ //# sourceMappingURL=device-info.tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device-info.tools.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tools/device-info.tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEzC,eAAO,MAAM,eAAe,EAAE,UAAU,EAqCvC,CAAA"}
@@ -0,0 +1,39 @@
1
+ export const deviceInfoTools = [
2
+ {
3
+ name: 'device_get_info',
4
+ description: 'Get detailed information about the device: model, platform, OS version, manufacturer, etc.',
5
+ inputSchema: { "type": "object", "properties": {}, "additionalProperties": false },
6
+ execute: async () => {
7
+ const { Device } = await import('@capacitor/device');
8
+ const info = await Device.getInfo();
9
+ const id = await Device.getId();
10
+ const lang = await Device.getLanguageCode();
11
+ return {
12
+ identifier: id.identifier,
13
+ name: info.name,
14
+ model: info.model,
15
+ platform: info.platform,
16
+ operatingSystem: info.operatingSystem,
17
+ osVersion: info.osVersion,
18
+ manufacturer: info.manufacturer,
19
+ isVirtual: info.isVirtual,
20
+ webViewVersion: info.webViewVersion,
21
+ languageCode: lang.value,
22
+ };
23
+ },
24
+ },
25
+ {
26
+ name: 'device_get_battery',
27
+ description: 'Get the device battery level and charging status.',
28
+ inputSchema: { "type": "object", "properties": {}, "additionalProperties": false },
29
+ execute: async () => {
30
+ const { Device } = await import('@capacitor/device');
31
+ const battery = await Device.getBatteryInfo();
32
+ return {
33
+ batteryLevel: battery.batteryLevel,
34
+ isCharging: battery.isCharging,
35
+ };
36
+ },
37
+ },
38
+ ];
39
+ //# sourceMappingURL=device-info.tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device-info.tools.js","sourceRoot":"","sources":["../../../../src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G,MAAM,MAAM,CAAC,cAAc,EAAE,CAAA;YAC7C,OAAO;gBACL,YAAY,EAAE,OAAO,CAAC,YAAY;gBAClC,UAAU,EAAE,OAAO,CAAC,UAAU;aAC/B,CAAA;QACH,CAAC;KACF;CACF,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { DeviceTool } from './types';
2
+ export declare const discoveryTools: DeviceTool[];
3
+ //# sourceMappingURL=discovery.tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"discovery.tools.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tools/discovery.tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAGzC,eAAO,MAAM,cAAc,EAAE,UAAU,EAsCtC,CAAA"}
@@ -0,0 +1,41 @@
1
+ import { NetworkTools } from 'capacitor-network-tools';
2
+ export const discoveryTools = [
3
+ {
4
+ name: 'ping',
5
+ description: 'Ping a host to check if it is reachable on the network. Returns reachability and latency.',
6
+ inputSchema: { "type": "object", "properties": { "host": { "type": "string", "description": "Hostname or IP address to ping (e.g. \"192.168.1.50\", \"printer.local\")" }, "timeout": { "description": "Ping timeout in milliseconds (default: 5000)", "type": "number" } }, "required": ["host"], "additionalProperties": false },
7
+ execute: async (args) => {
8
+ const result = await NetworkTools.ping({
9
+ host: args.host,
10
+ timeout: args.timeout,
11
+ });
12
+ return { reachable: result.reachable, latencyMs: result.latencyMs };
13
+ },
14
+ },
15
+ {
16
+ name: 'network_scan',
17
+ description: 'Scan a subnet to discover all live hosts and their open ports. Useful for finding printers, IoT devices, routers, and other equipment on the local network. Returns a list of discovered hosts with their IP addresses and open ports.',
18
+ inputSchema: { "type": "object", "properties": { "subnet": { "type": "string", "description": "Subnet in CIDR notation (e.g. \"192.168.1.0/24\", \"10.0.0.0/24\")" }, "ports": { "description": "Ports to scan on each host (default: [22, 80, 443, 631, 8080, 9100]). Common: 22=SSH, 80=HTTP, 443=HTTPS, 631=IPP/CUPS, 9100=raw printing", "type": "array", "items": { "type": "number" } }, "timeout": { "description": "Per-host timeout in milliseconds (default: 2000)", "type": "number" } }, "required": ["subnet"], "additionalProperties": false },
19
+ execute: async (args) => {
20
+ const result = await NetworkTools.networkScan({
21
+ subnet: args.subnet,
22
+ ports: args.ports,
23
+ timeout: args.timeout,
24
+ });
25
+ return { hosts: result.hosts, totalFound: result.hosts.length };
26
+ },
27
+ },
28
+ {
29
+ name: 'mdns_discover',
30
+ description: 'Discover devices advertising services via mDNS/Bonjour/ZeroConf on the local network. Common service types: "_http._tcp" (web servers), "_ipp._tcp" (printers), "_ssh._tcp" (SSH servers), "_printer._tcp" (printers), "_airplay._tcp" (AirPlay).',
31
+ inputSchema: { "type": "object", "properties": { "serviceType": { "type": "string", "description": "mDNS service type to discover (e.g. \"_http._tcp\", \"_ipp._tcp\", \"_ssh._tcp\")" }, "timeout": { "description": "Discovery timeout in milliseconds (default: 5000)", "type": "number" } }, "required": ["serviceType"], "additionalProperties": false },
32
+ execute: async (args) => {
33
+ const result = await NetworkTools.mdnsDiscover({
34
+ serviceType: args.serviceType,
35
+ timeout: args.timeout,
36
+ });
37
+ return { services: result.services, totalFound: result.services.length };
38
+ },
39
+ },
40
+ ];
41
+ //# sourceMappingURL=discovery.tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"discovery.tools.js","sourceRoot":"","sources":["../../../../src/mcp/tools/discovery.tools.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAEtD,MAAM,CAAC,MAAM,cAAc,GAAiB;IAC1C;QACE,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,2FAA2F;QACxG,WAAW,EAAE,EAAC,MAAM,EAAC,QAAQ,EAAC,YAAY,EAAC,EAAC,MAAM,EAAC,EAAC,MAAM,EAAC,QAAQ,EAAC,aAAa,EAAC,2EAA2E,EAAC,EAAC,SAAS,EAAC,EAAC,aAAa,EAAC,8CAA8C,EAAC,MAAM,E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E,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,mPAAmP;QAChQ,WAAW,EAAE,EAAC,MAAM,EAAC,QAAQ,EAAC,YAAY,EAAC,EAAC,aAAa,EAAC,EAAC,MAAM,EAAC,QAAQ,EAAC,aAAa,EAAC,mFAAmF,EAAC,EAAC,SAAS,EAAC,EAAC,aAAa,EAAC,mDAAmD,EAAC,MAAM,EAAC,QAAQ,EAAC,EAAC,EAAC,UAAU,EAAC,CAAC,aAAa,CAAC,EAAC,sBAAsB,EAAC,KAAK,EAAC;QACrU,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;YACtB,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,YAAY,CAAC;gBAC7C,WAAW,EAAE,IAAI,CAAC,WAAW;gBAC7B,OAAO,EAAE,IAAI,CAAC,OAAO;aACtB,CAAC,CAAA;YACF,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,UAAU,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAA;QAC1E,CAAC;KACF;CACF,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { DeviceTool } from './types';
2
+ export declare const geolocationTools: DeviceTool[];
3
+ //# sourceMappingURL=geolocation.tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geolocation.tools.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tools/geolocation.tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEzC,eAAO,MAAM,gBAAgB,EAAE,UAAU,EAuBxC,CAAA"}
@@ -0,0 +1,25 @@
1
+ export const geolocationTools = [
2
+ {
3
+ name: 'geolocation_get_current',
4
+ description: 'Get the current GPS position of the device. Returns latitude, longitude, altitude, accuracy, and speed.',
5
+ inputSchema: { "type": "object", "properties": { "enableHighAccuracy": { "description": "Use GPS for high accuracy (default false, uses network location)", "type": "boolean" }, "timeout": { "description": "Timeout in milliseconds (default 10000)", "type": "number" } }, "additionalProperties": false },
6
+ execute: async (args) => {
7
+ const { Geolocation } = await import('@capacitor/geolocation');
8
+ const pos = await Geolocation.getCurrentPosition({
9
+ enableHighAccuracy: args.enableHighAccuracy ?? false,
10
+ timeout: args.timeout ?? 10000,
11
+ });
12
+ return {
13
+ latitude: pos.coords.latitude,
14
+ longitude: pos.coords.longitude,
15
+ altitude: pos.coords.altitude,
16
+ accuracy: pos.coords.accuracy,
17
+ altitudeAccuracy: pos.coords.altitudeAccuracy,
18
+ heading: pos.coords.heading,
19
+ speed: pos.coords.speed,
20
+ timestamp: pos.timestamp,
21
+ };
22
+ },
23
+ },
24
+ ];
25
+ //# sourceMappingURL=geolocation.tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geolocation.tools.js","sourceRoot":"","sources":["../../../../src/mcp/tools/geolocation.tools.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,gBAAgB,GAAiB;IAC5C;QACE,IAAI,EAAE,yBAAyB;QAC/B,WAAW,EAAE,yGAAyG;QACtH,WAAW,EAAE,EAAC,MAAM,EAAC,QAAQ,EAAC,YAAY,EAAC,EAAC,oBAAoB,EAAC,EAAC,aAAa,EAAC,kEAAkE,EAAC,MAAM,EAAC,SAAS,EAAC,EAAC,SAAS,EAAC,EAAC,aAAa,EAAC,yCAAyC,EAAC,MAAM,EAAC,QAAQ,EAAC,EAAC,EAAC,sBAAsB,EAAC,KAAK,EAAC;QACvR,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;YACtB,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,MAAM,CAAC,wBAAwB,CAAC,CAAA;YAC9D,MAAM,GAAG,GAAG,MAAM,WAAW,CAAC,kBAAkB,CAAC;gBAC/C,kBAAkB,EAAE,IAAI,CAAC,kBAAkB,IAAI,KAAK;gBACpD,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,KAAK;aAC/B,CAAC,CAAA;YACF,OAAO;gBACL,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,QAAQ;gBAC7B,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,SAAS;gBAC/B,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,QAAQ;gBAC7B,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,QAAQ;gBAC7B,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,gBAAgB;gBAC7C,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,OAAO;gBAC3B,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,KAAK;gBACvB,SAAS,EAAE,GAAG,CAAC,SAAS;aACzB,CAAA;QACH,CAAC;KACF;CACF,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { DeviceTool } from './types';
2
+ export declare const hapticsTools: DeviceTool[];
3
+ //# sourceMappingURL=haptics.tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"haptics.tools.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tools/haptics.tools.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEzC,eAAO,MAAM,YAAY,EAAE,UAAU,EAsCpC,CAAA"}
@@ -0,0 +1,41 @@
1
+ import { Haptics, ImpactStyle, NotificationType } from '@capacitor/haptics';
2
+ export const hapticsTools = [
3
+ {
4
+ name: 'haptics_impact',
5
+ description: 'Trigger a haptic impact feedback on the device. Use to provide physical feedback for user actions.',
6
+ inputSchema: { "type": "object", "properties": { "style": { "description": "Impact intensity (default: medium)", "type": "string", "enum": ["heavy", "medium", "light"] } }, "additionalProperties": false },
7
+ execute: async (args) => {
8
+ const styleMap = {
9
+ heavy: ImpactStyle.Heavy,
10
+ medium: ImpactStyle.Medium,
11
+ light: ImpactStyle.Light,
12
+ };
13
+ await Haptics.impact({ style: styleMap[args.style || 'medium'] });
14
+ return { success: true };
15
+ },
16
+ },
17
+ {
18
+ name: 'haptics_notification',
19
+ description: 'Trigger a haptic notification feedback (success, warning, or error vibration pattern).',
20
+ inputSchema: { "type": "object", "properties": { "type": { "type": "string", "enum": ["success", "warning", "error"], "description": "Notification type" } }, "required": ["type"], "additionalProperties": false },
21
+ execute: async (args) => {
22
+ const typeMap = {
23
+ success: NotificationType.Success,
24
+ warning: NotificationType.Warning,
25
+ error: NotificationType.Error,
26
+ };
27
+ await Haptics.notification({ type: typeMap[args.type] });
28
+ return { success: true };
29
+ },
30
+ },
31
+ {
32
+ name: 'haptics_vibrate',
33
+ description: 'Vibrate the device for a specified duration in milliseconds.',
34
+ inputSchema: { "type": "object", "properties": { "duration": { "description": "Vibration duration in milliseconds (default: 300)", "type": "number" } }, "additionalProperties": false },
35
+ execute: async (args) => {
36
+ await Haptics.vibrate({ duration: args.duration || 300 });
37
+ return { success: true };
38
+ },
39
+ },
40
+ ];
41
+ //# sourceMappingURL=haptics.tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"haptics.tools.js","sourceRoot":"","sources":["../../../../src/mcp/tools/haptics.tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAG3E,MAAM,CAAC,MAAM,YAAY,GAAiB;IACxC;QACE,IAAI,EAAE,gBAAgB;QACtB,WAAW,EAAE,oGAAoG;QACjH,WAAW,EAAE,EAAC,MAAM,EAAC,QAAQ,EAAC,YAAY,EAAC,EAAC,OAAO,EAAC,EAAC,aAAa,EAAC,oCAAoC,EAAC,MAAM,EAAC,QAAQ,EAAC,MAAM,EAAC,CAAC,OAAO,EAAC,QAAQ,EAAC,OAAO,CAAC,EAAC,EAAC,EAAC,sBAAsB,EAAC,KAAK,EAAC;QACzL,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;YACtB,MAAM,QAAQ,GAAgC;gBAC5C,KAAK,EAAE,WAAW,CAAC,KAAK;gBACxB,MAAM,EAAE,WAAW,CAAC,MAAM;gBAC1B,KAAK,EAAE,WAAW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O,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,GAAG,EAAE,CAAC,CAAA;YACzD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAA;QAC1B,CAAC;KACF;CACF,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { DeviceTool } from './types';
2
+ export declare const healthTools: DeviceTool[];
3
+ //# sourceMappingURL=health.tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"health.tools.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tools/health.tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEzC,eAAO,MAAM,WAAW,EAAE,UAAU,EAoCnC,CAAA"}
@@ -0,0 +1,38 @@
1
+ export const healthTools = [
2
+ {
3
+ name: 'health_is_available',
4
+ description: 'Check if health data (Apple Health / Google Health Connect) is available on this device.',
5
+ inputSchema: { "type": "object", "properties": {}, "additionalProperties": false },
6
+ execute: async () => {
7
+ const { Health } = await import('@capgo/capacitor-health');
8
+ const result = await Health.isAvailable();
9
+ return { available: result.available };
10
+ },
11
+ },
12
+ {
13
+ name: 'health_request_auth',
14
+ description: 'Request authorization to read specific health data types.',
15
+ inputSchema: { "type": "object", "properties": { "read": { "type": "array", "items": { "type": "string" }, "description": "Health data types to request read access for (e.g. [\"steps\", \"heartRate\", \"calories\", \"distance\", \"sleep\"])" } }, "required": ["read"], "additionalProperties": false },
16
+ execute: async (args) => {
17
+ const { Health } = await import('@capgo/capacitor-health');
18
+ const result = await Health.requestAuthorization({ read: args.read, write: [] });
19
+ return result;
20
+ },
21
+ },
22
+ {
23
+ name: 'health_query',
24
+ description: 'Query health data samples for a specific type and date range.',
25
+ inputSchema: { "type": "object", "properties": { "dataType": { "type": "string", "description": "Health data type (e.g. \"steps\", \"heartRate\", \"calories\", \"distance\", \"sleep\", \"weight\")" }, "startDate": { "type": "string", "description": "Start date in ISO 8601 format (e.g. \"2025-01-01T00:00:00.000Z\")" }, "endDate": { "type": "string", "description": "End date in ISO 8601 format" }, "limit": { "description": "Maximum number of samples to return (default 100)", "type": "number" } }, "required": ["dataType", "startDate", "endDate"], "additionalProperties": false },
26
+ execute: async (args) => {
27
+ const { Health } = await import('@capgo/capacitor-health');
28
+ const result = await Health.readSamples({
29
+ dataType: args.dataType,
30
+ startDate: args.startDate,
31
+ endDate: args.endDate,
32
+ limit: args.limit ?? 100,
33
+ });
34
+ return result;
35
+ },
36
+ },
37
+ ];
38
+ //# sourceMappingURL=health.tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"health.tools.js","sourceRoot":"","sources":["../../../../src/mcp/tools/health.tools.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAiB;IACvC;QACE,IAAI,EAAE,qBAAqB;QAC3B,WAAW,EAAE,0FAA0F;QACvG,WAAW,EAAE,EAAC,MAAM,EAAC,QAAQ,EAAC,YAAY,EAAC,EAAE,EAAC,sBAAsB,EAAC,KAAK,EAAC;QAC3E,OAAO,EAAE,KAAK,IAAI,EAAE;YAClB,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,yBAAyB,CAAC,CAAA;YAC1D,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,WAAW,EAAE,CAAA;YACzC,OAAO,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,CAAA;QACxC,CAAC;KACF;IACD;QACE,IAAI,EAAE,qBAAqB;QAC3B,WAAW,EAAE,2DAA2D;QACxE,WAAW,EAAE,EAAC,MAAM,EAAC,QAAQ,EAAC,YAAY,EAAC,EAAC,MAAM,EAAC,EAAC,MAAM,EAAC,OAAO,EAAC,OAAO,EAAC,EAAC,MAAM,EAAC,QAAQ,EAAC,EAAC,aAAa,EAAC,uHAAuH,EAAC,EAAC,EAAC,UAAU,EAAC,CAAC,MAAM,CAAC,EAAC,sBAAsB,EAAC,KAAK,EAAC;QACtR,OAAO,EAAE,KAAK,EAAE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viceTool } from './types';
2
+ export declare const httpTools: DeviceTool[];
3
+ //# sourceMappingURL=http.tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http.tools.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tools/http.tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAGzC,eAAO,MAAM,SAAS,EAAE,UAAU,EAqBjC,CAAA"}
@@ -0,0 +1,24 @@
1
+ import { NetworkTools } from 'capacitor-network-tools';
2
+ export const httpTools = [
3
+ {
4
+ name: 'http_request',
5
+ description: 'Make an HTTP/HTTPS request from the device to any local network or internet endpoint. Full curl equivalent — supports GET, POST, PUT, DELETE, PATCH with custom headers and body. Can access local IPs (192.168.x.x, 10.x.x.x) that are unreachable from the cloud. Set insecure=true for self-signed certificates on IoT devices.',
6
+ inputSchema: { "type": "object", "properties": { "url": { "type": "string", "description": "Full URL (e.g. \"http://192.168.1.1/api/status\", \"https://printer.local:443/info\")" }, "method": { "description": "HTTP method: GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS (default: GET)", "type": "string" }, "headers": { "description": "HTTP headers as key-value pairs (e.g. {\"Authorization\": \"Bearer ...\", \"Content-Type\": \"application/json\"})", "type": "object", "additionalProperties": { "type": "string" } }, "body": { "description": "Request body (for POST/PUT/PATCH). Send JSON as a string.", "type": "string" }, "timeout": { "description": "Request timeout in milliseconds (default: 30000)", "type": "number" }, "insecure": { "description": "Skip TLS certificate verification for self-signed certs (default: false)", "type": "boolean" } }, "required": ["url"], "additionalProperties": false },
7
+ execute: async (args) => {
8
+ const result = await NetworkTools.httpRequest({
9
+ url: args.url,
10
+ method: args.method || 'GET',
11
+ headers: args.headers,
12
+ body: args.body,
13
+ timeout: args.timeout,
14
+ insecure: args.insecure,
15
+ });
16
+ return {
17
+ statusCode: result.statusCode,
18
+ headers: result.headers,
19
+ body: result.body,
20
+ };
21
+ },
22
+ },
23
+ ];
24
+ //# sourceMappingUR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AAQ;aACxB,CAAC,CAAA;YACF,OAAO;gBACL,UAAU,EAAE,MAAM,CAAC,UAAU;gBAC7B,OAAO,EAAE,MAAM,CAAC,OAAO;gBACvB,IAAI,EAAE,MAAM,CAAC,IAAI;aAClB,CAAA;QACH,CAAC;KACF;CACF,CAAA"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * All device MCP tools — aggregated from hardware and network tool files.
3
+ *
4
+ * Network tools require the capacitor-network-tools native plugin.
5
+ * Hardware tools use official @capacitor/* and community plugins.
6
+ */
7
+ import type { DeviceTool } from './types';
8
+ export declare const allDeviceTools: DeviceTool[];
9
+ export type { DeviceTool } from './types';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tools/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAoCzC,eAAO,MAAM,cAAc,EAAE,UAAU,EA+BtC,CAAA;AAED,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA"}
@@ -0,0 +1,70 @@
1
+ /**
2
+ * All device MCP tools — aggregated from hardware and network tool files.
3
+ *
4
+ * Network tools require the capacitor-network-tools native plugin.
5
+ * Hardware tools use official @capacitor/* and community plugins.
6
+ */
7
+ // --- Hardware tools (already-installed Capacitor plugins) ---
8
+ import { clipboardTools } from './clipboard.tools';
9
+ import { hapticsTools } from './haptics.tools';
10
+ import { notificationsTools } from './notifications.tools';
11
+ import { networkStatusTools } from './network-status.tools';
12
+ import { shareTools } from './share.tools';
13
+ import { appStateTools } from './app-state.tools';
14
+ import { secureStorageTools } from './secure-storage.tools';
15
+ // --- Network tools (capacitor-network-tools native plugin) ---
16
+ import { sshTools } from './ssh.tools';
17
+ import { sftpTools } from './sftp.tools';
18
+ import { httpTools } from './http.tools';
19
+ import { tcpTools } from './tcp.tools';
20
+ import { udpTools } from './udp.tools';
21
+ import { discoveryTools } from './discovery.tools';
22
+ import { wolTools } from './wol.tools';
23
+ // --- Hardware tools (newly-installed Capacitor plugins) ---
24
+ import { cameraTools } from './camera.tools';
25
+ import { barcodeTools } from './barcode.tools';
26
+ import { motionSensorsTools } from './motion-sensors.tools';
27
+ import { geolocationTools } from './geolocation.tools';
28
+ import { speechTools } from './speech.tools';
29
+ import { ttsTools } from './tts.tools';
30
+ import { bluetoothTools } from './bluetooth.tools';
31
+ import { nfcTools } from './nfc.tools';
32
+ import { deviceInfoTools } from './device-info.tools';
33
+ import { biometricTools } from './biometric.tools';
34
+ import { contactsTools } from './contacts.tools';
35
+ import { keepAwakeTools } from './keep-awake.tools';
36
+ import { pushNotificationsTools } from './push-notifications.tools';
37
+ import { healthTools } from './health.tools';
38
+ export const allDeviceTools = [
39
+ // Network tools (primary use case — SSH, curl, TCP, UDP, discovery)
40
+ ...sshTools,
41
+ ...sftpTools,
42
+ ...httpTools,
43
+ ...tcpTools,
44
+ ...udpTools,
45
+ ...discoveryTools,
46
+ ...wolTools,
47
+ // Hardware tools — device capabilities
48
+ ...clipboardTools,
49
+ ...hapticsTools,
50
+ ...notificationsTools,
51
+ ...networkStatusTools,
52
+ ...shareTools,
53
+ ...appStateTools,
54
+ ...secureStorageTools,
55
+ ...cameraTools,
56
+ ...barcodeTools,
57
+ ...motionSensorsTools,
58
+ ...geolocationTools,
59
+ ...speechTools,
60
+ ...ttsTools,
61
+ ...bluetoothTools,
62
+ ...nfcTools,
63
+ ...deviceInfoTools,
64
+ ...biometricTools,
65
+ ...contactsTools,
66
+ ...keepAwakeTools,
67
+ ...pushNotificationsTools,
68
+ ...healthTools,
69
+ ];
70
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mcp/tools/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,+DAA+D;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AA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AM,kBAAkB,CAAA;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAE5C,MAAM,CAAC,MAAM,cAAc,GAAiB;IAC1C,oEAAoE;IACpE,GAAG,QAAQ;IACX,GAAG,SAAS;IACZ,GAAG,SAAS;IACZ,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,GAAG,cAAc;IACjB,GAAG,QAAQ;IACX,uCAAuC;IACvC,GAAG,cAAc;IACjB,GAAG,YAAY;IACf,GAAG,kBAAkB;IACrB,GAAG,kBAAkB;IACrB,GAAG,UAAU;IACb,GAAG,aAAa;IAChB,GAAG,kBAAkB;IACrB,GAAG,WAAW;IACd,GAAG,YAAY;IACf,GAAG,kBAAkB;IACrB,GAAG,gBAAgB;IACnB,GAAG,WAAW;IACd,GAAG,QAAQ;IACX,GAAG,cAAc;IACjB,GAAG,QAAQ;IACX,GAAG,eAAe;IAClB,GAAG,cAAc;IACjB,GAAG,aAAa;IAChB,GAAG,cAAc;IACjB,GAAG,sBAAsB;IACzB,GAAG,WAAW;CACf,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { DeviceTool } from './types';
2
+ export declare const keepAwakeTools: DeviceTool[];
3
+ //# sourceMappingURL=keep-awake.tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keep-awake.tools.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tools/keep-awake.tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEzC,eAAO,MAAM,cAAc,EAAE,UAAU,EAqBtC,CAAA"}
@@ -0,0 +1,23 @@
1
+ export const keepAwakeTools = [
2
+ {
3
+ name: 'screen_keep_awake',
4
+ description: 'Prevent the device screen from turning off. Useful during long-running operations.',
5
+ inputSchema: { "type": "object", "properties": {}, "additionalProperties": false },
6
+ execute: async () => {
7
+ const { KeepAwake } = await import('@capacitor-community/keep-awake');
8
+ await KeepAwake.keepAwake();
9
+ return { keepingAwake: true };
10
+ },
11
+ },
12
+ {
13
+ name: 'screen_allow_sleep',
14
+ description: 'Allow the device screen to turn off normally again.',
15
+ inputSchema: { "type": "object", "properties": {}, "additionalProperties": false },
16
+ execute: async () => {
17
+ const { KeepAwake } = await import('@capacitor-community/keep-awake');
18
+ await KeepAwake.allowSleep();
19
+ return { keepingAwake: false };
20
+ },
21
+ },
22
+ ];
23
+ //# sourceMappingURL=keep-awake.tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keep-awake.tools.js","sourceRoot":"","sources":["../../../../src/mcp/tools/keep-awake.tools.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,cAAc,GAAiB;IAC1C;QACE,IAAI,EAAE,mBAAmB;QACzB,WAAW,EAAE,oFAAoF;QACjG,WAAW,EAAE,EAAC,MAAM,EAAC,QAAQ,EAAC,YAAY,EAAC,EAAE,EAAC,sBAAsB,EAAC,KAAK,EAAC;QAC3E,OAAO,EAAE,KAAK,IAAI,EAAE;YAClB,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,MAAM,CAAC,iCAAiC,CAAC,CAAA;YACrE,MAAM,SAAS,CAAC,SAAS,EAAE,CAAA;YAC3B,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,CAAA;QAC/B,CAAC;KACF;IACD;QACE,IAAI,EAAE,oBAAoB;QAC1B,WAAW,EAAE,qDAAqD;QAClE,WAAW,EAAE,EAAC,MAAM,EAAC,QAAQ,EAAC,YAAY,EAAC,EAAE,EAAC,sBAAsB,EAAC,KAAK,EAAC;QAC3E,OAAO,EAAE,KAAK,IAAI,EAAE;YAClB,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,MAAM,CAAC,iCAAiC,CAAC,CAAA;YACrE,MAAM,SAAS,CAAC,UAAU,EAAE,CAAA;YAC5B,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,CAAA;QAChC,CAAC;KACF;CACF,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { DeviceTool } from './types';
2
+ export declare const motionSensorsTools: DeviceTool[];
3
+ //# sourceMappingURL=motion-sensors.tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"motion-sensors.tools.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tools/motion-sensors.tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEzC,eAAO,MAAM,kBAAkB,EAAE,UAAU,EA0D1C,CAAA"}
@@ -0,0 +1,60 @@
1
+ export const motionSensorsTools = [
2
+ {
3
+ name: 'motion_get_acceleration',
4
+ description: 'Get a single accelerometer reading from the device. Returns x, y, z acceleration values in m/s².',
5
+ inputSchema: { "type": "object", "properties": {}, "additionalProperties": false },
6
+ execute: async () => {
7
+ const { Motion } = await import('@capacitor/motion');
8
+ return new Promise((resolve, reject) => {
9
+ let handle;
10
+ const timeout = setTimeout(() => {
11
+ handle?.remove();
12
+ reject(new Error('Accelerometer read timed out'));
13
+ }, 5000);
14
+ Motion.addListener('accel', (event) => {
15
+ clearTimeout(timeout);
16
+ handle?.remove();
17
+ resolve({
18
+ acceleration: {
19
+ x: event.acceleration.x,
20
+ y: event.acceleration.y,
21
+ z: event.acceleration.z,
22
+ },
23
+ accelerationIncludingGravity: {
24
+ x: event.accelerationIncludingGravity.x,
25
+ y: event.accelerationIncludingGravity.y,
26
+ z: event.accelerationIncludingGravity.z,
27
+ },
28
+ timestamp: Date.now(),
29
+ });
30
+ }).then(h => { handle = h; });
31
+ });
32
+ },
33
+ },
34
+ {
35
+ name: 'motion_get_orientation',
36
+ description: 'Get a single device orientation reading. Returns alpha (compass), beta (tilt front-back), gamma (tilt left-right) in degrees.',
37
+ inputSchema: { "type": "object", "properties": {}, "additionalProperties": false },
38
+ execute: async () => {
39
+ const { Motion } = await import('@capacitor/motion');
40
+ return new Promise((resolve, reject) => {
41
+ let handle;
42
+ const timeout = setTimeout(() => {
43
+ handle?.remove();
44
+ reject(new Error('Orientation read timed out'));
45
+ }, 5000);
46
+ Motion.addListener('orientation', (event) => {
47
+ clearTimeout(timeout);
48
+ handle?.remove();
49
+ resolve({
50
+ alpha: event.alpha,
51
+ beta: event.beta,
52
+ gamma: event.gamma,
53
+ timestamp: Date.now(),
54
+ });
55
+ }).then(h => { handle = h; });
56
+ });
57
+ },
58
+ },
59
+ ];
60
+ //# sourceMappingURL=motion-sensors.tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"motion-sensors.tools.js","sourceRoot":"","sources":["../../../../src/mcp/tools/motion-sensors.tools.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,kBAAkB,GAAiB;IAC9C;QACE,IAAI,EAAE,yBAAyB;QAC/B,WAAW,EAAE,kGAAkG;QAC/G,WAAW,EAAE,EAAC,MAAM,EAAC,QAAQ,EAAC,YAAY,EAAC,EAAE,EAAC,sBAAsB,EAAC,KAAK,EAAC;QAC3E,OAAO,EAAE,KAAK,IAAI,EAAE;YAClB,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,mBAAmB,CAAC,CAAA;YACpD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;gBACrC,IAAI,MAAW,CAAA;gBACf,MAAM,OAAO,GAAG,UAAU,CAAC,GAAG,EAAE;oBAC9B,MAAM,EAAE,MAAM,EAAE,CAAA;oBAChB,MAAM,CAAC,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC,CAAA;gBACnD,CAAC,EAAE,IAAI,CAAC,CAAA;gBACR,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;oBACpC,YAAY,CAAC,OAAO,CAAC,CAAA;oBACrB,MAAM,EAAE,MAAM,EAAE,CAAA;oBAChB,OAAO,CAAC;wBACN,YAAY,EAAE;4BACZ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,CAAA;oBAChB,OAAO,CAAC;wBACN,KAAK,EAAE,KAAK,CAAC,KAAK;wBAClB,IAAI,EAAE,KAAK,CAAC,IAAI;wBAChB,KAAK,EAAE,KAAK,CAAC,KAAK;wBAClB,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;qBACtB,CAAC,CAAA;gBACJ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,GAAG,CAAC,CAAA,CAAC,CAAC,CAAC,CAAA;YAC9B,CAAC,CAAC,CAAA;QACJ,CAAC;KACF;CACF,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { DeviceTool } from './types';
2
+ export declare const networkStatusTools: DeviceTool[];
3
+ //# sourceMappingURL=network-status.tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"network-status.tools.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tools/network-status.tools.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEzC,eAAO,MAAM,kBAAkB,EAAE,UAAU,EAa1C,CAAA"}
@@ -0,0 +1,16 @@
1
+ import { Network } from '@capacitor/network';
2
+ export const networkStatusTools = [
3
+ {
4
+ name: 'network_status',
5
+ description: 'Get the current network connection status of the device (wifi, cellular, none) and whether it is connected.',
6
+ inputSchema: { "type": "object", "properties": {}, "additionalProperties": false },
7
+ execute: async () => {
8
+ const status = await Network.getStatus();
9
+ return {
10
+ connected: status.connected,
11
+ connectionType: status.connectionType,
12
+ };
13
+ },
14
+ },
15
+ ];
16
+ //# sourceMappingURL=network-status.tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"network-status.tools.js","sourceRoot":"","sources":["../../../../src/mcp/tools/network-status.tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAG5C,MAAM,CAAC,MAAM,kBAAkB,GAAiB;IAC9C;QACE,IAAI,EAAE,gBAAgB;QACtB,WAAW,EAAE,6GAA6G;QAC1H,WAAW,EAAE,EAAC,MAAM,EAAC,QAAQ,EAAC,YAAY,EAAC,EAAE,EAAC,sBAAsB,EAAC,KAAK,EAAC;QAC3E,OAAO,EAAE,KAAK,IAAI,EAAE;YAClB,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,SAAS,EAAE,CAAA;YACxC,OAAO;gBACL,SAAS,EAAE,MAAM,CAAC,SAAS;gBAC3B,cAAc,EAAE,MAAM,CAAC,cAAc;aACtC,CAAA;QACH,CAAC;KACF;CACF,CAAA"}