Commit Graph
20 Commits
Author SHA1 Message Date
Sausage 3992611b76 Add armed file watches without serializing unrelated IO 2026-11-01 20:51:08 +00:00
Sausage 959ddf46ff Supervise boot services with uniform five-second upgrade grace 2026-11-01 20:51:08 +00:00
Sausage 4da8a28392 Notify superseded plugin processes and support SDK draining 2026-11-01 20:51:08 +00:00
SAU-317 implementer c54edea596 Name the received JSON type in non-object params errors
ci / check (push) Failing after 2m38s
Keep -32602 and existing validation order; tell callers to send the object itself.
Cover host routing, stdout fast paths, SDK calls and generated dispatch.

Card: SAU-317
2026-10-28 19:16:39 +00:00
SAU-249 implementer dc81f78c20 Add shared SQLite open macro with WASI crash recovery and in-memory temp storage
ci / check (push) Failing after 3m53s
Card: SAU-249
2026-10-28 00:33:33 +00:00
SAU-143 implementer 037377fd27 host: preserve journals, full traps and embedded agent output
Write new journal entries under logs/core and merge read-only legacy
history without moving SQLite/WAL files. Atomically spool failed batches,
retaining unspoolable entries for event-driven retries. Journal full trap
diagnostics before UTF-8-safe status display. Port session overflow archives
and followable line/byte excerpts to the still-shipped embedded agent.
Document retention/recovery and cover the contracts with regressions.
Include one rustfmt-only normalization in the existing SDK WASI test.

Card: SAU-143
2026-10-26 13:40:15 +00:00
surma b536beb069 YAML configuration, init without a wizard, and openai-chat-completions
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.
2026-10-23 11:27:48 +01:00
surma 9fb1e05686 sdk tests: run the wasmtime CLI without a disk cache; show its stderr on EOF
The Nix sandbox has no writable home folder, so wasmtime run failed to
create its cache folder.
2026-10-23 09:26:12 +01:00
surma a090e1fd57 host: review fixes for cargo.build, the test runner, the console, and main; tests for every PROTOCOL.md rule
cargo.build and the runner (review T22R): builds use the network again;
core.unlock and core.notify in order under the runner; quiet test
output; manifest preparation keeps [workspace], target tables, renamed
and optional entries; cargo.rpc.discover; -32004 with data.output;
retention of 10 builds; light, empty test worlds with an in-memory
journal; only CARGO_/RUST_/SAUSAGE_ variables; stdin is null; the runner
through --config. A compile cache that cannot be created is not fatal.
Activation replaces plugin.wasm without a gap.

Console and main: init ships the workspace Cargo.lock and creates the
world atomically; each console command runs in its own task, so ps,
stop, and kill work during a slow call; SAUSAGE_HEADLESS; the terminal
mode is restored; signals during boot; chat text is not taken as a
command.

Tests: 20 more tests for PROTOCOL.md sections 2 to 10; the cargo tests
choose the libtest binary from cargo's JSON output and time out.
2026-10-23 07:47:39 +01:00
surma 61d5d5f817 sausage-plugin: the crate docs are the manual for agents; remove PROPOSAL.md
Its content lives in PROTOCOL.md (the contract), DECISIONS.md (the
reasons), and the SDK docs (how to write a plugin).
2026-10-23 02:46:47 +01:00
surma c728429d04 sdk, agent: review fixes (T18R)
- The serve loop ends the process after EOF or exit_after_response,
  also with background tasks or listeners.
- One schema generator per direction for the whole document, so types
  with the same name get distinct names.
- The agent gives the complete error (code, message, data) to the
  model, writes SKIP only after a successful request, caps tool output
  at 64 KiB, writes each history line in one write, and skips a damaged
  line.
- Endpoints skip blank and non-RPC lines. client_rs does not panic.
- #[must_use] on builders and the lock guard; #[schemars] attributes
  and duplicate hooks are compile errors; raw identifiers; -32000 for
  local SDK errors; x-sausage-params only for methods with params.
2026-10-23 02:38:35 +01:00
surma 0516158883 sdk: readable clients (no Empty wrapper, no unused error module), documented examples with tests 2026-10-23 01:05:19 +01:00
surma 8d3c163992 sausage-plugin part 2: import! with typed clients (sausage_interface::client_rs), TCP endpoints with rpc.endpoint, examples
Part 1 fixes: complete stdout writes, buffered stdin, Rust type names
in schemas, enum variant docs, -32603 for serde errors in handlers,
crate docs and modules. End-to-end check of a generated consumer through
a fake core.
2026-10-23 00:35:45 +01:00
surma 01712e745a sausage-plugin part 1: run, #[rpc], #[schema], rpc.discover, calls, locks, Ctx, hooks
Checkpoint. Known issues, fixed in part 2: short writes on stdout,
byte-wise stdin reads, Result suffix on all result schemas, lost enum
variant docs, serde errors as invalid params, missing item docs.
2026-10-23 00:05:37 +01:00
surma fa3ca7c235 Workspace skeleton for plugins: sausage-vfs, sausage-interface, sausage-plugin, sausage-plugin-macros
The agent leaves the workspace until it is rewritten on the new SDK.
2026-10-22 23:37:35 +01:00
surma bcde6ba325 Plain POSIX files: remove commit on close (fs.rs)
Staging every write until close broke tempfile, git, and SQLite, which
expect normal files. Actors that need an atomic publish write a temporary
file and rename it; the SDK has write_atomic for that.
2026-10-15 23:33:20 +01:00
surma c636eb0803 Agent: one turn path, tools and history in their own modules; SDK: one parser 2026-10-15 14:22:51 +01:00
surma 69cf80a114 Agent: durable turn and queue state, visible inbox closure, OpenAI phase; prompt fixes; fetch/bench fixes 2026-10-15 11:54:41 +01:00
surma 7f76eab161 SDK sausage-actor; examples and agent on the SDK; agent without limits
- sausage-actor: Message, messages(), send/reply/publish, async Inbox
- agent: append-only /data/history.jsonl, no caps on history, steps, waits,
  tool output, or reads; max_tokens only when configured (Anthropic: 32000)
2026-10-15 11:17:14 +01:00
surma 1f49d0f7bb Sausage: host, broker, commit-on-close filesystem, cargo actor, console, agent
Imported from the spike branch, with:
- a library crate (Host API) for the CLI and the tests
- JSON test scenarios for candidates
- commit on close only for new or truncated files
- a Nix flake: nix run -- init, nix run -- run
2026-10-15 10:45:23 +01:00