release: public alpha 0.6.0 baseline
This commit is contained in:
@@ -0,0 +1,106 @@
|
||||
# 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.
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://jwebot.example/schemas/debug-event.schema.json",
|
||||
"title": "JWeBot privacy-safe debug event",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["version", "timestamp", "name", "status"],
|
||||
"properties": {
|
||||
"version": {"const": 1},
|
||||
"timestamp": {"type": "string", "format": "date-time"},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z0-9_.-]{1,120}$"
|
||||
},
|
||||
"status": {
|
||||
"enum": ["ok", "error", "timeout", "skipped", "uncertain"]
|
||||
},
|
||||
"elapsed_ms": {
|
||||
"type": "number",
|
||||
"minimum": 0
|
||||
},
|
||||
"event_hash": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-f0-9]{0,64}$"
|
||||
},
|
||||
"group_hash": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-f0-9]{0,64}$"
|
||||
},
|
||||
"error_class": {
|
||||
"type": "string",
|
||||
"pattern": "^[A-Za-z0-9_.-]{0,120}$"
|
||||
},
|
||||
"fields": {
|
||||
"type": "object",
|
||||
"maxProperties": 32,
|
||||
"additionalProperties": {
|
||||
"type": ["string", "number", "integer", "boolean", "null"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://jwebot.example/schemas/incident.schema.json",
|
||||
"title": "JWeBot privacy-safe incident record",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"version",
|
||||
"incident_id",
|
||||
"started_at",
|
||||
"status",
|
||||
"component",
|
||||
"error_class"
|
||||
],
|
||||
"properties": {
|
||||
"version": {"const": 1},
|
||||
"incident_id": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-f0-9]{12,64}$"
|
||||
},
|
||||
"started_at": {"type": "string", "format": "date-time"},
|
||||
"resolved_at": {
|
||||
"type": ["string", "null"],
|
||||
"format": "date-time"
|
||||
},
|
||||
"status": {
|
||||
"enum": ["open", "resolved", "archived"]
|
||||
},
|
||||
"component": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z0-9_.-]{1,80}$"
|
||||
},
|
||||
"error_class": {
|
||||
"type": "string",
|
||||
"pattern": "^[A-Za-z0-9_.-]{1,120}$"
|
||||
},
|
||||
"event_hash": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-f0-9]{0,64}$"
|
||||
},
|
||||
"group_hash": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-f0-9]{0,64}$"
|
||||
},
|
||||
"evidence": {
|
||||
"type": "array",
|
||||
"maxItems": 100,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": ["string", "number", "integer", "boolean", "null"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://jwebot.example/schemas/private-context.schema.json",
|
||||
"title": "JWeBot private context",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["people", "clock_scan_targets"],
|
||||
"properties": {
|
||||
"people": {
|
||||
"type": "array",
|
||||
"maxItems": 500,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"canonical_name",
|
||||
"aliases",
|
||||
"prefixes",
|
||||
"identity_fact",
|
||||
"display_id"
|
||||
],
|
||||
"properties": {
|
||||
"canonical_name": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 120
|
||||
},
|
||||
"aliases": {
|
||||
"type": "array",
|
||||
"maxItems": 64,
|
||||
"items": {"type": "string", "minLength": 1, "maxLength": 120}
|
||||
},
|
||||
"prefixes": {
|
||||
"type": "array",
|
||||
"maxItems": 64,
|
||||
"items": {"type": "string", "minLength": 1, "maxLength": 120}
|
||||
},
|
||||
"identity_fact": {"type": "string", "maxLength": 240},
|
||||
"display_id": {"type": "string", "maxLength": 120},
|
||||
"steam_id64": {
|
||||
"type": "string",
|
||||
"pattern": "^(?:|[0-9]{17})$"
|
||||
},
|
||||
"steam_aliases": {
|
||||
"type": "array",
|
||||
"maxItems": 64,
|
||||
"items": {"type": "string", "minLength": 1, "maxLength": 120}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"clock_scan_targets": {
|
||||
"type": "array",
|
||||
"maxItems": 500,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["canonical_name", "display_id"],
|
||||
"properties": {
|
||||
"canonical_name": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 120
|
||||
},
|
||||
"display_id": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 120
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://jwebot.example/schemas/profile-manifest.schema.json",
|
||||
"title": "JWeBot profile manifest",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["format_version", "id", "description"],
|
||||
"properties": {
|
||||
"format_version": {"const": 1},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z][a-z0-9-]{0,47}$"
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"maxLength": 240
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
[bot]
|
||||
mention = "JWeBot"
|
||||
identity_note = "You are JWeBot, a concise assistant for one configured group."
|
||||
cloud_agent = "wechat-responder"
|
||||
memory_remote_path = "/home/node/.openclaw/workspace/MEMORY.md"
|
||||
@@ -0,0 +1,5 @@
|
||||
[debug]
|
||||
enabled = false
|
||||
capture_payloads = false
|
||||
incident_retention_days = 30
|
||||
session_retention_days = 14
|
||||
@@ -0,0 +1,5 @@
|
||||
[deployment]
|
||||
runtime_user = "jwebot"
|
||||
runtime_home = "/home/jwebot"
|
||||
runtime_python = "/opt/jwebot/venv/bin/python"
|
||||
backup_root = "/var/backups/jwebot"
|
||||
@@ -0,0 +1,4 @@
|
||||
[notification]
|
||||
enabled = false
|
||||
command = []
|
||||
timeout_seconds = 30
|
||||
@@ -0,0 +1,9 @@
|
||||
[deepseek]
|
||||
base_url = "https://api.deepseek.com"
|
||||
|
||||
[cloud]
|
||||
host = ""
|
||||
|
||||
[steam]
|
||||
owner_id64 = ""
|
||||
proxy_url = "http://127.0.0.1:7890"
|
||||
@@ -0,0 +1,16 @@
|
||||
[features]
|
||||
edge_enabled = true
|
||||
local_extensions_enabled = true
|
||||
telemetry_enabled = true
|
||||
ocr_prewarm = true
|
||||
delivery_enabled = true
|
||||
|
||||
[extensions]
|
||||
mode = "in-process"
|
||||
transport = "unix"
|
||||
publisher = ""
|
||||
host_timeout_seconds = 8
|
||||
fallback_enabled = true
|
||||
|
||||
[gui]
|
||||
sender_timeout_seconds = 55
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"people": [],
|
||||
"clock_scan_targets": []
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
format_version = 1
|
||||
id = "default"
|
||||
description = "Local JWeBot configuration"
|
||||
@@ -0,0 +1 @@
|
||||
# Optional root-only deployment overrides.
|
||||
@@ -0,0 +1 @@
|
||||
# Optional non-secret runtime overrides.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Secrets only. Keep this file mode 0600.
|
||||
JWEBOT_EDGE_DEEPSEEK_API_KEY=
|
||||
JWEBOT_EDGE_STEAM_API_KEY=
|
||||
Reference in New Issue
Block a user