Instruction file imported from hyperlight-dev/hyperagent (
.github/instructions/builtin-modules.instructions.md). Copyright stays with the author.
Builtin Modules
Modules that run inside the Hyperlight sandbox, available to guest JavaScript via require("ha:<module>").
Rules
- Source files — Edit only
src/*.tsfiles - Generated files —
*.jsand*.d.tsin the root are auto-generated - Regenerate — Run
npm run build:modulesafter editing source - Enforced by —
tests/dts-sync.test.tscompares compiled output to committed files
Module Header Format
Each module should have a standard header comment:
// @module <name>
// @description <description>
// @created <ISO date>
// @modified <ISO date>
// @mutable false
// @author system
Current Modules
| Module | Purpose |
|---|---|
base64 |
Base64 encode/decode for Uint8Array |
crc32 |
CRC32 checksum calculation |
xml-escape |
XML entity escaping |
zip-format |
ZIP file creation |
str-bytes |
String/bytes conversion |
ooxml-core |
Core OOXML utilities |
pptx |
PowerPoint generation |
pptx-charts |
Chart support for PPTX |
pptx-tables |
Table support for PPTX |
shared-state |
Cross-handler state management |
Workflow
- Edit
src/<module>.ts - Run
npm run build:modules - Commit both source and generated files
- Test via
just test