107 lines
2.4 KiB
Markdown
107 lines
2.4 KiB
Markdown
# JWeBot Configuration
|
|
|
|
JWeBot uses profile packages instead of repository-local environment files.
|
|
Profiles are structurally similar to plugins: each package has a manifest,
|
|
independent component files, private context, secrets, and optional overrides.
|
|
Per-person SteamID mappings and Steam query aliases belong only in private
|
|
context and are removed from redacted exports.
|
|
|
|
## Public Template
|
|
|
|
`config/templates/default/` is safe to commit and contains no real identity,
|
|
host, account, API key, or incident data.
|
|
|
|
```text
|
|
default/
|
|
manifest.toml
|
|
components/
|
|
bot.toml
|
|
providers.toml
|
|
runtime.toml
|
|
debug.toml
|
|
notification.toml
|
|
deployment.toml
|
|
context/
|
|
people.json
|
|
secrets/
|
|
runtime.env
|
|
overrides/
|
|
runtime.env
|
|
root.env
|
|
```
|
|
|
|
## Local Profile
|
|
|
|
Create and activate a local profile:
|
|
|
|
```sh
|
|
./tools/jwebot-config.py init personal --activate
|
|
```
|
|
|
|
The command writes only outside the repository:
|
|
|
|
```text
|
|
~/.config/jwebot/
|
|
current -> profiles/personal
|
|
profiles/personal/
|
|
...source profile files...
|
|
generated/
|
|
runtime.env
|
|
root.env
|
|
private-context.json
|
|
notification.json
|
|
manifest.json
|
|
```
|
|
|
|
Source components are compiled into a temporary directory, validated, and
|
|
renamed atomically. Runtime services read only `current/generated/`.
|
|
|
|
## Private State
|
|
|
|
Runtime and migrated diagnostic material lives separately:
|
|
|
|
```text
|
|
~/.local/state/jwebot/profiles/personal/
|
|
debug/sessions/
|
|
incidents/
|
|
telemetry/
|
|
archives/
|
|
root/
|
|
```
|
|
|
|
Every profile and state directory is mode `0700`; generated files, secrets,
|
|
private context, and archives are mode `0600`.
|
|
|
|
## Import And Export
|
|
|
|
Import another profile directory or `.tar.gz` package:
|
|
|
|
```sh
|
|
./tools/jwebot-config.py import profile.tar.gz --activate
|
|
```
|
|
|
|
Create a redacted package for review:
|
|
|
|
```sh
|
|
./tools/jwebot-config.py export personal \
|
|
--output /tmp/personal-redacted.tar.gz
|
|
```
|
|
|
|
The default export empties secrets and removes people/clock context. Use
|
|
`--include-private` only for a deliberately protected local backup.
|
|
|
|
## Legacy Migration
|
|
|
|
Archive old root-level debug files, incident reports, operational material,
|
|
environment values, and static person aliases:
|
|
|
|
```sh
|
|
./tools/jwebot-config.py migrate-legacy personal \
|
|
--repository /path/to/old/repository \
|
|
--activate
|
|
```
|
|
|
|
Migration never adds private material to Git. The original source is left
|
|
unchanged, and the imported material is copied into the private profile/state
|
|
tree.
|