Skip to main content

Use stored_bytes when a package needs to bring file bytes with it: help text, JSON rules, images, prompts, lookup tables, or any other package-owned material.

This recipe builds a package called help-package that carries one text file. The app does not read random disk paths. The package declares the file, Runtime Kit checks the path, and the admitted package owns the bytes under a stable name.

When to use this

Use stored_bytes when the file is part of the package.The important rule: the package may point at files inside itself. It may not quietly read the rest of the machine.

What you will build

Folder shape

The source file is inside the package. That is what makes the path safe to admit.

Boundary file

The public name is small:

File content

Verify the recipe

Use this checklist before adding the bytes to a bigger feature:

What should happen

Why this shape works

The package gives the bytes a public package name: getting-started-help. The package also points at the file inside the package folder. Bitfield can reject a file path that tries to escape the package.That keeps the package file clear. The package can bring bytes with it, but it cannot quietly read random files from the machine.

Common failures

Extend it

After this works, you can grow the package without changing the shape:
  1. Add another stored_bytes entry for a second file.
  2. Add a record that points a screen at which help file to show.
  3. Add a slot target that can search or summarize the package-owned bytes.
  4. Add a React surface that reads named data and asks the target for help.
Keep the same rule: the package declares the bytes; app code uses public Runtime Kit surfaces.

Next

Read Callable package slot when the package needs a named target that can do work.Read Package file when you need exact field constraints.
Last modified on May 10, 2026