cuetra 0.1.3 → 0.1.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.
Files changed (620) hide show
  1. package/cli/README.md +81 -0
  2. package/cli/bin/cuetra.js +140 -0
  3. package/cli/lib/commands.js +215 -0
  4. package/cli/lib/licence.js +485 -0
  5. package/cli/lib/pack.js +162 -0
  6. package/cli/lib/physics.js +191 -0
  7. package/cli/package.json +13 -0
  8. package/mcp-server/README.md +78 -0
  9. package/mcp-server/bin/cuetra-mcp.js +130 -0
  10. package/mcp-server/lib/licence.js +485 -0
  11. package/mcp-server/lib/pack.js +132 -0
  12. package/mcp-server/lib/tools.js +245 -0
  13. package/mcp-server/pack/activity.svg +1 -0
  14. package/mcp-server/pack/airplay.svg +1 -0
  15. package/mcp-server/pack/anchor.svg +1 -0
  16. package/mcp-server/pack/aperture.svg +1 -0
  17. package/mcp-server/pack/arrow-right.svg +1 -0
  18. package/mcp-server/pack/arrow-up.svg +1 -0
  19. package/mcp-server/pack/award.svg +1 -0
  20. package/mcp-server/pack/badge-check.svg +1 -0
  21. package/mcp-server/pack/battery.svg +1 -0
  22. package/mcp-server/pack/bell-ring.svg +1 -0
  23. package/mcp-server/pack/bell.svg +1 -0
  24. package/mcp-server/pack/bike.svg +1 -0
  25. package/mcp-server/pack/blocks.svg +1 -0
  26. package/mcp-server/pack/bluetooth.svg +1 -0
  27. package/mcp-server/pack/book-open.svg +1 -0
  28. package/mcp-server/pack/book.svg +1 -0
  29. package/mcp-server/pack/bookmark.svg +1 -0
  30. package/mcp-server/pack/box.svg +1 -0
  31. package/mcp-server/pack/brain.svg +1 -0
  32. package/mcp-server/pack/briefcase.svg +1 -0
  33. package/mcp-server/pack/bug.svg +1 -0
  34. package/mcp-server/pack/bus.svg +1 -0
  35. package/mcp-server/pack/calculator.svg +1 -0
  36. package/mcp-server/pack/calendar.svg +1 -0
  37. package/mcp-server/pack/camera.svg +1 -0
  38. package/mcp-server/pack/car.svg +1 -0
  39. package/mcp-server/pack/check.svg +1 -0
  40. package/mcp-server/pack/chevron-down.svg +1 -0
  41. package/mcp-server/pack/circle-alert.svg +1 -0
  42. package/mcp-server/pack/circle-check.svg +1 -0
  43. package/mcp-server/pack/clipboard.svg +1 -0
  44. package/mcp-server/pack/clock.svg +1 -0
  45. package/mcp-server/pack/cloud.svg +1 -0
  46. package/mcp-server/pack/code.svg +1 -0
  47. package/mcp-server/pack/coffee.svg +1 -0
  48. package/mcp-server/pack/command.svg +1 -0
  49. package/mcp-server/pack/compass.svg +1 -0
  50. package/mcp-server/pack/cookie.svg +1 -0
  51. package/mcp-server/pack/copy.svg +1 -0
  52. package/mcp-server/pack/cpu.svg +1 -0
  53. package/mcp-server/pack/credit-card.svg +1 -0
  54. package/mcp-server/pack/crown.svg +1 -0
  55. package/mcp-server/pack/database.svg +1 -0
  56. package/mcp-server/pack/diamond.svg +1 -0
  57. package/mcp-server/pack/download.svg +1 -0
  58. package/mcp-server/pack/external-link.svg +1 -0
  59. package/mcp-server/pack/eye.svg +1 -0
  60. package/mcp-server/pack/file.svg +1 -0
  61. package/mcp-server/pack/flag.svg +1 -0
  62. package/mcp-server/pack/flame.svg +1 -0
  63. package/mcp-server/pack/folder.svg +1 -0
  64. package/mcp-server/pack/free-list.json +113 -0
  65. package/mcp-server/pack/gift.svg +1 -0
  66. package/mcp-server/pack/globe.svg +1 -0
  67. package/mcp-server/pack/headphones.svg +1 -0
  68. package/mcp-server/pack/heart.svg +1 -0
  69. package/mcp-server/pack/image.svg +1 -0
  70. package/mcp-server/pack/key.svg +1 -0
  71. package/mcp-server/pack/layers.svg +1 -0
  72. package/mcp-server/pack/link.svg +1 -0
  73. package/mcp-server/pack/list.svg +1 -0
  74. package/mcp-server/pack/lock-open.svg +1 -0
  75. package/mcp-server/pack/lock.svg +1 -0
  76. package/mcp-server/pack/mail.svg +1 -0
  77. package/mcp-server/pack/menu.svg +1 -0
  78. package/mcp-server/pack/message-square.svg +1 -0
  79. package/mcp-server/pack/mic.svg +1 -0
  80. package/mcp-server/pack/minus.svg +1 -0
  81. package/mcp-server/pack/monitor.svg +1 -0
  82. package/mcp-server/pack/moon.svg +1 -0
  83. package/mcp-server/pack/motion.json +1 -0
  84. package/mcp-server/pack/navigation.svg +1 -0
  85. package/mcp-server/pack/pause.svg +1 -0
  86. package/mcp-server/pack/pen.svg +1 -0
  87. package/mcp-server/pack/phone.svg +1 -0
  88. package/mcp-server/pack/play.svg +1 -0
  89. package/mcp-server/pack/plus.svg +1 -0
  90. package/mcp-server/pack/power.svg +1 -0
  91. package/mcp-server/pack/printer.svg +1 -0
  92. package/mcp-server/pack/refresh-cw.svg +1 -0
  93. package/mcp-server/pack/rocket.svg +1 -0
  94. package/mcp-server/pack/search.svg +1 -0
  95. package/mcp-server/pack/send.svg +1 -0
  96. package/mcp-server/pack/settings.svg +1 -0
  97. package/mcp-server/pack/shield-check.svg +1 -0
  98. package/mcp-server/pack/shopping-cart.svg +1 -0
  99. package/mcp-server/pack/smartphone.svg +1 -0
  100. package/mcp-server/pack/star.svg +1 -0
  101. package/mcp-server/pack/sun.svg +1 -0
  102. package/mcp-server/pack/tag.svg +1 -0
  103. package/mcp-server/pack/terminal.svg +1 -0
  104. package/mcp-server/pack/thumbs-up.svg +1 -0
  105. package/mcp-server/pack/trash.svg +1 -0
  106. package/mcp-server/pack/trending-up.svg +1 -0
  107. package/mcp-server/pack/umbrella.svg +1 -0
  108. package/mcp-server/pack/upload.svg +1 -0
  109. package/mcp-server/pack/user.svg +1 -0
  110. package/mcp-server/pack/users.svg +1 -0
  111. package/mcp-server/pack/volume.svg +1 -0
  112. package/mcp-server/pack/watch.svg +1 -0
  113. package/mcp-server/pack/x.svg +1 -0
  114. package/mcp-server/pack/zap.svg +1 -0
  115. package/mcp-server/package.json +13 -0
  116. package/motion.json +1 -1
  117. package/pack/activity.svg +1 -0
  118. package/pack/airplay.svg +1 -0
  119. package/pack/anchor.svg +1 -0
  120. package/pack/aperture.svg +1 -0
  121. package/pack/arrow-right.svg +1 -0
  122. package/pack/arrow-up.svg +1 -0
  123. package/pack/award.svg +1 -0
  124. package/pack/badge-check.svg +1 -0
  125. package/pack/battery.svg +1 -0
  126. package/pack/bell-ring.svg +1 -0
  127. package/pack/bell.svg +1 -0
  128. package/pack/bike.svg +1 -0
  129. package/pack/blocks.svg +1 -0
  130. package/pack/bluetooth.svg +1 -0
  131. package/pack/book-open.svg +1 -0
  132. package/pack/book.svg +1 -0
  133. package/pack/bookmark.svg +1 -0
  134. package/pack/box.svg +1 -0
  135. package/pack/brain.svg +1 -0
  136. package/pack/briefcase.svg +1 -0
  137. package/pack/bug.svg +1 -0
  138. package/pack/bus.svg +1 -0
  139. package/pack/calculator.svg +1 -0
  140. package/pack/calendar.svg +1 -0
  141. package/pack/camera.svg +1 -0
  142. package/pack/car.svg +1 -0
  143. package/pack/check.svg +1 -0
  144. package/pack/chevron-down.svg +1 -0
  145. package/pack/circle-alert.svg +1 -0
  146. package/pack/circle-check.svg +1 -0
  147. package/pack/clipboard.svg +1 -0
  148. package/pack/clock.svg +1 -0
  149. package/pack/cloud.svg +1 -0
  150. package/pack/code.svg +1 -0
  151. package/pack/coffee.svg +1 -0
  152. package/pack/command.svg +1 -0
  153. package/pack/compass.svg +1 -0
  154. package/pack/cookie.svg +1 -0
  155. package/pack/copy.svg +1 -0
  156. package/pack/cpu.svg +1 -0
  157. package/pack/credit-card.svg +1 -0
  158. package/pack/crown.svg +1 -0
  159. package/pack/database.svg +1 -0
  160. package/pack/diamond.svg +1 -0
  161. package/pack/download.svg +1 -0
  162. package/pack/duotone/activity.svg +1 -0
  163. package/pack/duotone/airplay.svg +1 -0
  164. package/pack/duotone/anchor.svg +1 -0
  165. package/pack/duotone/aperture.svg +1 -0
  166. package/pack/duotone/arrow-right.svg +1 -0
  167. package/pack/duotone/arrow-up.svg +1 -0
  168. package/pack/duotone/award.svg +1 -0
  169. package/pack/duotone/badge-check.svg +1 -0
  170. package/pack/duotone/battery.svg +1 -0
  171. package/pack/duotone/bell-ring.svg +1 -0
  172. package/pack/duotone/bell.svg +1 -0
  173. package/pack/duotone/bike.svg +1 -0
  174. package/pack/duotone/blocks.svg +1 -0
  175. package/pack/duotone/bluetooth.svg +1 -0
  176. package/pack/duotone/book-open.svg +1 -0
  177. package/pack/duotone/book.svg +1 -0
  178. package/pack/duotone/bookmark.svg +1 -0
  179. package/pack/duotone/box.svg +1 -0
  180. package/pack/duotone/brain.svg +1 -0
  181. package/pack/duotone/briefcase.svg +1 -0
  182. package/pack/duotone/bug.svg +1 -0
  183. package/pack/duotone/bus.svg +1 -0
  184. package/pack/duotone/calculator.svg +1 -0
  185. package/pack/duotone/calendar.svg +1 -0
  186. package/pack/duotone/camera.svg +1 -0
  187. package/pack/duotone/car.svg +1 -0
  188. package/pack/duotone/check.svg +1 -0
  189. package/pack/duotone/chevron-down.svg +1 -0
  190. package/pack/duotone/circle-alert.svg +1 -0
  191. package/pack/duotone/circle-check.svg +1 -0
  192. package/pack/duotone/clipboard.svg +1 -0
  193. package/pack/duotone/clock.svg +1 -0
  194. package/pack/duotone/cloud.svg +1 -0
  195. package/pack/duotone/code.svg +1 -0
  196. package/pack/duotone/coffee.svg +1 -0
  197. package/pack/duotone/command.svg +1 -0
  198. package/pack/duotone/compass.svg +1 -0
  199. package/pack/duotone/cookie.svg +1 -0
  200. package/pack/duotone/copy.svg +1 -0
  201. package/pack/duotone/cpu.svg +1 -0
  202. package/pack/duotone/credit-card.svg +1 -0
  203. package/pack/duotone/crown.svg +1 -0
  204. package/pack/duotone/database.svg +1 -0
  205. package/pack/duotone/diamond.svg +1 -0
  206. package/pack/duotone/download.svg +1 -0
  207. package/pack/duotone/external-link.svg +1 -0
  208. package/pack/duotone/eye.svg +1 -0
  209. package/pack/duotone/file.svg +1 -0
  210. package/pack/duotone/flag.svg +1 -0
  211. package/pack/duotone/flame.svg +1 -0
  212. package/pack/duotone/folder.svg +1 -0
  213. package/pack/duotone/gift.svg +1 -0
  214. package/pack/duotone/globe.svg +1 -0
  215. package/pack/duotone/headphones.svg +1 -0
  216. package/pack/duotone/heart.svg +1 -0
  217. package/pack/duotone/image.svg +1 -0
  218. package/pack/duotone/key.svg +1 -0
  219. package/pack/duotone/layers.svg +1 -0
  220. package/pack/duotone/link.svg +1 -0
  221. package/pack/duotone/list.svg +1 -0
  222. package/pack/duotone/lock-open.svg +1 -0
  223. package/pack/duotone/lock.svg +1 -0
  224. package/pack/duotone/mail.svg +1 -0
  225. package/pack/duotone/menu.svg +1 -0
  226. package/pack/duotone/message-square.svg +1 -0
  227. package/pack/duotone/mic.svg +1 -0
  228. package/pack/duotone/minus.svg +1 -0
  229. package/pack/duotone/monitor.svg +1 -0
  230. package/pack/duotone/moon.svg +1 -0
  231. package/pack/duotone/navigation.svg +1 -0
  232. package/pack/duotone/pause.svg +1 -0
  233. package/pack/duotone/pen.svg +1 -0
  234. package/pack/duotone/phone.svg +1 -0
  235. package/pack/duotone/play.svg +1 -0
  236. package/pack/duotone/plus.svg +1 -0
  237. package/pack/duotone/power.svg +1 -0
  238. package/pack/duotone/printer.svg +1 -0
  239. package/pack/duotone/refresh-cw.svg +1 -0
  240. package/pack/duotone/rocket.svg +1 -0
  241. package/pack/duotone/search.svg +1 -0
  242. package/pack/duotone/send.svg +1 -0
  243. package/pack/duotone/settings.svg +1 -0
  244. package/pack/duotone/shield-check.svg +1 -0
  245. package/pack/duotone/shopping-cart.svg +1 -0
  246. package/pack/duotone/smartphone.svg +1 -0
  247. package/pack/duotone/star.svg +1 -0
  248. package/pack/duotone/sun.svg +1 -0
  249. package/pack/duotone/tag.svg +1 -0
  250. package/pack/duotone/terminal.svg +1 -0
  251. package/pack/duotone/thumbs-up.svg +1 -0
  252. package/pack/duotone/trash.svg +1 -0
  253. package/pack/duotone/trending-up.svg +1 -0
  254. package/pack/duotone/umbrella.svg +1 -0
  255. package/pack/duotone/upload.svg +1 -0
  256. package/pack/duotone/user.svg +1 -0
  257. package/pack/duotone/users.svg +1 -0
  258. package/pack/duotone/volume.svg +1 -0
  259. package/pack/duotone/watch.svg +1 -0
  260. package/pack/duotone/x.svg +1 -0
  261. package/pack/duotone/zap.svg +1 -0
  262. package/pack/external-link.svg +1 -0
  263. package/pack/eye.svg +1 -0
  264. package/pack/file.svg +1 -0
  265. package/pack/flag.svg +1 -0
  266. package/pack/flame.svg +1 -0
  267. package/pack/folder.svg +1 -0
  268. package/pack/free-list.json +113 -0
  269. package/pack/gift.svg +1 -0
  270. package/pack/glass/activity.svg +1 -0
  271. package/pack/glass/airplay.svg +1 -0
  272. package/pack/glass/anchor.svg +1 -0
  273. package/pack/glass/aperture.svg +1 -0
  274. package/pack/glass/arrow-right.svg +1 -0
  275. package/pack/glass/arrow-up.svg +1 -0
  276. package/pack/glass/award.svg +1 -0
  277. package/pack/glass/badge-check.svg +1 -0
  278. package/pack/glass/battery.svg +1 -0
  279. package/pack/glass/bell-ring.svg +1 -0
  280. package/pack/glass/bell.svg +1 -0
  281. package/pack/glass/bike.svg +1 -0
  282. package/pack/glass/blocks.svg +1 -0
  283. package/pack/glass/bluetooth.svg +1 -0
  284. package/pack/glass/book-open.svg +1 -0
  285. package/pack/glass/book.svg +1 -0
  286. package/pack/glass/bookmark.svg +1 -0
  287. package/pack/glass/box.svg +1 -0
  288. package/pack/glass/brain.svg +1 -0
  289. package/pack/glass/briefcase.svg +1 -0
  290. package/pack/glass/bug.svg +1 -0
  291. package/pack/glass/bus.svg +1 -0
  292. package/pack/glass/calculator.svg +1 -0
  293. package/pack/glass/calendar.svg +1 -0
  294. package/pack/glass/camera.svg +1 -0
  295. package/pack/glass/car.svg +1 -0
  296. package/pack/glass/check.svg +1 -0
  297. package/pack/glass/chevron-down.svg +1 -0
  298. package/pack/glass/circle-alert.svg +1 -0
  299. package/pack/glass/circle-check.svg +1 -0
  300. package/pack/glass/clipboard.svg +1 -0
  301. package/pack/glass/clock.svg +1 -0
  302. package/pack/glass/cloud.svg +1 -0
  303. package/pack/glass/code.svg +1 -0
  304. package/pack/glass/coffee.svg +1 -0
  305. package/pack/glass/command.svg +1 -0
  306. package/pack/glass/compass.svg +1 -0
  307. package/pack/glass/cookie.svg +1 -0
  308. package/pack/glass/copy.svg +1 -0
  309. package/pack/glass/cpu.svg +1 -0
  310. package/pack/glass/credit-card.svg +1 -0
  311. package/pack/glass/crown.svg +1 -0
  312. package/pack/glass/database.svg +1 -0
  313. package/pack/glass/diamond.svg +1 -0
  314. package/pack/glass/download.svg +1 -0
  315. package/pack/glass/external-link.svg +1 -0
  316. package/pack/glass/eye.svg +1 -0
  317. package/pack/glass/file.svg +1 -0
  318. package/pack/glass/flag.svg +1 -0
  319. package/pack/glass/flame.svg +1 -0
  320. package/pack/glass/folder.svg +1 -0
  321. package/pack/glass/gift.svg +1 -0
  322. package/pack/glass/globe.svg +1 -0
  323. package/pack/glass/headphones.svg +1 -0
  324. package/pack/glass/heart.svg +1 -0
  325. package/pack/glass/image.svg +1 -0
  326. package/pack/glass/key.svg +1 -0
  327. package/pack/glass/layers.svg +1 -0
  328. package/pack/glass/link.svg +1 -0
  329. package/pack/glass/list.svg +1 -0
  330. package/pack/glass/lock-open.svg +1 -0
  331. package/pack/glass/lock.svg +1 -0
  332. package/pack/glass/mail.svg +1 -0
  333. package/pack/glass/menu.svg +1 -0
  334. package/pack/glass/message-square.svg +1 -0
  335. package/pack/glass/mic.svg +1 -0
  336. package/pack/glass/minus.svg +1 -0
  337. package/pack/glass/monitor.svg +1 -0
  338. package/pack/glass/moon.svg +1 -0
  339. package/pack/glass/navigation.svg +1 -0
  340. package/pack/glass/pause.svg +1 -0
  341. package/pack/glass/pen.svg +1 -0
  342. package/pack/glass/phone.svg +1 -0
  343. package/pack/glass/play.svg +1 -0
  344. package/pack/glass/plus.svg +1 -0
  345. package/pack/glass/power.svg +1 -0
  346. package/pack/glass/printer.svg +1 -0
  347. package/pack/glass/refresh-cw.svg +1 -0
  348. package/pack/glass/rocket.svg +1 -0
  349. package/pack/glass/search.svg +1 -0
  350. package/pack/glass/send.svg +1 -0
  351. package/pack/glass/settings.svg +1 -0
  352. package/pack/glass/shield-check.svg +1 -0
  353. package/pack/glass/shopping-cart.svg +1 -0
  354. package/pack/glass/smartphone.svg +1 -0
  355. package/pack/glass/star.svg +1 -0
  356. package/pack/glass/sun.svg +1 -0
  357. package/pack/glass/tag.svg +1 -0
  358. package/pack/glass/terminal.svg +1 -0
  359. package/pack/glass/thumbs-up.svg +1 -0
  360. package/pack/glass/trash.svg +1 -0
  361. package/pack/glass/trending-up.svg +1 -0
  362. package/pack/glass/umbrella.svg +1 -0
  363. package/pack/glass/upload.svg +1 -0
  364. package/pack/glass/user.svg +1 -0
  365. package/pack/glass/users.svg +1 -0
  366. package/pack/glass/volume.svg +1 -0
  367. package/pack/glass/watch.svg +1 -0
  368. package/pack/glass/x.svg +1 -0
  369. package/pack/glass/zap.svg +1 -0
  370. package/pack/globe.svg +1 -0
  371. package/pack/headphones.svg +1 -0
  372. package/pack/heart.svg +1 -0
  373. package/pack/image.svg +1 -0
  374. package/pack/key.svg +1 -0
  375. package/pack/layers.svg +1 -0
  376. package/pack/link.svg +1 -0
  377. package/pack/list.svg +1 -0
  378. package/pack/lock-open.svg +1 -0
  379. package/pack/lock.svg +1 -0
  380. package/pack/mail.svg +1 -0
  381. package/pack/menu.svg +1 -0
  382. package/pack/message-square.svg +1 -0
  383. package/pack/mic.svg +1 -0
  384. package/pack/minus.svg +1 -0
  385. package/pack/monitor.svg +1 -0
  386. package/pack/moon.svg +1 -0
  387. package/pack/motion.json +1 -0
  388. package/pack/navigation.svg +1 -0
  389. package/pack/outline/activity.svg +1 -0
  390. package/pack/outline/airplay.svg +1 -0
  391. package/pack/outline/anchor.svg +1 -0
  392. package/pack/outline/aperture.svg +1 -0
  393. package/pack/outline/arrow-right.svg +1 -0
  394. package/pack/outline/arrow-up.svg +1 -0
  395. package/pack/outline/award.svg +1 -0
  396. package/pack/outline/badge-check.svg +1 -0
  397. package/pack/outline/battery.svg +1 -0
  398. package/pack/outline/bell-ring.svg +1 -0
  399. package/pack/outline/bell.svg +1 -0
  400. package/pack/outline/bike.svg +1 -0
  401. package/pack/outline/blocks.svg +1 -0
  402. package/pack/outline/bluetooth.svg +1 -0
  403. package/pack/outline/book-open.svg +1 -0
  404. package/pack/outline/book.svg +1 -0
  405. package/pack/outline/bookmark.svg +1 -0
  406. package/pack/outline/box.svg +1 -0
  407. package/pack/outline/brain.svg +1 -0
  408. package/pack/outline/briefcase.svg +1 -0
  409. package/pack/outline/bug.svg +1 -0
  410. package/pack/outline/bus.svg +1 -0
  411. package/pack/outline/calculator.svg +1 -0
  412. package/pack/outline/calendar.svg +1 -0
  413. package/pack/outline/camera.svg +1 -0
  414. package/pack/outline/car.svg +1 -0
  415. package/pack/outline/check.svg +1 -0
  416. package/pack/outline/chevron-down.svg +1 -0
  417. package/pack/outline/circle-alert.svg +1 -0
  418. package/pack/outline/circle-check.svg +1 -0
  419. package/pack/outline/clipboard.svg +1 -0
  420. package/pack/outline/clock.svg +1 -0
  421. package/pack/outline/cloud.svg +1 -0
  422. package/pack/outline/code.svg +1 -0
  423. package/pack/outline/coffee.svg +1 -0
  424. package/pack/outline/command.svg +1 -0
  425. package/pack/outline/compass.svg +1 -0
  426. package/pack/outline/cookie.svg +1 -0
  427. package/pack/outline/copy.svg +1 -0
  428. package/pack/outline/cpu.svg +1 -0
  429. package/pack/outline/credit-card.svg +1 -0
  430. package/pack/outline/crown.svg +1 -0
  431. package/pack/outline/database.svg +1 -0
  432. package/pack/outline/diamond.svg +1 -0
  433. package/pack/outline/download.svg +1 -0
  434. package/pack/outline/external-link.svg +1 -0
  435. package/pack/outline/eye.svg +1 -0
  436. package/pack/outline/file.svg +1 -0
  437. package/pack/outline/flag.svg +1 -0
  438. package/pack/outline/flame.svg +1 -0
  439. package/pack/outline/folder.svg +1 -0
  440. package/pack/outline/gift.svg +1 -0
  441. package/pack/outline/globe.svg +1 -0
  442. package/pack/outline/headphones.svg +1 -0
  443. package/pack/outline/heart.svg +1 -0
  444. package/pack/outline/image.svg +1 -0
  445. package/pack/outline/key.svg +1 -0
  446. package/pack/outline/layers.svg +1 -0
  447. package/pack/outline/link.svg +1 -0
  448. package/pack/outline/list.svg +1 -0
  449. package/pack/outline/lock-open.svg +1 -0
  450. package/pack/outline/lock.svg +1 -0
  451. package/pack/outline/mail.svg +1 -0
  452. package/pack/outline/menu.svg +1 -0
  453. package/pack/outline/message-square.svg +1 -0
  454. package/pack/outline/mic.svg +1 -0
  455. package/pack/outline/minus.svg +1 -0
  456. package/pack/outline/monitor.svg +1 -0
  457. package/pack/outline/moon.svg +1 -0
  458. package/pack/outline/navigation.svg +1 -0
  459. package/pack/outline/pause.svg +1 -0
  460. package/pack/outline/pen.svg +1 -0
  461. package/pack/outline/phone.svg +1 -0
  462. package/pack/outline/play.svg +1 -0
  463. package/pack/outline/plus.svg +1 -0
  464. package/pack/outline/power.svg +1 -0
  465. package/pack/outline/printer.svg +1 -0
  466. package/pack/outline/refresh-cw.svg +1 -0
  467. package/pack/outline/rocket.svg +1 -0
  468. package/pack/outline/search.svg +1 -0
  469. package/pack/outline/send.svg +1 -0
  470. package/pack/outline/settings.svg +1 -0
  471. package/pack/outline/shield-check.svg +1 -0
  472. package/pack/outline/shopping-cart.svg +1 -0
  473. package/pack/outline/smartphone.svg +1 -0
  474. package/pack/outline/star.svg +1 -0
  475. package/pack/outline/sun.svg +1 -0
  476. package/pack/outline/tag.svg +1 -0
  477. package/pack/outline/terminal.svg +1 -0
  478. package/pack/outline/thumbs-up.svg +1 -0
  479. package/pack/outline/trash.svg +1 -0
  480. package/pack/outline/trending-up.svg +1 -0
  481. package/pack/outline/umbrella.svg +1 -0
  482. package/pack/outline/upload.svg +1 -0
  483. package/pack/outline/user.svg +1 -0
  484. package/pack/outline/users.svg +1 -0
  485. package/pack/outline/volume.svg +1 -0
  486. package/pack/outline/watch.svg +1 -0
  487. package/pack/outline/x.svg +1 -0
  488. package/pack/outline/zap.svg +1 -0
  489. package/pack/pause.svg +1 -0
  490. package/pack/pen.svg +1 -0
  491. package/pack/phone.svg +1 -0
  492. package/pack/play.svg +1 -0
  493. package/pack/plus.svg +1 -0
  494. package/pack/power.svg +1 -0
  495. package/pack/printer.svg +1 -0
  496. package/pack/refresh-cw.svg +1 -0
  497. package/pack/rocket.svg +1 -0
  498. package/pack/search.svg +1 -0
  499. package/pack/send.svg +1 -0
  500. package/pack/settings.svg +1 -0
  501. package/pack/shield-check.svg +1 -0
  502. package/pack/shopping-cart.svg +1 -0
  503. package/pack/smartphone.svg +1 -0
  504. package/pack/solid/activity.svg +1 -0
  505. package/pack/solid/airplay.svg +1 -0
  506. package/pack/solid/anchor.svg +1 -0
  507. package/pack/solid/aperture.svg +1 -0
  508. package/pack/solid/arrow-right.svg +1 -0
  509. package/pack/solid/arrow-up.svg +1 -0
  510. package/pack/solid/award.svg +1 -0
  511. package/pack/solid/badge-check.svg +1 -0
  512. package/pack/solid/battery.svg +1 -0
  513. package/pack/solid/bell-ring.svg +1 -0
  514. package/pack/solid/bell.svg +1 -0
  515. package/pack/solid/bike.svg +1 -0
  516. package/pack/solid/blocks.svg +1 -0
  517. package/pack/solid/bluetooth.svg +1 -0
  518. package/pack/solid/book-open.svg +1 -0
  519. package/pack/solid/book.svg +1 -0
  520. package/pack/solid/bookmark.svg +1 -0
  521. package/pack/solid/box.svg +1 -0
  522. package/pack/solid/brain.svg +1 -0
  523. package/pack/solid/briefcase.svg +1 -0
  524. package/pack/solid/bug.svg +1 -0
  525. package/pack/solid/bus.svg +1 -0
  526. package/pack/solid/calculator.svg +1 -0
  527. package/pack/solid/calendar.svg +1 -0
  528. package/pack/solid/camera.svg +1 -0
  529. package/pack/solid/car.svg +1 -0
  530. package/pack/solid/check.svg +1 -0
  531. package/pack/solid/chevron-down.svg +1 -0
  532. package/pack/solid/circle-alert.svg +1 -0
  533. package/pack/solid/circle-check.svg +1 -0
  534. package/pack/solid/clipboard.svg +1 -0
  535. package/pack/solid/clock.svg +1 -0
  536. package/pack/solid/cloud.svg +1 -0
  537. package/pack/solid/code.svg +1 -0
  538. package/pack/solid/coffee.svg +1 -0
  539. package/pack/solid/command.svg +1 -0
  540. package/pack/solid/compass.svg +1 -0
  541. package/pack/solid/cookie.svg +1 -0
  542. package/pack/solid/copy.svg +1 -0
  543. package/pack/solid/cpu.svg +1 -0
  544. package/pack/solid/credit-card.svg +1 -0
  545. package/pack/solid/crown.svg +1 -0
  546. package/pack/solid/database.svg +1 -0
  547. package/pack/solid/diamond.svg +1 -0
  548. package/pack/solid/download.svg +1 -0
  549. package/pack/solid/external-link.svg +1 -0
  550. package/pack/solid/eye.svg +1 -0
  551. package/pack/solid/file.svg +1 -0
  552. package/pack/solid/flag.svg +1 -0
  553. package/pack/solid/flame.svg +1 -0
  554. package/pack/solid/folder.svg +1 -0
  555. package/pack/solid/gift.svg +1 -0
  556. package/pack/solid/globe.svg +1 -0
  557. package/pack/solid/headphones.svg +1 -0
  558. package/pack/solid/heart.svg +1 -0
  559. package/pack/solid/image.svg +1 -0
  560. package/pack/solid/key.svg +1 -0
  561. package/pack/solid/layers.svg +1 -0
  562. package/pack/solid/link.svg +1 -0
  563. package/pack/solid/list.svg +1 -0
  564. package/pack/solid/lock-open.svg +1 -0
  565. package/pack/solid/lock.svg +1 -0
  566. package/pack/solid/mail.svg +1 -0
  567. package/pack/solid/menu.svg +1 -0
  568. package/pack/solid/message-square.svg +1 -0
  569. package/pack/solid/mic.svg +1 -0
  570. package/pack/solid/minus.svg +1 -0
  571. package/pack/solid/monitor.svg +1 -0
  572. package/pack/solid/moon.svg +1 -0
  573. package/pack/solid/navigation.svg +1 -0
  574. package/pack/solid/pause.svg +1 -0
  575. package/pack/solid/pen.svg +1 -0
  576. package/pack/solid/phone.svg +1 -0
  577. package/pack/solid/play.svg +1 -0
  578. package/pack/solid/plus.svg +1 -0
  579. package/pack/solid/power.svg +1 -0
  580. package/pack/solid/printer.svg +1 -0
  581. package/pack/solid/refresh-cw.svg +1 -0
  582. package/pack/solid/rocket.svg +1 -0
  583. package/pack/solid/search.svg +1 -0
  584. package/pack/solid/send.svg +1 -0
  585. package/pack/solid/settings.svg +1 -0
  586. package/pack/solid/shield-check.svg +1 -0
  587. package/pack/solid/shopping-cart.svg +1 -0
  588. package/pack/solid/smartphone.svg +1 -0
  589. package/pack/solid/star.svg +1 -0
  590. package/pack/solid/sun.svg +1 -0
  591. package/pack/solid/tag.svg +1 -0
  592. package/pack/solid/terminal.svg +1 -0
  593. package/pack/solid/thumbs-up.svg +1 -0
  594. package/pack/solid/trash.svg +1 -0
  595. package/pack/solid/trending-up.svg +1 -0
  596. package/pack/solid/umbrella.svg +1 -0
  597. package/pack/solid/upload.svg +1 -0
  598. package/pack/solid/user.svg +1 -0
  599. package/pack/solid/users.svg +1 -0
  600. package/pack/solid/volume.svg +1 -0
  601. package/pack/solid/watch.svg +1 -0
  602. package/pack/solid/x.svg +1 -0
  603. package/pack/solid/zap.svg +1 -0
  604. package/pack/star.svg +1 -0
  605. package/pack/sun.svg +1 -0
  606. package/pack/tag.svg +1 -0
  607. package/pack/terminal.svg +1 -0
  608. package/pack/thumbs-up.svg +1 -0
  609. package/pack/trash.svg +1 -0
  610. package/pack/trending-up.svg +1 -0
  611. package/pack/umbrella.svg +1 -0
  612. package/pack/upload.svg +1 -0
  613. package/pack/user.svg +1 -0
  614. package/pack/users.svg +1 -0
  615. package/pack/volume.svg +1 -0
  616. package/pack/watch.svg +1 -0
  617. package/pack/x.svg +1 -0
  618. package/pack/zap.svg +1 -0
  619. package/package.json +27 -18
  620. package/src/licence.js +98 -0
