upsert_rewrite_script
Create or update an immutable ESM rewrite script package via manifest, modules, or one-file content; optionally reload the rewrite snapshot.
Instructions
Creates a new ESM rewrite script package or publishes a new immutable revision. Provide manifest/modules for multi-file packages, or content as a one-file shorthand. Set reload=true to request an immediate runtime snapshot reload after persistence.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Existing script package id. Omit to create a package. | |
| name | No | Script name. Required when creating; optional when updating. | |
| reload | No | Request an immediate rewrite snapshot reload after the package is stored. | |
| content | No | One-file shorthand. Converted to main.js with the default restricted permissions. | |
| modules | No | Complete module source list matching manifest.modules. | |
| manifest | No | Complete ESM package manifest. |