2026-05-26 03:21:11 +00:00
|
|
|
# Configuration Reference
|
|
|
|
|
|
2026-11-23 03:41:47 +00:00
|
|
|
Scriptorium uses [ConfigKit v1.4.0][configkit] for application configuration
|
|
|
|
|
and embeds [PromptKit v0.25.0 settings][formats] under `promptkit`. The
|
|
|
|
|
[CLI reference](cli.md) describes selection and inspection commands.
|
2026-05-26 03:21:11 +00:00
|
|
|
|
2026-07-26 14:16:09 +00:00
|
|
|
## Discovery And Precedence
|
2026-07-05 03:02:11 +00:00
|
|
|
|
2026-11-23 03:41:47 +00:00
|
|
|
`--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][configkit] for their
|
|
|
|
|
expansion, filenames, errors, and optional exhaustion. Candidates are not layers.
|
2026-05-26 03:21:11 +00:00
|
|
|
|
2026-11-23 03:41:47 +00:00
|
|
|
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.
|
2026-11-20 05:08:40 +00:00
|
|
|
|
|
|
|
|
## Application Settings
|
|
|
|
|
|
2026-11-23 03:41:47 +00:00
|
|
|
See [minimal](../examples/config.yml), [complete](../examples/config.full.yml),
|
|
|
|
|
[composed](../examples/config.composed.yml), and
|
|
|
|
|
[collection discovery](../examples/config.discovery.yml) examples. PromptKit
|
|
|
|
|
settings and definitions live under `promptkit`; their fields, formats, resource
|
|
|
|
|
contexts, schemas, repair, and provider behavior belong to [PromptKit][formats].
|
|
|
|
|
The former `promptkit.configuration` and `promptkit.schema_dir` selectors are
|
|
|
|
|
rejected; use native imports and settings instead.
|
|
|
|
|
|
|
|
|
|
| Application field | Default | Meaning |
|
2026-11-20 05:08:40 +00:00
|
|
|
| --- | --- | --- |
|
2026-11-23 03:41:47 +00:00
|
|
|
| `transient_retries` | upstream default | Optional nonnegative engine retry count; null/omission delegates upstream. |
|
2026-11-20 05:08:40 +00:00
|
|
|
| `server.addr` | `:8080` | HTTP listen address. |
|
2026-11-23 03:41:47 +00:00
|
|
|
| `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](api.md) describes enforcement.
|
2026-11-20 05:08:40 +00:00
|
|
|
|
|
|
|
|
## Explicit Imports And Selected Overlays
|
|
|
|
|
|
2026-11-23 03:41:47 +00:00
|
|
|
Root `config.imports`, selected `--overlay` names, and `--set` records are
|
|
|
|
|
passed to ConfigKit. See its [composition and overlay contract][configkit] 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.
|
2026-10-04 13:04:02 +00:00
|
|
|
|
2026-11-20 05:08:40 +00:00
|
|
|
## Framework Source Mapping
|
2026-10-04 13:04:02 +00:00
|
|
|
|
2026-11-23 03:41:47 +00:00
|
|
|
The shared document may import complete framework entries or place wrapperless
|
|
|
|
|
fragments at `promptkit`. The [maintained entry](../examples/promptkit.yml) and
|
|
|
|
|
[collection example](../examples/collections.yml) illustrate native placement.
|
|
|
|
|
No application source list or second framework load is involved.
|
2026-10-04 13:04:02 +00:00
|
|
|
|
2026-11-20 05:08:40 +00:00
|
|
|
### Collection Checkout Discovery
|
2026-11-18 19:25:54 +00:00
|
|
|
|
2026-11-23 03:41:47 +00:00
|
|
|
The [discovery entry](../examples/discovery/framework.yml) 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.
|
2026-11-20 05:08:40 +00:00
|
|
|
|
|
|
|
|
## Inspection And Credentials
|
|
|
|
|
|
2026-11-23 03:41:47 +00:00
|
|
|
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](cli.md#application-configuration-inspection)
|
|
|
|
|
and [native inspection][configkit].
|
|
|
|
|
|
|
|
|
|
Scriptorium explicitly invokes [ConfigKit secrets bootstrap][secrets] before
|
|
|
|
|
each acquisition. Native main-file controls may populate the process environment;
|
|
|
|
|
their overwrite and failure behavior belongs to ConfigKit. The
|
|
|
|
|
[synthetic example](../examples/config.secrets.yml) 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.
|
|
|
|
|
|
|
|
|
|
[formats]: https://forge.maximumdirect.net/base-layer/promptkit/src/commit/207677e9948dc5699073a4d6620d21139033c72d/docs/formats.md
|
|
|
|
|
[configkit]: https://forge.maximumdirect.net/base-layer/configkit/src/commit/4a7ae664a6287d71cba20f59c7c5b37b6f05b0a3/docs/config.md
|
|
|
|
|
[secrets]: https://forge.maximumdirect.net/base-layer/configkit/src/commit/4a7ae664a6287d71cba20f59c7c5b37b6f05b0a3/docs/config.md#explicit-secrets-directory-bootstrap
|