164 lines
3.4 KiB
Markdown
164 lines
3.4 KiB
Markdown
# Capability Catalog
|
|
|
|
Status: API version 1.
|
|
|
|
Capabilities are denied by default and declared in `plugin.toml`.
|
|
|
|
## Commands
|
|
|
|
Manifest field:
|
|
|
|
```toml
|
|
commands = ["/hello"]
|
|
```
|
|
|
|
Rules:
|
|
|
|
- command names begin with one `/`;
|
|
- one extension owns a reviewed namespace;
|
|
- duplicates and undeclared registrations are rejected;
|
|
- command extensions declare at least one command;
|
|
- enrichment and scheduled extensions cannot declare commands.
|
|
|
|
Command plugins also carry non-capability display metadata:
|
|
|
|
```toml
|
|
description = "Return a local greeting"
|
|
help = ["/hello [name]"]
|
|
```
|
|
|
|
The Kernel uses signed description/help metadata for automatic help and Host
|
|
health validation. Display metadata never grants storage, network, or service
|
|
access.
|
|
|
|
## Storage
|
|
|
|
Manifest field:
|
|
|
|
```toml
|
|
storage = true
|
|
```
|
|
|
|
The host exposes only a private key/value namespace for that extension.
|
|
|
|
It does not expose:
|
|
|
|
- filesystem paths;
|
|
- another extension's state;
|
|
- the edge ledger;
|
|
- OCR history;
|
|
- environment variables.
|
|
|
|
Storage quotas and persistence format remain kernel-owned.
|
|
|
|
## Approved Network Profiles
|
|
|
|
Manifest field:
|
|
|
|
```toml
|
|
network_profiles = ["steam-api"]
|
|
```
|
|
|
|
An approved profile owns:
|
|
|
|
- allowed hosts and paths;
|
|
- credentials;
|
|
- proxy policy;
|
|
- timeout;
|
|
- cache;
|
|
- response-size limit;
|
|
- error mapping.
|
|
|
|
Extensions receive profile names, not secrets. The current Steam behavior is the
|
|
reference: Mihomo is mandatory and proxy failure never falls back to direct
|
|
network access.
|
|
|
|
No network profile is currently part of the public example extension.
|
|
|
|
## Approved Service Profiles
|
|
|
|
Manifest field:
|
|
|
|
```toml
|
|
service_profiles = ["coin"]
|
|
```
|
|
|
|
Service profiles are narrow Kernel-owned operations used by reviewed local
|
|
adapters. They do not expose raw Ledger or provider objects.
|
|
|
|
Current profiles:
|
|
|
|
- `person-memory`
|
|
- `dice`
|
|
- `coin`
|
|
- `random-number`
|
|
- `draw-lot`
|
|
- `daily-fortune`
|
|
- `guess-number`
|
|
- `rock-paper-scissors`
|
|
- `scan-ranking`
|
|
- `repeat-ranking`
|
|
- `history-search`
|
|
- `server-status`
|
|
- `jwebot-version`
|
|
- `debug-telemetry`
|
|
- `steam-presence`
|
|
|
|
`person-memory`, `server-status`, `jwebot-version`, and `debug-telemetry` are
|
|
official-authored. The others are authored by JWeBot. Kernel direct commands
|
|
(`/功能列表`, `/帮助`, `/help`, `/余额`) have no service profile. Other
|
|
extensions do not receive these profiles by default. Every
|
|
profile request requires capability review, and an unavailable broker fails
|
|
closed.
|
|
|
|
## Facts
|
|
|
|
`FactWriter` and `ExtensionResult.facts` accept bounded fact candidates.
|
|
|
|
The kernel still controls:
|
|
|
|
- sensitive-content filtering;
|
|
- group and person scope;
|
|
- evidence requirements;
|
|
- expiry;
|
|
- deduplication;
|
|
- cloud projection.
|
|
|
|
An extension cannot directly edit profile memory.
|
|
|
|
## Scheduling
|
|
|
|
The scheduler accepts a named future intent. The kernel owns the clock, durable
|
|
queue, idempotency key, target group binding, and eventual delivery checks.
|
|
|
|
API version 1 does not permit arbitrary cron expressions or direct timers owned
|
|
by extension code.
|
|
|
|
## Logging
|
|
|
|
The extension logger accepts short messages and structured fields.
|
|
|
|
Logs must not contain:
|
|
|
|
- message bodies;
|
|
- group names;
|
|
- reply text;
|
|
- credentials;
|
|
- environment values;
|
|
- raw HTTP payloads.
|
|
|
|
## Explicitly Unavailable
|
|
|
|
The SDK intentionally has no capability for:
|
|
|
|
- GUI or VNC;
|
|
- group selection;
|
|
- raw OCR;
|
|
- SQLite;
|
|
- filesystem;
|
|
- environment;
|
|
- subprocess;
|
|
- SSH or Docker;
|
|
- unrestricted sockets or HTTP;
|
|
- direct model credentials.
|