Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.bitfield.so/llms.txt

Use this file to discover all available pages before exploring further.

Reference

Package boundary.

things-to-store-and-run.json is the public file where a package declares what Bitfield should admit.

Minimum file

{
  "package": "sample-package",
  "things": []
}

Top-level fields

FieldTypeRequiredMeaning
packagestringyesPackage name inside the package set.
thingsarrayyesRecords, stored bytes, or slots declared by the package.
Unknown top-level fields may be rejected by the package compiler.

Thing types

TypeRequired fieldsMeaning
recordtype, address, one payload choiceStore or remove one addressed record.
stored_bytestype, name, source_pathStore package-owned bytes under a package-owned name.
slottype, name, methods, boundary, artifact or build dataMake one runnable thing callable.
Unknown thing types are rejected before they become active.The machine-readable public schema lives at reference/package-boundary.schema.json. Workflow examples are checked against that schema during docs:check.

Record

{
  "type": "record",
  "address": "package::sample-package::main",
  "payload": { "ready": true }
}
A record chooses exactly one payload action:
  • payload
  • payload_text
  • payload_base64
  • remove: true

Stored bytes

{
  "type": "stored_bytes",
  "name": "help.txt",
  "source_path": "help.txt"
}
source_path must point inside the package. The package compiler must not accept a path that escapes the package folder.

Slot

{
  "type": "slot",
  "name": "sample-slot",
  "methods": [{ "name": "query" }],
  "boundary": {
    "call_shape": "envelope-bytes-in-envelope-bytes-out",
    "methods": [{ "name": "query" }]
  },
  "artifact": {
    "source_path": "slots/sample-slot.bin"
  }
}
A slot declares the public door and the artifact or build data needed to admit it. Implementation details stay behind the plug.

Error shape

Package compiler errors are machine-readable. A UI should use the error code and message it receives instead of copying error strings into its own local table.
Last modified on May 9, 2026