Skip to Content

The manifest

pitafix-core.toml sits at the top of the core’s folder, and reading it runs nothing.

pitafix-core.toml sits at the top of the core's folder. Reading it runs nothing: PitaFix parses it, checks it, and shows parts of it to the person before anything is trusted. Here is a full one, annotated — the Rails core's, shortened:

schema = 1                    # the only manifest schema this build reads
id = "rails"                  # lower-case letters, digits, ".", "_" and "-", up to 64 chars;
                              # it becomes a folder name, and the run's core.id
name = "Rails"                # shown to the person; optional, id is used without it
version = "0.1.0"             # numbers with dots; a "-beta" suffix is fine
publisher = "you"             # optional; the install prompt says "not stated" without it
level = 2                     # 0, 1 or 2
protocol = 1                  # level 2 only: the JSON-RPC protocol major. Changed only for
                              # breaking changes, and a wrong one means the core won't run

[app]
compatible = ">=0.1 <2"       # the app versions this core works with, as a space-separated
                              # range of comparisons

[detect]                      # evaluated by the app itself, so a core is offered for the
any_files = ["Gemfile"]       # projects it fits without any of its code ever running.
contains = [{ glob = "Gemfile", text = "rails" }]
#   any_files  holds when one of these paths or globs exists
#   all_files  holds when each of them does
#   contains   holds when, for each entry, some file matching glob contains text (literal)

[run]                         # how the core's process is started; paths are relative to
command = ["bin/pitafix-core-rails"]  # this file. Level 0 and 2. At level 2 only {core}
                              # and {root} are filled, since the one process serves every job.

[capabilities]                # what the core can do; confirmed again at initialize,
provides = ["detect", "doctor", "discover", "capture", "attribute"]
joins = ["attribute"]         # job verbs that hold something up for a run driven elsewhere
                              # and end on job/stop. Level 2 only; see "Joins" below.
settings = ["browser"]        # the person's settings the core honours: "crawl" (a crawl's
                              # budget, as the options crawlDepth and crawlSteps, and
                              # crawlSeconds, which is always 28800: the person sets no
                              # time) and "browser" (viewportWidth, viewportHeight,
                              # deviceScaleFactor, colorScheme as "light" or "dark", and
                              # touch as "1" for a phone's browser). "shards" is how many
                              # processes walk a whole map side by side, as the option
                              # shards from 2 to 4, given only to a walk that is whole
                              # and has no budget. Each one set comes as
                              # a capture option; one left out means the core's own. A
                              # crawl's walk says the part of its time that is the budget
                              # in budgetSeconds, and should say budgetSteps and
                              # stepSeconds, what a tap takes: it is then shown as taking
                              # the time its taps come to, and without them as eight hours.
rig = true                    # the core captures a project by its rig: it is told the installed
                              # rig's folder as the option "rig", and walks the journeys the
                              # rig lists. See "Capture a project by its rig". The app sets a
                              # project up with a rig only for a core that says so.

[permissions]                 # consent and audit, not enforcement: the person reads this
exec = ["git", "tar", "bundle", "ruby", "psql"]  # before saying yes, and PitaFix keeps what it
network = "toolchain"         # showed. A core is a native process with the person's rights;
writes = ["$OUT", "$CACHE"]   # nothing stops it doing more, so write this honestly.
untrusted_project = "limited" # "limited" means doctor and static discover are safe to run
                              # before the person trusts the project. Anything else means the
                              # core doesn't start until then.

[[targets]]                   # what the core captures on, one table each, by the id of a
id = "web"                    # target its detect answers. The app reads these with nothing
name = "Headless Chromium"    # run: name is the row's word for it,
device = "browser"            # device is host-jvm, emulator, simulator, browser or mac,
data = "local-core"           # data is fixture or local-core,
# input = "native-tap"        # optional: how taps arrive, only when the run's input facet says so
needs = ["ruby", "bundle"]    # doctor's checks that must pass on this Mac, by id

Notes on the fields that bite:

  • network is none, toolchain or any. toolchain means the network is for fetching what the build needs (packages, a browser), not for the project's code to call out.
  • writes supports the placeholders $OUT and $CACHE for the run and cache folders the app hands the core; ~/... paths work too (the Kotlin core lists ~/.gradle for exactly what it is).
  • secrets names Keychain-backed secrets the core may ask for through app/secret at level 2. The person is prompted for each.
  • [run.platforms] can override command per platform: a key such as "darwin-arm64" with its own argv.
  • [[targets]] declares what the core captures on, one table for each target its detect answers. id is that target's id and name the row's word for it. device is where the app is drawn: host-jvm, emulator, simulator, browser or mac. data is where its data comes from, fixture or local-core. input is how taps arrive, in a run's input facet's words (native-tap, semantics-click, typed-dispatch, joined with + when it mixes them), and goes in only when the core's runs say it. needs lists the doctor checks that must pass on this Mac, by id; a check this build's doctor doesn't have is a warning, and the target is not offered. The table declares no proof level. The app works out what a capture on a target proves, the same way for every core: fixture data is rendered-fixture whatever taps it, a local server's data with native taps is native-tap, and a walk's own proof still wins where a core earns more per step. A target detect answers that the manifest doesn't declare is listed under the core's name for it and "Proof unknown"; pitafix core test fails a core that declares targets and answers one outside them, whether detect or static discover answers it. A walk's dataSource selects its data mode, so a browser target declared with fixture data can also offer staging walks. A target is the thing that drives the app, and a project's data and setup are its rig's: see Capture a project by its rig. An entry named <platform>-mirror, such as web-mirror or ios-mirror, is what puts Start Live on that platform's frames; see Live sessions. The table was [[rigs]] before a project's rig became a thing of its own. A manifest that still says [[rigs]] has it read as its targets, with a warning to rename it, so a core installed before the change keeps working.
  • rig = true under [capabilities] is for a core that captures by a project's rig. The app sets a project up with a rig only for a core that says so, and pitafix rig test fails a core that doesn't.
  • Unknown keys are ignored and come back as warnings, so a newer manifest still loads — but check the warnings, because a misspelt key reads the same way.
  • Names, publishers, prompts and permissions must be plain text: no control characters or line breaks, and names at most 120 characters. A prompt is where a person decides, and a newline in a name can print a friendlier permissions block above the real one.

On this page