YAML configuration, init without a wizard, and openai-chat-completions
ci / check (push) Successful in 15m52s
ci / check (push) Successful in 15m52s
- /config/agent.yaml and /config/boot.yaml replace the JSON files, read with serde_yaml_ng (also in the agent, inside WASM). - sausage init asks nothing and reads no SAUSAGE_* variables. It writes commented templates with an example for each API, and prints the path to edit. Until the agent is configured, agent.chat names the missing field. allow_no_token: true permits a local model without a key. - The agent speaks openai-chat-completions, the format of OpenRouter, Ollama, and most providers. base_url follows each SDK: with /v1 for the OpenAI shapes, without it for Anthropic. - Checked against the proxy with glm-5.3-flash: the agent wrote, built, and activated a counter plugin in 55 s.
This commit is contained in:
+12
-9
@@ -19,7 +19,7 @@ Rust plugins use the SDK `sausage-plugin`. Its source is at
|
||||
| call | A JSON-RPC request. `notes.add` calls the method `add` of the plugin `notes`. |
|
||||
| interface | A set of methods. A plugin has one main interface. It can also declare endpoint interfaces. |
|
||||
| endpoint | An interface that a running process serves on a TCP port. An endpoint file tells others where it is. |
|
||||
| service | A call in `/config/boot.json`. The core starts it at boot and again after an upgrade of its plugin. |
|
||||
| service | A call in `/config/boot.yaml`. The core starts it at boot and again after an upgrade of its plugin. |
|
||||
| import | An interface of another plugin that a plugin uses. |
|
||||
| provider, consumer | The plugin that has an interface, and a plugin that imports it. |
|
||||
| journal | The central log of the world. |
|
||||
@@ -36,11 +36,13 @@ Rust plugins use the SDK `sausage-plugin`. Its source is at
|
||||
state/<plugin>/ persistent state of a plugin, by convention
|
||||
state/core/journal.sqlite the journal
|
||||
config/ global configuration
|
||||
boot.json the services
|
||||
agent.json API, base URL, model, and token of the agent
|
||||
boot.yaml the services
|
||||
agent.yaml the API, base URL, model, and key of the agent
|
||||
```
|
||||
|
||||
- Every process can read and write all of it. There are no permissions.
|
||||
- Configuration files are YAML, with comments. Data and interface files are
|
||||
JSON.
|
||||
- Plugin names use `a-z`, `0-9`, `-`, and `_`. The name `core` is reserved.
|
||||
- The world folder must not contain `proc`, `run`, or `self`. These names are
|
||||
mount points (section 4). The host does not start a world that has them.
|
||||
@@ -287,13 +289,14 @@ for example the control interface of a web server.
|
||||
|
||||
## 8. Boot and services
|
||||
|
||||
At start, the core starts each service in `/config/boot.json`, in order:
|
||||
At start, the core starts each service in `/config/boot.yaml`, in order:
|
||||
|
||||
```json
|
||||
[
|
||||
{"method": "secrets.serve", "params": {}},
|
||||
{"method": "www.start", "params": {"port": 8080}}
|
||||
]
|
||||
```yaml
|
||||
- method: secrets.serve
|
||||
params: {}
|
||||
- method: www.start
|
||||
params:
|
||||
port: 8080
|
||||
```
|
||||
|
||||
- A service is a detached call with the parent `core`. The core waits for
|
||||
|
||||
Reference in New Issue
Block a user