Skip to main content

A Runtime Kit package is a folder with one public files-and-names file. That file tells Bitfield what to store, which bytes the package owns, and which callable slots the package exposes.

What this is

Packages are how features enter Bitfield without turning into direct imports everywhere.A package can bring three public kinds of things:The package file says what exists. Runtime Kit decides how those declarations become public names.

The mental model

Put a boundary file in the package. The boundary file says, “Here is what this package wants Bitfield to know about.” Runtime Kit checks that file before package material becomes active.That check is important. The package should not quietly read files outside itself. It should not invent unsupported thing types. It should not force app code to import private setup. A package declares the public shape; Bitfield owns the admission path.

Folder shape

<package-set> is the collection for one product or project. <package-name> is one package inside that collection.

Boundary file

Every package has one boundary file:
Minimum file:
The package field names the package. The things array lists what the package declares.

Package sets

A package set is a named collection of packages for one product or project.Package sets matter because two projects can use the same package names without colliding. For example, two products can both have a package named search-package if they live in different package sets.

Record entry

Use record when the package needs one named piece of durable data.
The address is the stable package-owned name for that data. Keep the same address when you want to update the same piece of package data.A record chooses exactly one action:Do not combine those actions in one record.

Stored bytes entry

Use stored_bytes when a package brings a file.
source_path must point inside the package folder. That rule keeps packages from reading random files on the machine.Stored bytes are good for:
  • Help text.
  • JSON config.
  • Images or other package-owned assets.
  • Data files a callable slot needs.

Slot entry

Use slot when a package exposes a named target app code can call.
The public parts are the slot name, method list, call boundary, and package-owned artifact path. The slot implementation is not app API.Your app calls the slot through the action name:

Validation rules

Runtime Kit should reject package material before it becomes active when:

Before / after

Common mistakes

Putting secrets in package filesDo not put private keys, tokens, or account secrets into package records or stored bytes.Pointing outside the packagesource_path must stay inside the package folder. Move the file into the package instead of using ../.Using package data as app codeThe package file declares data and callable slots. App code should still use Runtime Kit read/request calls.Making the slot name too specificUse a stable action name like product.search. Do not bake an implementation name into the public action name.

Quick reference

Minimum:
Record:
Stored bytes:
Slot:
For exact top-level fields, thing-type fields, valid examples, invalid examples, and path-safety rules, read Package file. For complete Runtime Kit recipes, read Runtime Kit Cookbook.

Now build the bigger version

Build one package that owns a complete feature slice: data, a help file, and a callable target.
That package gives the app three public names: a prepared checklist input, package-owned help bytes, and the launch.next-step target. The app uses those handles instead of importing package setup code.
Last modified on May 10, 2026