{"_id":"@dezchai/cursory","_rev":"2-cbe2c5c978e1c0c5d0e291ebd0353525","name":"@dezchai/cursory","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@dezchai/cursory","version":"0.1.0","license":"GPL-3.0-or-later","_id":"@dezchai/cursory@0.1.0","maintainers":[{"name":"dezchai","email":"npm@desmondchai.com"}],"homepage":"https://github.com/dezchai/cursory","bugs":{"url":"https://github.com/dezchai/cursory/issues"},"dist":{"shasum":"6edde1119ce39fda378cafa83a67f07b438b8675","tarball":"https://registry.npmjs.org/@dezchai/cursory/-/cursory-0.1.0.tgz","fileCount":9,"integrity":"sha512-7MormHd2q2XiO09AYaMkYS81P3jBdBWz5Q90xG9OQ9JNeJV3GPLz0Uk18lWTQVNz4Je123Y6C3JrGPGi+qn9LA==","signatures":[{"sig":"MEUCIDKBdj2fZ0uIJLanxRNLkDptYocYUhhTr7tOecD9yYvSAiEAn2S3XHEYsQf1IOnpGYsjpBQ5XSf800TOiJKChVb61t8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":717443},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"d7bdf5cb9a39b3339f38f630fac81d4c28161732","scripts":{"test":"bun test","build":"tsc -p tsconfig.build.json","typecheck":"tsc --noEmit","prepublishOnly":"npm run build && npm run typecheck && npm run test"},"_npmUser":{"name":"dezchai","email":"npm@desmondchai.com"},"repository":{"url":"git+https://github.com/dezchai/cursory.git","type":"git"},"_npmVersion":"11.5.1","description":"Bun/TypeScript port of cursory for generating realistic mouse trajectories.","directories":{},"_nodeVersion":"24.7.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.11","typescript":"^5.9.3","@types/node":"^24.5.2"},"_npmOperationalInternal":{"tmp":"tmp/cursory_0.1.0_1774736149306_0.43248676721226764","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@dezchai/cursory","version":"0.1.1","description":"Bun/TypeScript port of cursory for generating realistic mouse trajectories.","keywords":["bot","bots","botting","browser","cursor","mouse","mouse-trajectory","patchright","playwright","stealth","trajectory","trajectory-generation","undetectable","undetected","web-automation","web-scraping","webautomation","webdriver","webscraping"],"license":"GPL-3.0-or-later","type":"module","repository":{"type":"git","url":"git+https://github.com/dezchai/cursory.git"},"homepage":"https://github.com/dezchai/cursory","bugs":{"url":"https://github.com/dezchai/cursory/issues"},"publishConfig":{"access":"public"},"main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"build":"tsc -p tsconfig.build.json","test":"bun test","typecheck":"tsc --noEmit","prepublishOnly":"npm run build && npm run typecheck && npm run test"},"devDependencies":{"@types/node":"^24.5.2","@types/bun":"^1.3.11","typescript":"^5.9.3"},"gitHead":"c57110f05d55cee1db190762cf08ee5b7f03fc78","_id":"@dezchai/cursory@0.1.1","_nodeVersion":"24.14.0","_npmVersion":"11.9.0","dist":{"integrity":"sha512-KDmSj/Cy1nBsL13jLSPMgk8lMKlPd8cMDM+gs4vE286HswJAhuhF9/BIV+ZzthICr3AbBlzdLFbIPLhVZJrICQ==","shasum":"6a735146054a4c52fa74eae8856963bc83d79ba0","tarball":"https://registry.npmjs.org/@dezchai/cursory/-/cursory-0.1.1.tgz","fileCount":9,"unpackedSize":717806,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dezchai%2fcursory@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFJfGnu2Lj5EsGOrVJHqLjM/e2cG7UxrHEMJAmviKfjJAiBWfZY4wMziSKTJM9ij1c7cXEbC91K62UlGhz2wMaeAsg=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:aeeeeb5b-6c06-43dc-9e6d-73f5c17b3516"}},"directories":{},"maintainers":[{"name":"dezchai","email":"npm@desmondchai.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cursory_0.1.1_1774737325074_0.9159467832195423"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-28T22:15:49.203Z","modified":"2026-03-28T22:35:25.519Z","0.1.0":"2026-03-28T22:15:49.543Z","0.1.1":"2026-03-28T22:35:25.266Z"},"bugs":{"url":"https://github.com/dezchai/cursory/issues"},"license":"GPL-3.0-or-later","homepage":"https://github.com/dezchai/cursory","repository":{"type":"git","url":"git+https://github.com/dezchai/cursory.git"},"description":"Bun/TypeScript port of cursory for generating realistic mouse trajectories.","maintainers":[{"name":"dezchai","email":"npm@desmondchai.com"}],"readme":"# cursory\n\nTypeScript port of the original Python project [Vinyzu/cursory](https://github.com/Vinyzu/cursory).\n\nThis package generates human-like mouse trajectories by selecting from a dataset of recorded trajectories, morphing them to the requested start and end points, and re-sampling them with timing noise.\n\n## Install\n\n```bash\nnpm install @dezchai/cursory\n```\n\n```bash\nbun add @dezchai/cursory\n```\n\nIf you are using this repository directly:\n\n```bash\nnpm install\n```\n\n```bash\nbun install\n```\n\n## Basic Usage\n\n```ts\nimport { generateTrajectory } from \"@dezchai/cursory\";\n\nconst { points, timings } = generateTrajectory([0, 0], [200, 100]);\n```\n\n## Example Trajectories\n\nThese visuals come from the original project and illustrate the style of generated paths:\n\n| Random Points | Same Points | Points / Velocity |\n|:--:|:--:|:--:|\n| <img height=\"320\" alt=\"Random Points\" src=\"https://github.com/user-attachments/assets/07eaebb0-6798-45d1-9182-2ffd5f1e42d7\" /> | <img height=\"320\" alt=\"Same Points\" src=\"https://github.com/user-attachments/assets/81eb79df-e274-4200-b74c-5f57f4899a3f\" /> | <img height=\"320\" alt=\"Points / Velocity\" src=\"https://github.com/user-attachments/assets/e7fad0e3-1b56-4c85-a139-42601288701c\" /> |\n\n## API\n\n### `generateTrajectory(start, end, options?)`\n\nGenerates a trajectory between two points.\n\n```ts\nimport { generateTrajectory, type Point, type RandomSource } from \"@dezchai/cursory\";\n\nconst start: Point = [25, 40];\nconst end: Point = [640, 360];\n\nconst result = generateTrajectory(start, end, {\n  frequency: 60,\n  frequencyRandomizer: 1,\n});\n\nconsole.log(result.points);\nconsole.log(result.timings);\n```\n\n#### Parameters\n\n- `start: [number, number]` - starting point.\n- `end: [number, number]` - ending point.\n- `options.frequency?: number` - target sample rate in Hz. Defaults to `60`.\n- `options.frequencyRandomizer?: number` - maximum per-sample timing jitter in milliseconds. Defaults to `1`.\n- `options.random?: { next(): number }` - optional deterministic random source for repeatable outputs.\n\n#### Returns\n\n- `points: [number, number][]` - sampled trajectory points.\n- `timings: number[]` - timestamps in milliseconds, aligned with `points`.\n\n### `getTrajectoryCount()`\n\nReturns the number of bundled source trajectories in the dataset.\n\n## Deterministic Usage\n\nYou can pass a custom random source if you want reproducible output for tests or debugging.\n\n```ts\nimport { generateTrajectory, type RandomSource } from \"@dezchai/cursory\";\n\nclass SeededRandom implements RandomSource {\n  private state: number;\n\n  constructor(seed: number) {\n    this.state = seed >>> 0;\n  }\n\n  next(): number {\n    this.state = (1664525 * this.state + 1013904223) >>> 0;\n    return this.state / 0x100000000;\n  }\n}\n\nconst result = generateTrajectory([0, 0], [300, 180], {\n  random: new SeededRandom(12345),\n});\n```\n\n## Compatibility\n\nThis package is built for modern ESM runtimes and can be installed with either npm or Bun.\n\n- Package managers: npm, Bun\n- Runtimes: Node.js, Bun\n- Module format: ESM\n- Published entrypoint: `dist/index.js`\n\n## Copyright and License\n\nThis project is licensed under `GPL-3.0-or-later`.\n\nThe bundled trajectory dataset and original methodology come from [Vinyzu/cursory](https://github.com/Vinyzu/cursory) and remain subject to the same license terms.\n\nCommercial usage is allowed under GPL terms, which means source, license, and copyright notices must remain available.\n\n## Credits\n\n- [Vinyzu](https://github.com/Vinyzu/) for the original `cursory` project, dataset, and implementation.\n- [Pointergeist](https://github.com/Pointergeist) for helping the original author understand mouse trajectories better.\n- [sameelarif](https://github.com/sameelarif/) for work on [Scribe](https://github.com/sameelarif/scribe).\n- [Margit Antal, Norbert Fejer, Krisztian Buza](https://github.com/margitantal68) for their work on SapiMouse.\n- [MIMIC-LOGICS](https://github.com/MIMIC-LOGICS/) for Mouse-Synthesizer.\n\n## Disclaimer\n\nThis repository is provided for educational purposes only.\n\nNo warranties are provided regarding accuracy, completeness, or suitability for any purpose. Use at your own risk. The authors and maintainers assume no liability for damages, legal issues, or warranty breaches resulting from use, modification, or distribution of this code.\n","readmeFilename":"README.md","keywords":["bot","bots","botting","browser","cursor","mouse","mouse-trajectory","patchright","playwright","stealth","trajectory","trajectory-generation","undetectable","undetected","web-automation","web-scraping","webautomation","webdriver","webscraping"]}