Instruction file imported from hyperlight-dev/hyperagent (
.github/instructions/src.instructions.md). Copyright stays with the author.
Source Directory
Core Hyperagent implementation, organised by domain.
Subdirectories
agent/
Main agent REPL and supporting utilities:
state.ts— Typed mutable state container for the agentcommands.ts— Slash command implementationssystem-message.ts— LLM system prompt generationskill-loader.ts— Loads skills fromskills/directorytool-gating.ts— Permission system for toolsanalysis-guest.ts— Static analysis via Rust guest
plugin-system/
Plugin discovery, loading, and security:
manager.ts— Plugin lifecycle managementauditor.ts— Static security analysis of pluginstypes.ts— TypeScript types for plugin system
sandbox/
Hyperlight sandbox integration:
tool.d.ts— Type definitions for sandbox tools
code-validator/
Rust-based static analysis:
guest/— Rust code compiled to run in Hyperlight- Contains its own
Cargo.tomland Rust project structure
Conventions
- All agent state flows through
AgentStateinterface (seeagent/state.ts) - No module-level mutable state — pass state explicitly
- TypeScript strict mode enabled