build_extension
Compile an Ableton Extension project by running npm install and npm run build in a given directory, returning build status, entrypoint, artifacts, and per-step output.
Instructions
Run a build of an Ableton Extension project.
Side effects: runs npm install and npm run build in the
supplied project directory.
Contract (v0.5.1): the JSON document returned by this tool has the following shape::
{
"status": "built" | "error",
"entrypoint": "dist/extension.js",
"entrypoint_exists": true,
"steps": [
{"step": "install", "returncode": 0,
"stdout": "...", "stderr": "..."},
{"step": "build", "returncode": 0,
"stdout": "...", "stderr": "..."}
],
"artifacts": ["dist/extension.js", "..."]
}entrypoint is read from package.json["main"] (falling back
to manifest.json["entry"] when main is missing) so the
contract reflects the project's own declaration. artifacts is
populated when status == "built" and lists every file under
dist/ relative to the project root. When the build completes
but the declared entrypoint is missing on disk, status flips
to "error" and entrypoint_exists is false.
Example: build_extension("/path/to/my-extension") runs
npm install then npm run build and returns the JSON
document above. Requires Node.js and npm on the host machine.
Edge cases: returns {"status": "error", "message": ...}
when package.json is missing; never raises during the
subprocess execution — every step's returncode is reported
in the steps array instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |