Package managers
The lockfile decides which package manager installs your dependencies, with a frozen install, so the build gets exactly what your lockfile says:
Development dependencies are installed too, so
build.commands can use them. See Dependencies.
TypeScript runs directly
Onecortex never runs your owntsc. It bundles your entrypoint and everything it imports from your own code into one file, for the Node.js version you chose, with inline source maps so a stack trace in your logs points at your source. Your dependencies stay in node_modules and load from there, so native modules keep working.
This means path aliases, ESM and CommonJS, and tsconfig.json project references all work without a build step. If your agent needs one anyway, such as code generation, declare it:
agent.yml
build.commands runs after your dependencies are installed and before the bundle, in the agent folder, with no configuration or secrets available.
Your agent’s own files
The whole agent folder is in the image, and it is the working directory. An agent that reads a prompt or a data file at run time finds it where it is in your repository:agent.ts
The architecture
Every agent runs on 64 bit ARM Linux. A dependency with a native binary needs a build forlinux-arm64, which most publish.
Related
- Entrypoints: how your agent object is found.
- Frameworks: each TypeScript framework’s page.
- The
agent.ymlreference.