|
| 1 | +# AGENTS.md |
| 2 | + |
| 3 | +## Project Overview |
| 4 | + |
| 5 | +- `execbox` is a Node.js 22+ npm workspace that publishes the `@execbox/*` package family. |
| 6 | +- Core source lives under `packages/*/src`, tests live under `packages/*/__tests__`, runnable examples live under `examples/`, and the public docs site lives under `docs/`. |
| 7 | +- The workspace currently contains `@execbox/core`, `@execbox/protocol`, `@execbox/quickjs`, `@execbox/remote`, `@execbox/process`, `@execbox/worker`, and `@execbox/isolated-vm`. |
| 8 | +- Keep changes aligned with existing package boundaries. Prefer changing the owning package instead of introducing cross-package shortcuts. |
| 9 | + |
| 10 | +## Setup Commands |
| 11 | + |
| 12 | +- Install dependencies: `npm ci` |
| 13 | +- Lint: `npm run lint` |
| 14 | +- Type-check: `npm run typecheck` |
| 15 | +- Test default workspace lanes: `npm test` |
| 16 | +- Build published packages: `npm run build` |
| 17 | +- Build docs site: `npm run docs:build` |
| 18 | +- Run security-focused suites: `npm run test:security` |
| 19 | +- Run isolated-vm tests only when needed: `npm run test:isolated-vm` |
| 20 | +- Run the full isolated-vm verification lane: `npm run verify:isolated-vm` |
| 21 | + |
| 22 | +## Codebase Conventions |
| 23 | + |
| 24 | +- Do not edit generated `dist/` output under `packages/*/dist`; build artifacts are produced from source. |
| 25 | +- Preserve the existing ESM + TypeScript workspace structure and root script orchestration. |
| 26 | +- When you change exported APIs in `packages/*/src`, keep JSDoc in sync. ESLint requires JSDoc coverage for exported package symbols. |
| 27 | +- Prefer inline type imports where possible; the ESLint config enforces `@typescript-eslint/consistent-type-imports`. |
| 28 | +- Update examples or docs when you change public package behavior, developer workflow, or recommended runtime choices. |
| 29 | + |
| 30 | +## Testing Instructions |
| 31 | + |
| 32 | +- For most code changes, run `npm run format:check`, `npm run lint`, `npm run typecheck`, `npm test`, and `npm run build`. |
| 33 | +- If you change docs site content, navigation, or VitePress config, also run `npm run docs:build`. |
| 34 | +- If you touch execution boundaries, timeout handling, abort propagation, schema validation, or log/memory controls, also run `npm run test:security`. |
| 35 | +- If you touch `@execbox/isolated-vm` or codepaths guarded by `VITEST_INCLUDE_ISOLATED_VM`, run `npm run test:isolated-vm` or `npm run verify:isolated-vm`. |
| 36 | + |
| 37 | +## Security Notes |
| 38 | + |
| 39 | +- The provider and tool surface is the real capability boundary. Treat additions to provider exposure as security-relevant changes. |
| 40 | +- Preserve JSON-only boundaries, schema validation, bounded logs, timeout handling, memory controls, and abort propagation semantics. |
| 41 | +- Do not describe in-process runtimes as a hard security boundary for hostile or multi-tenant code. The current project security model is documented in `docs/security.md`. |
| 42 | + |
| 43 | +## Release Notes |
| 44 | + |
| 45 | +- Use Conventional Commits for git commit messages, for example `docs: add agent and contributor guides` or `fix(worker): handle timeout classification`. |
| 46 | +- Published package releases are managed with Changesets and GitHub Actions. |
| 47 | +- Add a `.changeset/*.md` entry when a change affects published package behavior, public APIs, or release notes for one or more `@execbox/*` packages. |
| 48 | +- Skip a changeset for docs-only, examples-only, CI-only, or internal maintenance changes that do not affect published package behavior. |
| 49 | + |
| 50 | +## Useful References |
| 51 | + |
| 52 | +- Start with `README.md` for the package map. |
| 53 | +- Use `docs/getting-started.md` for install and example expectations. |
| 54 | +- Use `docs/security.md` and `docs/architecture/README.md` before changing execution boundaries or runtime claims. |
| 55 | +- For the human-oriented contribution workflow, see `CONTRIBUTING.md`. |
0 commit comments