@@ -0,0 +1,191 @@
1
+ // Owns the frozen physics bar (source: MOTION-MODEL.md) and the two checks built on it:
2
+ // a motion-record check (band, caps, visibility floors, rest) and a customised-SVG file
3
+ // check against the icon's motion.json record (treatments, part counts, delays intact).
4
+ export const ROTATION_CAP_DEG = 20; // peak rotation incl. followers
5
+ export const ROTATION_FLOOR_DEG = 5; // visibility floor: rotation
6
+ export const SKEW_FLOOR_DEG = 5; // visibility floor: skew
7
+ export const SCALE_FLOOR = 0.1; // visibility floor: scale delta
8
+ export const TRAVEL_FLOOR_PX = 2.0; // visibility floor: travel @ 24 viewBox
9
+ export const UI_BAND_MIN_MS = 240;
10
+ export const UI_BAND_MAX_MS = 420;
11
+ // The largest peak factor in the recipe set is tick's 1.08 overshoot, so a rotation
12
+ // cap checked at amp * 1.08 holds for every recipe that rotates.
13
+ export const RECIPE_OVERSHOOT = 1.08;
14
+
15
+ const UNIT_BY_AXIS = { r: "deg", z: "deg", k: "deg", x: "px", y: "px", s: "scale", ry: "half-turn", d: "dash" };
16
+
17
+ function partAmplitude(record, part) {
18
+ return (record.amp ?? record.amplitude) * Math.max(Number(part.amplitudeScale ?? 1), 0);
19
+ }
20
+
21
+ // Rotation in degrees for one part, in the unit the recipe finally renders:
22
+ // r/z are degrees already, ry (flip) is a fraction of a half turn, so x 180.
23
+ function partRotationDeg(record, part) {
24
+ const amp = partAmplitude(record, part);
25
+ return record.axis === "ry" ? 180 * amp : amp;
26
+ }
27
+
28
+ // One check line: a rule name, the numbers observed, and whether it held.
29
+ function checkLine(rule, pass, detail) {
30
+ return { rule, pass, detail };
31
+ }
32
+
33
+ // Check a motion record against the frozen bar. Visibility floors apply to lead parts
34
+ // (a coupled follower echoes its lead, so its own scaled amplitude may sit below the
35
+ // floor); the rotation cap applies to every part including followers.
36
+ export function checkMotionRecord(record) {
37
+ const checks = [];
38
+ const duration = Number(record.duration);
39
+ checks.push(checkLine(
40
+ "ui-band",
41
+ duration >= UI_BAND_MIN_MS && duration <= UI_BAND_MAX_MS,
42
+ `duration ${duration} ms inside ${UI_BAND_MIN_MS}-${UI_BAND_MAX_MS} ms`
43
+ ));
44
+
45
+ const parts = Array.isArray(record.parts) && record.parts.length ? record.parts : [{}];
46
+ if (["r", "z", "ry"].includes(record.axis)) {
47
+ const peaks = parts.map((part, index) => ({ index, deg: partRotationDeg(record, part) * RECIPE_OVERSHOOT }));
48
+ const peak = peaks.reduce((best, entry) => (entry.deg > best.deg ? entry : best), { deg: 0, index: 0 });
49
+ checks.push(checkLine(
50
+ "rotation-cap",
51
+ peak.deg <= ROTATION_CAP_DEG,
52
+ `peak ${peak.deg.toFixed(2)} deg <= ${ROTATION_CAP_DEG} deg (part ${peak.index}, incl. followers, x${RECIPE_OVERSHOOT} overshoot)`
53
+ ));
54
+ }
55
+
56
+ const axis = record.axis;
57
+ // The shipped census method measures the icon PEAK over all rendered parts
58
+ // (PIPE/out/MOTION-CENSUS.md): coupled detail parts legitimately echo smaller than
59
+ // their lead, so floors are judged on the peak, never on the quietest part.
60
+ if (axis === "d") {
61
+ // No frozen floor exists for dash draw; report the fraction as observed information.
62
+ checks.push(checkLine("visibility-floor(dash)", true, `dash fraction ${(record.amp ?? record.amplitude).toFixed(3)} - no frozen floor for axis d`));
63
+ } else if (axis === "ry" || axis === "r" || axis === "z" || axis === "k") {
64
+ const floor = axis === "k" ? SKEW_FLOOR_DEG : ROTATION_FLOOR_DEG;
65
+ const peak = parts.reduce((best, part) => Math.max(best, partRotationDeg(record, part)), 0);
66
+ checks.push(checkLine(
67
+ `visibility-floor(${axis === "k" ? "skew" : "rotation"})`,
68
+ peak >= floor,
69
+ `peak ${peak.toFixed(2)} deg >= ${floor} deg (${parts.length} part(s), icon peak per census)`
70
+ ));
71
+ } else if (axis === "s") {
72
+ const peak = parts.reduce((best, part) => Math.max(best, partAmplitude(record, part)), 0);
73
+ checks.push(checkLine(
74
+ "visibility-floor(scale)",
75
+ peak >= SCALE_FLOOR,
76
+ `peak scale delta ${peak.toFixed(3)} >= ${SCALE_FLOOR} (${parts.length} part(s), icon peak per census)`
77
+ ));
78
+ } else if (axis === "x" || axis === "y") {
79
+ const peak = parts.reduce((best, part) => Math.max(best, partAmplitude(record, part)), 0);
80
+ checks.push(checkLine(
81
+ `visibility-floor(travel-${axis})`,
82
+ peak >= TRAVEL_FLOOR_PX,
83
+ `peak travel ${peak.toFixed(2)} px >= ${TRAVEL_FLOOR_PX} px @24 (${parts.length} part(s), icon peak per census)`
84
+ ));
85
+ }
86
+
87
+ // Ends exactly at rest: a follower on the shipped `free` preset has no spring of its
88
+ // own ({stiffness: 0, damping: 0, gain: -0.8}) and rests by following its lead, so it
89
+ // is settled by design; every other preset needs positive stiffness and damping.
90
+ const followers = (record.coupling && Array.isArray(record.coupling.followers)) ? record.coupling.followers : [];
91
+ const springsSettled = followers.every((follower) =>
92
+ follower.preset === "free" || (Number(follower.stiffness) > 0 && Number(follower.damping) > 0));
93
+ const partsFinite = parts.every((part) => Number.isFinite(Number(part.amplitudeScale ?? 1)) && Number.isFinite(Number(part.delay ?? 0)));
94
+ checks.push(checkLine(
95
+ "ends-at-rest",
96
+ springsSettled && partsFinite,
97
+ `${followers.length} follower(s) settled (free preset or stiffness+damping > 0), ${parts.length} part(s) finite`
98
+ ));
99
+
100
+ return checks;
101
+ }
102
+
103
+ // Extract one treatment's kinetic group: sibling `<g class="mt" data-treatment="...">`
104
+ // blocks, recovered by scanning for the balanced `</g>` close - a non-greedy regex
105
+ // cannot do this, because nested part groups also close with `</g>`.
106
+ function extractTreatmentGroup(svgText, treatment) {
107
+ const marker = `<g class="mt" data-treatment="${treatment}"`;
108
+ const start = svgText.indexOf(marker);
109
+ if (start === -1) return null;
110
+ const openEnd = svgText.indexOf(">", start);
111
+ const tagPattern = /<(\/?)g[\s>]/g;
112
+ tagPattern.lastIndex = openEnd + 1;
113
+ let depth = 1;
114
+ let match;
115
+ while (depth > 0 && (match = tagPattern.exec(svgText)) !== null) {
116
+ depth += match[1] === "/" ? -1 : 1;
117
+ }
118
+ if (depth !== 0) return null;
119
+ return svgText.slice(start, tagPattern.lastIndex);
120
+ }
121
+
122
+ function parsePartTags(groupText) {
123
+ const partPattern = /<g data-part="([^"]*)" data-delay="(-?\d+)" data-part-index="(\d+)"/g;
124
+ const parts = [];
125
+ let match;
126
+ while ((match = partPattern.exec(groupText)) !== null) {
127
+ parts.push({ role: match[1], delay: Number(match[2]), index: Number(match[3]) });
128
+ }
129
+ return parts;
130
+ }
131
+
132
+ // Check a customised kinetic SVG file against the record it claims (via data-icon):
133
+ // treatments intact, per-treatment part counts intact, per-part delays intact, plus
134
+ // the kinetic marker and viewBox the runtime depends on.
135
+ export function checkSvgFile(svgText, record) {
136
+ const checks = [];
137
+
138
+ if (!/class="[^"]*cuetra-kinetic/.test(svgText)) {
139
+ checks.push(checkLine("file-kinetic-marker", false, 'missing class="cuetra-kinetic" on the svg element'));
140
+ } else {
141
+ checks.push(checkLine("file-kinetic-marker", true, 'class="cuetra-kinetic" present'));
142
+ }
143
+
144
+ const viewBoxMatch = svgText.match(/viewBox="([^"]*)"/);
145
+ const viewBoxOk = viewBoxMatch && viewBoxMatch[1] === record.viewBox;
146
+ checks.push(checkLine(
147
+ "file-viewbox",
148
+ Boolean(viewBoxOk),
149
+ `viewBox "${viewBoxMatch ? viewBoxMatch[1] : "none"}" vs record "${record.viewBox}"`
150
+ ));
151
+
152
+ const recordTreatments = record.treatments || [];
153
+ const partFindings = [];
154
+ const treatmentSummary = [];
155
+ for (const treatment of recordTreatments) {
156
+ const groupText = extractTreatmentGroup(svgText, treatment);
157
+ if (!groupText) {
158
+ partFindings.push(`treatment ${treatment} missing`);
159
+ continue;
160
+ }
161
+ const fileParts = parsePartTags(groupText);
162
+ treatmentSummary.push(`${treatment} ${fileParts.length}`);
163
+ const expected = record.partCounts ? record.partCounts[treatment] : null;
164
+ if (expected !== null && expected !== undefined && fileParts.length !== expected) {
165
+ partFindings.push(`treatment ${treatment}: ${fileParts.length} part(s) in file, record expects ${expected}`);
166
+ }
167
+ for (const filePart of fileParts) {
168
+ const recordPart = (record.parts || [])[filePart.index];
169
+ if (!recordPart) {
170
+ partFindings.push(`treatment ${treatment}: part ${filePart.index} has no record counterpart`);
171
+ } else if (Number(recordPart.delay ?? 0) !== filePart.delay) {
172
+ partFindings.push(
173
+ `treatment ${treatment}: part ${filePart.index} (${filePart.role}) delay ${filePart.delay} ms, record says ${recordPart.delay ?? 0} ms`
174
+ );
175
+ }
176
+ }
177
+ }
178
+ checks.push(checkLine(
179
+ "file-treatments",
180
+ partFindings.length === 0,
181
+ partFindings.length === 0
182
+ ? `${recordTreatments.length}/${recordTreatments.length} treatments intact (${treatmentSummary.join(", ")})`
183
+ : partFindings.join("; ")
184
+ ));
185
+
186
+ return checks;
187
+ }
188
+
189
+ export function unitForAxis(axis) {
190
+ return UNIT_BY_AXIS[axis] || axis;
191
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "@cuetra/cli",
3
+ "version": "0.1.0",
4
+ "description": "Cuetra CLI: add kinetic icons and read their motion records. Zero dependencies.",
5
+ "type": "module",
6
+ "bin": {
7
+ "cuetra": "bin/cuetra.js"
8
+ },
9
+ "engines": {
10
+ "node": ">=20"
11
+ },
12
+ "license": "CC0-1.0"
13
+ }
@@ -0,0 +1,78 @@
1
+ # @cuetra/mcp-server
2
+
3
+ Cuetra MCP server for coding agents. Newline-delimited JSON-RPC 2.0 over stdio,
4
+ speaking the MCP stdio protocol (initialize handshake, `tools/list`, `tools/call`).
5
+ Zero npm dependencies; runs on plain Node (>= 20).
6
+
7
+ ```bash
8
+ node mcp-server/bin/cuetra-mcp.js
9
+ ```
10
+
11
+ Point an MCP client at that command; or pipe it by hand, one JSON-RPC message per line:
12
+
13
+ ```json
14
+ {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"me","version":"0"}}}
15
+ {"jsonrpc":"2.0","method":"notifications/initialized"}
16
+ {"jsonrpc":"2.0","id":2,"method":"tools/list"}
17
+ {"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"search","arguments":{"query":"bell","resolve":true}}}
18
+ ```
19
+
20
+ Tools (as planned on `mcp.html`):
21
+
22
+ - `search` — find icons by name, family, motion archetype, cue or domain
23
+ (`query`, `limit`, `resolve`). With `resolve:true` and an exact name match,
24
+ the result carries the icon's SVG and full motion record.
25
+ - `get-icon` — one icon's kinetic SVG, all treatments or a single `treatment` group.
26
+ - `get-motion` — one icon's full motion record from the pack's motion map.
27
+ - `embed-snippet` — the HTML container and `init()` call, matched to the docs.
28
+
29
+ ## Free vs paid
30
+
31
+ | | No key (free) | With a validated key |
32
+ |---|---|---|
33
+ | Icons served | bundled free sampler set (`mcp-server/pack/`, 100 icons) | the full pack from `CUETRA_PACK_DIR` (6,646 icons) |
34
+ | Network | never - no request is made | one online licence check at startup, or none while the 7-day cache is fresh |
35
+ | Needs | nothing | `CUETRA_LICENCE_KEY` + `CUETRA_PACK_DIR` pointing at the unpacked full pack |
36
+
37
+ A key comes from the purchase flow: buy the founding pack at cuetra.com through
38
+ Polar or Dodo Payments and the receipt (or cuetra.com/redeem) shows the key.
39
+ Polar keys look like `CUETRA-P-7K2M-9QF3-B9ZX`; Dodo Payments keys are
40
+ five-group codes like `2b1f8e2d-c41e-4e8f-b2d3-d9fd61c38f43` - paste either
41
+ one, the server routes it to the processor that issued it. The full pack itself
42
+ is delivered at checkout - point `CUETRA_PACK_DIR` at the unpacked directory
43
+ you received.
44
+
45
+ ## How licence validation works
46
+
47
+ Paid access requires BOTH `CUETRA_LICENCE_KEY` and `CUETRA_PACK_DIR`, and the key must
48
+ PASS online validation with the licence service that issued it - Polar for
49
+ `CUETRA-...` keys, Dodo Payments for its five-group codes; both are public
50
+ key-as-credential endpoints, the key itself is the credential and no secret
51
+ ships with this server. Personal and Team keys take one seat on first use
52
+ (`activate`); Polar Business keys validate without consuming a seat, and a
53
+ Dodo key of any tier activates once per machine and re-validates its stored
54
+ activation afterwards. A Dodo key spells no tier out, so the tier is read from
55
+ the product that issued the key during the live check and kept in the cache
56
+ entry. Every successful live validation is cached for 7 days in a
57
+ key-hash-named JSON file under the OS user cache dir - never inside the repo,
58
+ and written only after a successful live check - so an offline start inside the
59
+ window still serves the full pack. Set `CUETRA_LICENCE_CACHE_DIR` to move the
60
+ cache.
61
+
62
+ Every class is honest and fail-closed to the free set, with the reason in the startup
63
+ notes; a paid icon name then gets the free-set refusal, never paid content:
64
+
65
+ | Class | Meaning | Paid content |
66
+ |---|---|---|
67
+ | `valid` | the issuing service accepted the key just now | served |
68
+ | `cache-valid` | a live check from the last 7 days is reused; no licence server is contacted this run | served, with a notice |
69
+ | `shape-invalid` | the key does not match a known Cuetra shape (Polar or Dodo); nothing is sent anywhere | denied |
70
+ | `rejected` | the licence service said no (unknown, revoked, expired, or every seat in use); its reason is shown | denied |
71
+ | `offline-no-cache` | the licence service could not be reached and no fresh validation is cached | denied until one online start |
72
+
73
+ Keys are masked in every note and error (`CUET...(23 chars)`); the full key never
74
+ appears in server output.
75
+
76
+ Data source: the served pack directory. Default is the bundled free set inside this
77
+ package, so the path is portable. All motion values come from the pack's `motion.json`
78
+ at run time. Diagnostics go to stderr; stdout carries protocol messages only.
@@ -0,0 +1,130 @@
1
+ #!/usr/bin/env node
2
+ // Cuetra MCP server entry point: newline-delimited JSON-RPC 2.0 over stdio, speaking the
3
+ // MCP stdio protocol (initialize handshake, notifications/initialized, tools/list,
4
+ // tools/call). Zero dependencies beyond Node builtins. stdout carries protocol messages
5
+ // only; diagnostics go to stderr.
6
+ import readline from "node:readline";
7
+ import { resolvePack } from "../lib/pack.js";
8
+ import { callTool, hasTool, listTools } from "../lib/tools.js";
9
+
10
+ const SERVER_INFO = { name: "cuetra-mcp", version: "0.1.0" };
11
+ const PROTOCOL_VERSION = "2025-06-18";
12
+ const SUPPORTED_PROTOCOL_VERSIONS = new Set(["2024-11-05", "2025-03-26", "2025-06-18"]);
13
+
14
+ const JSON_RPC_ERRORS = {
15
+ PARSE_ERROR: -32700,
16
+ METHOD_NOT_FOUND: -32601,
17
+ INVALID_PARAMS: -32602,
18
+ INTERNAL_ERROR: -32603,
19
+ };
20
+
21
+ function send(message) {
22
+ process.stdout.write(JSON.stringify(message) + "\n");
23
+ }
24
+
25
+ function sendError(id, code, message) {
26
+ send({ jsonrpc: "2.0", id, error: { code, message } });
27
+ }
28
+
29
+ function sendResult(id, result) {
30
+ send({ jsonrpc: "2.0", id, result });
31
+ }
32
+
33
+ function dispatch(pack, message) {
34
+ const { id, method, params } = message;
35
+
36
+ if (method === "initialize") {
37
+ // Respond with the client's requested protocol version when we support it, so both
38
+ // sides agree instead of the server unilaterally picking its newest.
39
+ const requested = params && params.protocolVersion;
40
+ const agreed = SUPPORTED_PROTOCOL_VERSIONS.has(requested) ? requested : PROTOCOL_VERSION;
41
+ return sendResult(id, {
42
+ protocolVersion: agreed,
43
+ capabilities: { tools: { listChanged: false } },
44
+ serverInfo: SERVER_INFO,
45
+ instructions:
46
+ "Search the Cuetra kinetic icon library, then fetch an icon with get-icon (SVG) and " +
47
+ "get-motion (motion record). All motion values come from the pack's motion.json.",
48
+ });
49
+ }
50
+
51
+ if (method === "notifications/initialized" || method.startsWith("notifications/")) {
52
+ return; // Notifications never get a response.
53
+ }
54
+
55
+ if (method === "ping") {
56
+ return sendResult(id, {});
57
+ }
58
+
59
+ if (method === "tools/list") {
60
+ return sendResult(id, { tools: listTools() });
61
+ }
62
+
63
+ if (method === "tools/call") {
64
+ const name = params && params.name;
65
+ if (!hasTool(name)) {
66
+ return sendError(id, JSON_RPC_ERRORS.INVALID_PARAMS, `unknown tool "${name}"`);
67
+ }
68
+ try {
69
+ const result = callTool(pack, name, params && params.arguments);
70
+ sendResult(id, {
71
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
72
+ isError: false,
73
+ });
74
+ } catch (error) {
75
+ sendResult(id, {
76
+ content: [{ type: "text", text: `error: ${error.message}` }],
77
+ isError: true,
78
+ });
79
+ }
80
+ return;
81
+ }
82
+
83
+ if (id !== undefined) {
84
+ sendError(id, JSON_RPC_ERRORS.METHOD_NOT_FOUND, `method "${method}" not found`);
85
+ }
86
+ }
87
+
88
+ // resolvePack is async because a configured full pack awaits the online licence
89
+ // validation; a free start (no key, no pack dir) returns from it without any
90
+ // network use.
91
+ async function main() {
92
+ let pack;
93
+ try {
94
+ pack = await resolvePack();
95
+ const licenceState = pack.licensed ? "licensed" : "unlicensed";
96
+ process.stderr.write(
97
+ `cuetra-mcp ${SERVER_INFO.version}: serving ${pack.iconNames.length} icons (${licenceState}) from ${pack.dir}\n`
98
+ );
99
+ for (const note of pack.notes) {
100
+ process.stderr.write(`cuetra-mcp: ${note}\n`);
101
+ }
102
+ } catch (error) {
103
+ process.stderr.write(`cuetra-mcp: ${error.message}\n`);
104
+ process.exitCode = 1;
105
+ return;
106
+ }
107
+
108
+ const lineReader = readline.createInterface({ input: process.stdin, terminal: false });
109
+ lineReader.on("line", (line) => {
110
+ const trimmed = line.trim();
111
+ if (!trimmed) return;
112
+ let message;
113
+ try {
114
+ message = JSON.parse(trimmed);
115
+ } catch {
116
+ sendError(null, JSON_RPC_ERRORS.PARSE_ERROR, "invalid JSON");
117
+ return;
118
+ }
119
+ try {
120
+ dispatch(pack, message);
121
+ } catch (error) {
122
+ sendError(message && message.id, JSON_RPC_ERRORS.INTERNAL_ERROR, error.message);
123
+ }
124
+ });
125
+ }
126
+
127
+ main().catch((error) => {
128
+ process.stderr.write(`cuetra-mcp: ${error.message}\n`);
129
+ process.exitCode = 1;
130
+ });