Skip to main content

Package manifest: config

powerhouse.manifest.json describes a package. Its config array lists the environment variables the package needs, so a host (such as the Vetra hosting UI) can ask the operator for them.

{
"config": [
{ "name": "PH_API_URL", "type": "var", "required": true, "default": "https://api.example.com" },
{ "name": "PH_API_KEY", "type": "secret", "required": true },
{ "name": "AUTH_ENABLED", "type": "boolean", "default": "false", "description": "Require a signed-in caller." }
]
}

Entry fields​

FieldTypeMeaning
namestringThe environment variable. Entries are unique by name; ph generate merges by name.
type"var" | "secret" | "boolean"How the host asks for the value (below).
descriptionstring, optionalShown to the operator.
requiredboolean, optionalThe package does not work without a value.
defaultstring, optionalThe value the host falls back to, spelled as the env var would be.

Types​

TypeHost rendersValue writtendefault
varfree-text fieldthe textany string
secretmasked field, never displayed backthe textignored
booleantoggle"true" or "false""true" or "false" only

A package reads a boolean the way the Switchboard does: process.env.AUTH_ENABLED === "true".

Validation​

ph generate parses the manifest and stops on an invalid entry. The error is a JSON array with one item per problem. Each item gives its path as an array and its message, for example:

[
{
"code": "invalid_value",
"path": ["config", 0, "type"],
"message": "type must be one of \"var\", \"secret\", \"boolean\""
}
]

A boolean with a bad default gives "path": ["config", 2, "default"] and the message default must be "true" or "false" for a boolean entry.