Files
scriptorium/docs/config.md

4.7 KiB

Configuration Reference

Scriptorium uses ConfigKit v1.4.0 for application configuration and embeds PromptKit v0.25.0 settings under promptkit. The CLI reference describes selection and inspection commands.

Discovery And Precedence

--config selects one main file explicitly, including an empty selection. When omitted, Scriptorium asks ConfigKit to search its WorkingDirectory, UserConfigDirectory, HomeDirectory, and UnixSystemDirectories presets in that order. Consult ConfigKit's discovery contract for their expansion, filenames, errors, and optional exhaustion. Candidates are not layers.

Scriptorium enables imports and puts PromptKit's bundled OpenRouter definitions in the lowest underlay. ConfigKit owns composition, selected overlays, native overrides, validation, and inspection. The completed typed configuration is passed directly to PromptKit; it is not merged or resolved a second time.

Application Settings

See minimal, complete, composed, and collection discovery examples. PromptKit settings and definitions live under promptkit; their fields, formats, resource contexts, schemas, repair, and provider behavior belong to PromptKit. The former promptkit.configuration and promptkit.schema_dir selectors are rejected; use native imports and settings instead.

Application field Default Meaning
transient_retries upstream default Optional nonnegative engine retry count; null/omission delegates upstream.
server.addr :8080 HTTP listen address.
server.artifact_root empty Root enabling HTTP file references.
server.max_request_bytes 16777216 Encoded request limit; zero is unlimited.
server.max_artifact_bytes 16777216 File-artifact limit; zero is unlimited.
server.max_response_bytes 16777216 Encoded response limit; zero is unlimited.

Limits are nonnegative signed 64-bit values. Address whitespace is trimmed and the artifact-root path is trimmed and cleaned during native resolution; its relative path is interpreted from the process working directory. The HTTP contract describes enforcement.

Explicit Imports And Selected Overlays

Root config.imports, selected --overlay names, and --set records are passed to ConfigKit. See its composition and overlay contract for rules and source-relative paths. Both native inspection scopes support overrides; paths remain rooted at the application document. Comparison selections are independent, but process-environment effects follow native sequential behavior.

Framework Source Mapping

The shared document may import complete framework entries or place wrapperless fragments at promptkit. The maintained entry and collection example illustrate native placement. No application source list or second framework load is involved.

Collection Checkout Discovery

The discovery entry imports both optional collection-entry spellings. Each checkout declares its own namespace and source-relative resources. A later invocation sees newly installed checkouts; the running server does not hot-reload them.

Inspection And Credentials

Both app and focused promptkit inspect the same kind of complete resolved document. Loading and validation cover the whole document; a focused view is not an isolation boundary. See CLI inspection and native inspection.

Scriptorium explicitly invokes ConfigKit secrets bootstrap before each acquisition. Native main-file controls may populate the process environment; their overwrite and failure behavior belongs to ConfigKit. The synthetic example demonstrates the integration. PromptKit resolves named credentials at its own lifecycle point. Raw api_key fields in root or collection backends/profiles are rejected; use environment variable names. Native sensitivity applies to classified paths, not arbitrary prompt or generated content. Treat inspection and output as potentially sensitive.