Repository navigation
Oshi Engine 0.13.0
This release finishes milestone 0.13, Custom day plan. The owner can now set her week as blocks, such as a job, classes, the gym or family time. The blocks are placed first and the engine fills the rest of each day around them, the same way for a given seed and date.
- Her week is
character.weekin the profile (envOSHI_CHARACTER__WEEK), a list of blocks. A block has a title, a kind, a shape (fixed, classes or flexible), a start and an end, and the days it falls on. It can repeat every N weeks, fall on the nth weekday of the month or the last one, run between two dates, or happen on one day only.skip_datescancels it for single days, and a change for one day is a one-day block next to the usual one. - Each block has its own
jitter_minutes(start and end move a little from day to day),skip_chance,phone(how often she checks the phone there) andwindow(how long her chat windows there last: short, normal or long). Each block draws from its own random stream, so changing one leaves the others where they were. - A block can carry a prompt that she reads in "Right now" while she is in it (cleaned and cut at 600 characters), a novel mode scene that wins over the one matched by activity, and a place. With
commute_from_placethe commute is the trip between her home and that place, looked up once when the week is saved, so the plan never waits for the network. - Where blocks overlap, a one-day block beats a date range, which beats the rest; between equals the later one in the list wins. A sleep block sets the night it covers. A short block on a free day keeps her sleep-in, and the generator leaves out exercise, hobbies, chores and evenings out on days a block already covers them.
- Ten presets fill every field of a block: full-time job, part-time job, side hustle, school or university, shift work (three rotating blocks), gym, classes, family time, free time and sleep.
- The settings UI has a week editor in the Character view, behind a Her / Week switch in the header (a fourth tab on narrow screens). The grid shows her blocks solid, filled-in time hatched and activities with an accent edge, and marks blocks that gave way to another or were skipped. The block form previews the whole week, so you see where a block lands and what it pushes before you save it. Clicking a block in her day opens what made it.
- API:
GET,PUTandDELETE /v1/character/week,POST /v1/character/week/blocks,PUTandDELETE /v1/character/week/blocks/{id},GETandPOST /v1/character/week/preview(thePOSTtakes an unsaved draft) andGET /v1/character/presets. Reading needscharacter:readand refuses user keys; saving needscharacter:write. Plan blocks have afixedfield that names the block of her week. CLI:oshi life week [--date] [--days]andoshi life block list|presets|add --preset|remove|reset.
Modules in this release
| Module | Version | Needs core | Builds |
|---|---|---|---|
| telegram | 0.2.4 | 0.2.0 or newer | x86_64, aarch64 |
| settings | 0.13.0 | 0.13.0 or newer | any |
| webchat | 0.10.0 | 0.10.0 or newer | any |
| webchat-themes | 0.5.0 | 0.5.0 or newer | any |
| webchat-stickers | 0.5.0 | 0.5.0 or newer | any |
| webchat-attachments | 0.5.0 | 0.5.0 or newer | any |
| novel | 0.11.0 | 0.10.0 or newer | any |
| browser | 0.7.2 | 0.3.0 or newer | x86_64, aarch64 |
settings is the only new version. telegram, webchat, novel, browser and the three webchat extensions are unchanged; the store keeps the artifacts of the release that first shipped them.
Settings 0.13.0 needs core 0.13.0. The Character view reads /v1/character/week when it opens, which an older core answers with 404, and its text comes from the engine, so on core 0.12.0 the whole view would fail to open. The unchanged modules work with core 0.13.0 as they are: they ignore the new fixed field, and the engine picks a block's scene, so the novel page shows it through the routes it already uses.
Upgrading
Run oshi update apply, or in Docker pull the new image. With modules.auto_update on (the default), the next module check installs settings 0.13.0. It waits for core 0.13.0: on an older core the store lists it as "needs core 0.13.0" and settings stays on 0.12.0.
There is no database migration. Her week is kept in oshi.toml.
Existing installs keep the same days. Until you save a week, character.week is unset and her occupation plans her days with the same code as in 0.12.0. The editor and GET /v1/character/week show the blocks the occupation stands for as her first blocks, marked as not saved. Adding, changing or removing a block in the editor (or with oshi life block) saves the whole week, and from then on the blocks plan her days. oshi life block reset, or the reset button in the editor, forgets the saved week and goes back to the occupation.
For an office, remote, student, freelance, creative or unemployed occupation, the saved blocks give the same plans as before. Shift work is the exception. It becomes three blocks (morning, afternoon and night), each every third week, anchored to follow the old rotation within the calendar year you save the week in. The old rotation restarted with the ISO week number each January, so from the next year on her shifts can fall in different weeks than they would have before. Breaks and days off on shift days come from the new blocks' own draws and can differ even within that year.
OSHI_CHARACTER__WEEK in the env file sets the whole week as one locked value. The editor then shows it read-only, and saves leave it alone.
Restoring the pre-update backup by hand (oshi update restore <dir>) also brings back the 0.12.0 oshi.toml, so a week saved after the update is lost.
Coming from 0.9.0 or earlier, the compose service rename described in the 0.10.0 notes still applies.
Downloads
oshi-x86_64-linux.tar.gzandoshi-aarch64-linux.tar.gzcontain theoshibinary. They need glibc 2.34 or newer.- The module tarballs are named
<id>-<version>-<target>.tar.gz. The telegram, webchat, novel, browser and webchat extension tarballs are rebuilds of unchanged versions. - Each tarball has a
.sha256file, andSHA256SUMScovers all of them.store.jsonholds the store index entries for the modules in this release.
The Docker image is ghcr.io/oshiengine/oshi-engine:0.13.0 (also 0.13, beta, stable and latest) for amd64 and arm64.
Getting started
tar -xzf oshi-x86_64-linux.tar.gz
./oshi init
./oshi serve
With the engine running, ./oshi module install settings and ./oshi module install webchat add the settings and the chat. Open http://127.0.0.1:7420/settings and create the owner login with the setup code from oshi init. Before talking to her, set llm.providers.local.base_url and llm.chat.model in oshi.toml (or the env file) to an OpenAI-compatible server.
With Docker, docker-compose.yml starts the engine with the web chat and its extensions, novel mode and the settings; the setup code is in the log (docker compose logs oshi-engine). docker-compose-full.yml adds every module, SearXNG and the headless Chrome, with SEARXNG_SECRET set in .env.
All changes: v0.12.0...v0.13.0