|
5 | 5 | SPDX-License-Identifier: Apache-2.0 |
6 | 6 | --> |
7 | 7 |
|
8 | | -# @livekit/agents |
| 8 | +# aikit-js |
9 | 9 |
|
10 | 10 | This is a Node port of the [LiveKit Agents framework](https://livekit.io/agents), originally written in Python. |
11 | 11 |
|
| 12 | +## Development |
| 13 | +This project builds to Node-compatible JavaScript, but is developed using the faster [Bun](https://bun.sh) JavaScript runtime. As a superset of Node, there are some caveats: |
| 14 | + |
| 15 | +- Bun uses `package.json#workspaces` for monorepo handling, while pnpm uses `pnpm-workspace.yaml`. Using pnpm will therefore generate a new `node_modules/` for every subpackage. |
| 16 | +- Running the `build` script invokes the [considerably faster](https://bun.sh/images/bundler-speed.png) `Bun.build` bundler, as opposed to running `tsc`. |
| 17 | +- Other incompatibilities which may be added to the project at any time |
| 18 | + |
| 19 | +For this reason, while it should be possible to use npm, yarn, or pnpm with minor modifications to the builder, it is advised to install Bun. |
| 20 | + |
12 | 21 | ## Building |
13 | | -While any Node- or npm-compatible package manager should theoretically work for hacking on this project, the author uses the [bun](https://bun.sh) runtime. |
| 22 | + |
| 23 | +This project depends on an as-yet-unreleased version of `@livekit/rtc-node`. Thankfully, Bun allows us to easily link to local repositories: |
| 24 | + |
| 25 | +```sh |
| 26 | +~$ cd ~/src/node-sdks-temp/rtc-node |
| 27 | +rtc-node$ bun link |
| 28 | +Success! Registered "@livekit/rtc-node" |
| 29 | + |
| 30 | +rtc-node$ cd ~/src/aikit-js |
| 31 | +aikit-js$ bun link @livekit/rtc-node |
| 32 | +``` |
| 33 | + |
| 34 | +This will not add the package to `package.json`, however it will be imported and ready to use. Now you can build the project: |
| 35 | + |
| 36 | +```sh |
| 37 | +$ cd agents && bun run build |
| 38 | +``` |
| 39 | + |
| 40 | +Your output will be in the `dist/` directory. |
14 | 41 |
|
15 | 42 | ## License |
16 | 43 | This project is licensed under `Apache-2.0`, and is [REUSE-3.0](https://reuse.software) compliant. Refer to [the license](LICENSES/Apache-2.0.txt) for details. |
0 commit comments