Compare commits

...
97 Commits
Author SHA1 Message Date
waozi 7aedf02555 Keep native text crisp and stable throughout the zoom range 2026-10-08 15:15:00 -03:00
waozi c3d3441f02 Use crisp native text rendering at fractional zoom 2026-10-08 14:23:41 -03:00
waozi d049726f05 Open Apps as a full content screen 2026-10-08 13:27:19 -03:00
waozi 6a5d9e11a4 Fix blank desktop pages when the GTK tray changes locale 2026-10-08 10:58:42 -03:00
waozi 0af6d263d9 Group desktop navigation and move Profile into Apps 2026-10-08 10:24:46 -03:00
waozi 59de0d5b2e Optimize web animation rendering for slower devices 2026-10-08 08:32:08 -03:00
waozi 662a0b1063 Use the Windows-safe Kryon font loader 2026-10-08 07:47:27 -03:00
waozi 291e287178 Use the Windows-capable Ziran toolchain for releases 2026-10-08 06:32:58 -03:00
waozi 92130510d8 Provide font checks in isolated Linux package builders 2026-10-08 06:12:19 -03:00
waozi 71700229a3 Retain failed Pages web output for diagnosis 2026-10-08 05:57:49 -03:00
waozi e4e42f4880 Prepare dependencies for clean CI test runners 2026-10-08 05:24:38 -03:00
waozi 14a5383b34 Keep owner authorization IDs stable across storage reads 2026-10-08 04:37:57 -03:00
waozi 31c38e8b93 Show complete Telegram consent identities in Settings 2026-10-08 04:26:28 -03:00
waozi 5d2bbdadc6 Keep Telegram consent content within the scrollbar clip 2026-10-08 04:08:48 -03:00
waozi 49d94d7430 Prevent Telegram startup from saving owner app preferences 2026-10-08 03:47:24 -03:00
waozi adf7431ad4 Fix generated Telegram Mini App bootstrap quoting 2026-10-08 03:26:58 -03:00
waozi 28562a0a36 Link published Android downloads with a universal APK fallback 2026-10-08 03:17:48 -03:00
waozi 9874794062 Show Telegram recovery labels and complete approval fingerprints 2026-10-08 03:05:11 -03:00
waozi 9ac1270bb5 Package embedded web assets without requiring an external data file 2026-10-08 02:56:03 -03:00
waozi 664095e190 Release 2.1.19 with secure Telegram account setup 2026-10-08 02:46:54 -03:00
waozi 1d127c6503 Fix desktop window icon channel masks 2026-10-08 02:41:34 -03:00
waozi f250bcb0c8 Connect Telegram through verified scoped account authorization 2026-10-08 02:29:51 -03:00
waozi 0e8b5e4725 Unify the default palette and simplify app navigation and onboarding 2026-10-08 02:15:36 -03:00
waozi cb3d4c9079 Isolate Lumi private data and preserve legacy storage safely 2026-10-08 01:19:19 -03:00
waozi 87059a67bf Keep app behavior harnesses linked to current host capabilities 2026-10-08 01:18:07 -03:00
waozi 77016527bc Exercise Apps navigation in browser checks 2026-10-08 00:43:35 -03:00
waozi 803d5266f0 Start in Apps with ready bundles and default favorites 2026-10-08 00:22:40 -03:00
waozi aaed0c2d14 Show each app bundle size in the Apps library 2026-10-08 00:20:02 -03:00
waozi 081495a671 Arrange app favorites by dragging tiles in the launcher 2026-10-07 23:43:53 -03:00
waozi b0e3a807fa Use the toolchain fix for web directory reads 2026-10-07 23:01:52 -03:00
waozi 3302c98e32 Pin every app with a hold gesture in the launcher 2026-10-07 22:47:50 -03:00
waozi 989271d3e1 Add searchable app launcher and saved favorites dock 2026-10-07 21:31:20 -03:00
waozi 4200187a00 Design four Inbe app launcher concepts 2026-10-07 20:54:01 -03:00
waozi f7fc3ff223 Reduce Android startup work and show progress until the first frame 2026-10-07 20:42:28 -03:00
waozi 804d86f09d Open Lumi Telegram links directly in the Android app 2026-10-07 20:26:31 -03:00
waozi 2df0197470 Move Telegram sync into Settings and load Lumi history on scroll 2026-10-07 20:13:18 -03:00
waozi 0627f7dd37 Apply sync review choices directly below colored changes 2026-10-07 15:40:56 -03:00
waozi 06de5b2721 Ship compatible app bundles for Lumi text emphasis 2026-10-07 02:41:39 -03:00
waozi 59ed4e766b Format Lumi replies and save feature suggestions as feedback 2026-10-07 02:35:43 -03:00
waozi 8e12645767 Show Lumi progress charts and donation cards
Render account-scoped daily session, meditation, WHM retention and habit progress from saved data, with bounded chart snapshots and selectable values. Provide canonical Bitcoin and Monero donation actions in typed chat cards through the shared Lumi app tools. Preserve text history and translate the new UI in every locale.

Validation: native build and build laws; engine, chart, SQL and cell persistence checks; proof, sync recovery, version and locale gates; complete private-display UI suite including narrow cards, clipboard and URI routing; full-history performance and memory stability. Android, web runtime and live online-model invocation were not exercised. Changes are local and are not deployed.
2026-10-07 02:24:34 -03:00
waozi 1f67f8df52 Enable Lumi online conversation and shared app tools
Save the existing Lumi harness foundation separately from the progress-chart and donation-card extension. It provides account-scoped online conversation, validated app actions, offline feedback delivery, and the same tools for standalone and Harmony-hosted use.

Validation of the combined final working checkout: native build and build laws, cell and storage tests, proof mutations, sync recovery, version and locale checks, private-display Lumi UI checks, and full-history performance.
2026-10-07 02:21:28 -03:00
waozi 579ebeb531 Accept whitespace in Lumi server responses and tighten UI verification 2026-10-07 02:01:50 -03:00
waozi f060ec3988 Store Android artwork once and shrink offline practice packages 2026-10-07 02:00:52 -03:00
waozi bd4bbd4f73 Keep Lumi chat responsive and restore offline app navigation 2026-10-06 23:39:20 -03:00
waozi 69f83c616a Write timestamped Diary entries from multiline Lumi chat 2026-10-06 23:05:23 -03:00
waozi d828c0817b Add Lumi app tools and unify cell navigation and sidebar settings 2026-10-06 22:47:06 -03:00
waozi f82cf222ed Preserve all cell navigation slots and desktop choices at startup 2026-10-06 20:18:24 -03:00
waozi e9e93b609e Keep scale slider geometry fixed until release 2026-10-06 18:09:46 -03:00
waozi e5d2a49b45 Fix translation catalog lifetime and complete font coverage 2026-10-06 17:25:00 -03:00
waozi bde0598680 Add modular apps, signed package updates and synced app choices 2026-10-06 14:37:10 -03:00
waozi 8d86507d82 [skip ci] Build signed Moto APKs from verified release sources 2026-10-06 13:50:58 -03:00
waozi 56a269ff74 Verify complete embedded style payloads independently of selector order 2026-10-06 12:50:58 -03:00
waozi 61c6bab406 Complete release checks for current bundles, styles and translated fonts 2026-10-06 12:45:56 -03:00
waozi 8050af9df6 Run habit form regression checks through the packaged app bundles 2026-10-06 12:31:44 -03:00
waozi bd4b7b107e Build the algorithms exported by the pinned Oqs package 2026-10-06 12:24:43 -03:00
waozi 88a2f31385 Release 2.0.12 with Android graphics recovery and regression checks 2026-10-06 12:01:56 -03:00
waozi 016cb75c18 Restore Android images and retained frames when graphics resume 2026-10-06 09:23:30 -03:00
waozi fafa785611 Restore the original practice screen with padded centered headings 2026-10-06 00:37:17 -03:00
waozi d9f960ee26 Improve profile header typography and flower avatar detail 2026-10-06 00:14:23 -03:00
waozi eef1c98a1a Unify practice artwork, heading and Start in a responsive card 2026-10-05 23:55:15 -03:00
waozi 4cdb0394b7 Consume navigation clicks and return Data to its entry screen 2026-10-05 23:55:10 -03:00
waozi 9f8fc5bd48 Give practice headings room and frame artwork without cropping 2026-10-05 23:37:09 -03:00
waozi ca8e50bb12 Skip sync reviews when the merge preview has no changes 2026-10-05 23:26:11 -03:00
waozi d2dd96cf32 Explain sync changes without raw JSON or empty habit days 2026-10-05 21:07:19 -03:00
waozi 79688b9f4c Use the Ziran organization for Daochi Client 2026-10-05 20:55:14 -03:00
waozi 0e73811320 Start hosted practices and keep feature routes stable 2026-10-05 14:35:04 -03:00
waoziandClaude Opus 5.5 df0112dcf5 Stop flooding the log with DPI warnings on the SDL desktop
Inner Breeze asked raylib for the window's DPI scale every frame. raylib's
SDL2 backend has no such value: it returns 1.0 and logs "GetWindowScaleDPI()
not implemented" each time, 30 lines a second into the owner's log while the
app runs inside Harmony. SDL2 desktop builds now keep the 1.0 scale without
asking; their display density still comes from the SDL device host.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-05 12:16:11 -03:00
waoziandClaude Opus 5.5 ab8a354038 Keep background sync from freezing Inner Breeze inside Harmony
The owner saw Inner Breeze stop rendering inside Harmony. Its frame loop and
live-update worker were both waiting forever for the database connection,
held by a social-refresh worker that had already exited.

Settings write batches shared one depth counter across threads. When two
workers saved their sync session together, the second joined the first's
batch without its own BEGIN, so the first returned without COMMIT and exited
while its open transaction still held the connection. Each batch now holds
the connection for its own thread until it commits, a failed COMMIT rolls
back, and a failed sync savepoint release is rolled back too, so no worker
can leave the connection held.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-05 11:58:26 -03:00
waoziandClaude Opus 5.5 a19f1ee6ff Keep a waiting sync review from restarting sync every few seconds
When the server asked for a full snapshot that waits for the person's
review, the app kept its applied version behind the server's. Every
live-update greeting then looked newer, so an open desktop app synced again
every two or three seconds. The app now remembers the newest server version
it has received, also while a review waits, and only a newer version starts
a sync. Changes from other devices still arrive.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-04 21:19:25 -03:00
waozi cbdec667c6 Load Inner Breeze feature bundles from its portable root 2026-10-04 21:00:15 -03:00
waoziandClaude Opus 5.5 c58d4e602e Stop desktop Inner Breeze from syncing again every few seconds
The server greets each live-update connection with its current version.
The app treated that greeting as a change, synced, reconnected and was
greeted again, so an open desktop app downloaded all of its records every two
or three seconds. A greeting or event no newer than the last sync is now not
a change: the app waits and checks again, so changes from other devices still
arrive within seconds.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-04 20:53:20 -03:00
waoziandClaude Opus 5.5 1266c5378e Expect a rejected sign-in to retry in the sync recovery test
The recovery test still expected sync and social refresh to stop after a
rejected sign-in, which a9744124 changed to an automatic retry. It now checks
that a rejected sign-in retries on the usual schedule and still shows why,
and that a failure the person must fix, such as a signing error, still stops.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-04 20:53:20 -03:00
waoziandClaude Opus 5.5 a974412497 Keep syncing automatically after a rejected sign-in
When two sign-ins of one account overlapped right after an account was
attached, the server rejected one, and Inner Breeze stopped syncing until the
person reconnected by hand: the username and new sessions stayed on the
device. A rejected sign-in is now retried with a fresh challenge on the usual
schedule while the account key exists, and the sync status still shows the
failure until a sync succeeds.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-04 20:33:10 -03:00
waozi af112e4d25 Verify sync review inside the Harmony app host 2026-10-04 19:33:00 -03:00
waozi 2d78b1ac7c Keep expanded habit cards within their own column 2026-10-04 19:32:51 -03:00
waozi 13bbb79cf0 Reject incomplete sync review previews 2026-10-04 18:53:55 -03:00
waozi 63ba83aca6 Show exact sync review outcomes and preserve local edits 2026-10-04 18:44:39 -03:00
waozi 5cf7366861 Use the verified modal input fix from Kryon 2026-10-04 18:17:57 -03:00
waozi 51a93a19d9 Own persistent UI messages during portable app checking 2026-10-04 01:54:54 -03:00
waozi 621b181f34 Correct Sun Salutation necks and clean clothing edges 2026-10-02 18:20:42 -03:00
waoziandClaude Opus 5.5 747472ecb2 Upload store listing text with the Play screenshots
The Play upload script now also sends each Fastlane locale's short and
full description, keeping titles as they are on Play.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-02 18:15:06 -03:00
waoziandClaude Opus 5.5 f49e072148 Refresh store listing text and screenshots for the current app
Store screenshots now render at real phone and tablet density
(--screenshot-ui-scale), show the painted Wim Hof, Sun Salutation and
Meditation cards, an Upward salute pose and showcase habits instead of
test fixtures. Descriptions in all five store locales name the actual
practices, patterns and habit features. TODO.md tracks the marketing plan.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-02 18:10:41 -03:00
waozi 36d6f99de9 Stream large web assets within the website file size limit 2026-10-02 17:40:25 -03:00
waozi 28b5ab04ca Include all translated character glyphs and artwork test dependencies 2026-10-02 17:10:37 -03:00
waoziandClaude Opus 5.5 d125ce4f2d Ignore the local Wrangler deploy cache
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-02 16:57:43 -03:00
waozi 0e1f20e298 Add four selectable Sun Salutation characters with distinct outfits 2026-10-02 16:56:12 -03:00
waozi 53add1473d Use the standard native clock without portable symbol collisions 2026-10-02 14:59:31 -03:00
waoziandClaude Opus 5.5 53bf4f2eb2 Keep 1.8 themes and count 32-bit Android profile weeks
Settings last saved before 1.8.5 hold the picked theme without a theme
source, and the upgrade defaulted the source to System, which replaced
the user's theme. A theme picked there now stays the app theme.

Profile week stats declared mktime and difftime with a 64-bit time_t,
which is 32-bit on 32-bit Android, so every day fell outside the week
and active days and sessions read 0. Day offsets now use civil day
arithmetic. Verified by upgrading real Inbe 1.8.0 data to this build on
an armeabi-v7a Moto: theme, language, habits, counts, sessions and
settings carry over, and the week shows 6 active days and 1 session.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-02 14:23:52 -03:00
waozi 11bcaf4ee0 Describe verified Wim Hof customization fixes 2026-10-02 13:57:20 -03:00
waoziandClaude Opus 5.5 19d5411a24 Hold the Customize breathing preview under any covering modal
The preview paused only for the start-speed editor. Any modal other than
Customize itself now covers the page, and the preview holds still
behind it, as it does behind the music network-error dialog.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-02 13:56:48 -03:00
waoziandClaude Opus 5.5 843bd6fe66 Draw modal content inside Kryon modal panels again
Kryon paints overlays above page content, and the ModalPanel wrapper
dropped the panel node, so the start-speed editor, habit counter, theme
picker and app icon dialogs drew their content under the opaque panel
and looked empty. Kryon's ModalFrame now opens the panel scope itself;
those dialogs call it directly with Kryon's close glyph, and the other
modals stop pushing the scope a second time.

The breathing preview paints into the current widget scope, so the
start-speed editor shows its circle, and the Customize preview holds
still while that editor is open. Wim Hof sliders show their values,
Start Practice uses the large button size, and screenshot scenes cover
the start-speed editor and theme picker.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-02 13:49:15 -03:00
waozi b8efa68601 Pin validated safety fixes and wait for browser guide layout 2026-10-02 13:15:20 -03:00
waozi e1989a20aa Prepare 2.0.8 with Android startup recovery and upgrade regressions 2026-10-02 04:54:56 -03:00
waozi 0377b9181b Wait for decoded audio before clicking browser music controls 2026-10-01 18:38:13 -03:00
waozi 00fabf1981 Wait for app transitions before querying music controls 2026-10-01 18:26:27 -03:00
waozi f992a9180b Restore web audio and verify music across internal tabs 2026-10-01 18:13:11 -03:00
waozi 41df5d5dba Keep music playing across internal app tabs 2026-10-01 17:45:20 -03:00
5709 changed files with 53505 additions and 4218 deletions

No files matched your search

+4 -1
View File
@@ -1,4 +1,4 @@
# Copy to .env.play when you want to upload screenshots.
# Copy to .env.play when you want to upload the store listing.
# Do not commit .env.play or the service-account JSON.
PLAY_PACKAGE_NAME=xyz.waozi.inbe
PLAY_SERVICE_ACCOUNT_JSON=/absolute/path/to/google-play-service-account.json
@@ -6,6 +6,9 @@ PLAY_LANGUAGE=en-US
PLAY_METADATA_IMAGES_DIR=fastlane/metadata/android/en-US/images
PLAY_IMAGE_TYPES=phoneScreenshots,sevenInchScreenshots,tenInchScreenshots
PLAY_DELETE_EXISTING=1
# Short and full descriptions from every locale folder here. 0 skips text.
PLAY_METADATA_DIR=fastlane/metadata/android
PLAY_LISTING_TEXT=1
# Default is validate-only and discards the draft edit.
# Set to 1 only when you want the uploaded screenshots committed to Play.
+1
View File
@@ -21,6 +21,7 @@ libsdl2-2.0-0
libsdl2-dev
patchelf
pkg-config
python3-fonttools
podman
rpm
x11-utils
+6
View File
@@ -8,3 +8,9 @@ libgles2-mesa-dev
libsdl2-dev
pkg-config
python3-fonttools
python3-numpy
python3-pil
python3-requests
python3-scipy
python3-cryptography
+1
View File
@@ -2,3 +2,4 @@ build-essential
zlib1g-dev
zip
tcl
python3-fonttools
+1
View File
@@ -4,3 +4,4 @@ zlib1g-dev
libz-mingw-w64-dev
zip
nsis
python3-fonttools
+148
View File
@@ -0,0 +1,148 @@
name: Android Moto APK
"on":
workflow_dispatch:
inputs:
source_commit:
description: Full commit hash whose Release checks passed
required: true
verified_run:
description: Release run with successful Secret Scan and Test jobs
required: true
permissions:
contents: read
actions: read
jobs:
android:
name: Build signed Moto APK
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Require passing checks for the exact source commit
env:
GH_TOKEN: ${{ github.token }}
SOURCE_COMMIT: ${{ inputs.source_commit }}
VERIFIED_RUN: ${{ inputs.verified_run }}
run: |
python3 - <<'PY'
import json
import os
import re
import subprocess
commit = os.environ['SOURCE_COMMIT']
run_id = os.environ['VERIFIED_RUN']
repository = os.environ['GITHUB_REPOSITORY']
if not re.fullmatch(r'[0-9a-f]{40}', commit):
raise SystemExit('A full, immutable source commit is required')
if not re.fullmatch(r'[0-9]+', run_id):
raise SystemExit('A numeric Release run ID is required')
def api(path):
return json.loads(subprocess.check_output(['gh', 'api', path], text=True))
run = api(f'repos/{repository}/actions/runs/{run_id}')
if run['head_sha'] != commit or run['path'] != '.github/workflows/release.yml':
raise SystemExit('The Release checks must belong to the requested source commit')
jobs = api(f'repos/{repository}/actions/runs/{run_id}/jobs?per_page=100')['jobs']
for name in ('Secret Scan', 'Test'):
checks = [job for job in jobs if job['name'] == name]
if len(checks) != 1 or checks[0]['conclusion'] != 'success':
raise SystemExit(f'{name} must have passed before signing')
print('Verified passing Secret Scan and full Test jobs for ' + commit)
PY
- name: Checkout verified source
uses: actions/checkout@v4
with:
ref: ${{ inputs.source_commit }}
fetch-depth: 1
- name: Fetch Ziran packages
uses: ./.github/actions/ziran-packages
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Cache Android SDK packages
uses: actions/cache@v4
with:
path: |
${{ env.ANDROID_HOME }}/platforms/android-36
${{ env.ANDROID_HOME }}/build-tools/34.0.0
${{ env.ANDROID_HOME }}/ndk/28.2.13676358
${{ env.ANDROID_HOME }}/cmake/3.22.1
key: android-moto-sdk-${{ runner.os }}-api36-ndk28-cmake322
restore-keys: |
android-sdk-${{ runner.os }}-${{ runner.arch }}-
- name: Install Android SDK components
run: |
set -euo pipefail
SDKMANAGER="$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager"
yes | "$SDKMANAGER" --licenses >/dev/null || true
"$SDKMANAGER" "platforms;android-36" "build-tools;34.0.0" "ndk;28.2.13676358" "cmake;3.22.1"
- name: Prepare Android signing key
env:
KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }}
run: |
set -euo pipefail
umask 077
mkdir -p ~/.android
printf '%s' "$KEYSTORE_BASE64" | base64 -d > ~/.android/inbe-release.keystore
- name: Prepare Firebase config
env:
GOOGLE_SERVICES_JSON_BASE64: ${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }}
run: ./scripts/write-google-services-json.sh
- name: Copy Android assets
run: ./scripts/copy-android-assets.sh
- name: Build signed ARMv7 release APK
env:
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
SOURCE_COMMIT: ${{ inputs.source_commit }}
run: |
set -euo pipefail
./droid/gradlew -p droid assembleRelease \
-Papp.onlyAbi=armeabi-v7a \
-Pkeystore.path="$HOME/.android/inbe-release.keystore" \
-Pkeystore.alias="$KEY_ALIAS" \
-Pkeystore.password="$KEYSTORE_PASSWORD" \
--stacktrace
VERSION=$(python3 scripts/check-version.py --print-version)
mkdir -p build/release/moto
cp droid/app/build/outputs/apk/release/app-armeabi-v7a-release.apk "build/release/moto/inbe-$VERSION-moto.apk"
"$ANDROID_HOME/build-tools/34.0.0/apksigner" verify --print-certs "build/release/moto/inbe-$VERSION-moto.apk"
printf '%s\n' "$SOURCE_COMMIT" > build/release/moto/source-commit.txt
(
cd build/release/moto
sha256sum "inbe-$VERSION-moto.apk" > "inbe-$VERSION-moto.apk.sha256"
)
- name: Remove signing key
if: always()
run: rm -f ~/.android/inbe-release.keystore
- name: Upload signed Moto APK
uses: actions/upload-artifact@v4
with:
name: android-moto
path: build/release/moto/*
if-no-files-found: error
+117
View File
@@ -0,0 +1,117 @@
name: App packages
on:
push:
branches: [master]
paths:
- 'apps/**'
- 'assets/**'
- 'locales/**'
- 'themes/**'
- 'scripts/prepare-package-assets.py'
- 'src/**'
- 'scripts/build-cells.sh'
- 'scripts/package-release.py'
- 'scripts/generate-package-versions.py'
- 'scripts/update-package-version.py'
- 'scripts/check-package-versions.py'
- 'scripts/check-package-publishers.py'
- 'scripts/package-manifests.py'
- 'tests/package_manifests_test.py'
- 'tests/package_upload_test.py'
- 'tests/package_versions_test.py'
- 'tests/package_workflow_test.py'
- 'ziran.lock'
- '.github/workflows/packages.yml'
workflow_dispatch:
permissions:
contents: read
concurrency:
group: inbe-package-publishing
cancel-in-progress: false
jobs:
packages:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/ziran-packages
- name: Install signing and test dependencies
run: sudo apt-get update && sudo apt-get install -y python3-cryptography python3-fonttools
- name: Build independent packages and check signatures
run: |
make package-version-test
make package-workflow-test
make package-manifest-test
make package-upload-test
make cells build-laws
python3 tests/package_release_test.py
- name: Configure publisher
id: publisher
env:
SIGNING_KEY: ${{ secrets.INBE_PACKAGE_SIGNING_KEY }}
KEY_ID: ${{ vars.INBE_PACKAGE_KEY_ID }}
SSH_KEY: ${{ secrets.INBE_NODE_SSH_KEY }}
SSH_HOSTS: ${{ secrets.INBE_NODE_KNOWN_HOSTS }}
TARGET: ${{ secrets.INBE_NODE_SSH_TARGET }}
STORE: ${{ secrets.INBE_NODE_PACKAGE_STORE }}
run: |
python3 - <<'PY'
import os
from pathlib import Path
signing = all(os.environ.get(name) for name in ('SIGNING_KEY', 'KEY_ID'))
configured = signing and all(os.environ.get(name) for name in ('SSH_KEY', 'SSH_HOSTS', 'TARGET', 'STORE'))
with open(os.environ['GITHUB_OUTPUT'], 'a') as output:
output.write('signing=' + str(signing).lower() + '\n')
output.write('configured=' + str(configured).lower() + '\n')
if signing:
directory = Path(os.environ['RUNNER_TEMP']) / 'inbe-publisher'
directory.mkdir(mode=0o700)
files = [('publisher.pem', 'SIGNING_KEY')]
if configured:
files += [('node.key', 'SSH_KEY'), ('known_hosts', 'SSH_HOSTS')]
for filename, name in files:
path = directory / filename
path.write_text(os.environ[name] + '\n')
path.chmod(0o600)
if signing and not configured:
print('Node deployment is not configured; signed releases will be archived for installation on the node.')
elif not signing:
print('Signing is not configured; unsigned build artifacts will be archived without publication.')
PY
- name: Sign app releases
if: steps.publisher.outputs.signing == 'true'
env:
KEY_ID: ${{ vars.INBE_PACKAGE_KEY_ID }}
run: |
python3 scripts/check-package-publishers.py
python3 scripts/package-release.py --store build/package-releases \
--key "$RUNNER_TEMP/inbe-publisher/publisher.pem" --key-id "$KEY_ID"
- name: Sign and publish to Waozi's Daochi node
if: steps.publisher.outputs.configured == 'true'
env:
KEY_ID: ${{ vars.INBE_PACKAGE_KEY_ID }}
TARGET: ${{ secrets.INBE_NODE_SSH_TARGET }}
STORE: ${{ secrets.INBE_NODE_PACKAGE_STORE }}
run: |
export INBE_SSH_IDENTITY="$RUNNER_TEMP/inbe-publisher/node.key"
export INBE_SSH_KNOWN_HOSTS="$RUNNER_TEMP/inbe-publisher/known_hosts"
python3 scripts/package-release.py --store build/package-releases \
--key "$RUNNER_TEMP/inbe-publisher/publisher.pem" --key-id "$KEY_ID" \
--ssh-target "$TARGET" --remote-store "$STORE" \
--verify-origin https://api.waozi.xyz
- name: Archive packages
uses: actions/upload-artifact@v4
with:
name: inbe-app-packages
path: |
build/inbe.zib
build/cells/*.zib
build/package-releases/
if-no-files-found: error
- name: Remove signing material
if: always()
run: rm -rf "$RUNNER_TEMP/inbe-publisher"
+40 -5
View File
@@ -51,10 +51,24 @@ jobs:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
tag=$(gh api repos/waozixyz/inbe/releases/latest --jq .tag_name)
version=${tag#v}
python3 -c 'import re, sys; assert re.fullmatch(r"(?:0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)", sys.argv[1]), "Invalid published release version"' "$version"
echo "SITE_RELEASE_VERSION=$version" >> "$GITHUB_ENV"
gh api repos/waozixyz/inbe/releases/latest > "$RUNNER_TEMP/inbe-published-release.json"
python3 - "$RUNNER_TEMP/inbe-published-release.json" >> "$GITHUB_ENV" <<'PY'
import json
import re
import sys
from pathlib import Path
release = json.loads(Path(sys.argv[1]).read_text())
tag = release["tag_name"]
version = tag.removeprefix("v")
assert re.fullmatch(r"(?:0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)", version), "Invalid published release version"
assets = {asset["name"] for asset in release["assets"]}
candidates = [f"inbe-{version}-arm64-v8a.apk", f"inbe-{version}.apk"]
android = next((name for name in candidates if name in assets), None)
assert android is not None, "Published release has no compatible Android APK"
print(f"SITE_RELEASE_VERSION={version}")
print(f"SITE_ANDROID_APK_ASSET={android}")
PY
- name: Install Packages
if: ${{ !inputs.released_web }}
@@ -78,6 +92,18 @@ jobs:
unzip -q build/released-web/inbe-web.zip -d build/dist/web
test -s build/dist/web/index.wasm
- name: Web runner diagnostics
if: ${{ !inputs.released_web }}
run: |
set -euo pipefail
lscpu
free -m
for browser in chromium chromium-browser google-chrome google-chrome-stable; do
if command -v "$browser" >/dev/null 2>&1; then
"$browser" --version
fi
done
- name: Build Site
run: |
set -euo pipefail
@@ -93,7 +119,7 @@ jobs:
test -f build/site/index.html
test -f build/site/build/web/index.html
test -f build/site/build/web/index.js
test -f build/site/build/web/index.wasm
test -f build/site/build/web/index.wasm || test -f build/site/build/web/index.wasm.gz || test -f build/site/build/web/index.wasm.parts.json
if [ "$GITHUB_EVENT_NAME" != "pull_request" ]; then
make site-release-assets-check
else
@@ -103,6 +129,15 @@ jobs:
GH_TOKEN: ${{ github.token }}
RELEASED_WEB: ${{ inputs.released_web }}
- name: Upload Web diagnostics after a failed build
if: ${{ failure() && !inputs.released_web }}
uses: actions/upload-artifact@v4
with:
name: inbe-web-diagnostics
path: build/dist/web
if-no-files-found: warn
retention-days: 3
- name: Upload Site Artifact
uses: actions/upload-artifact@v4
with:
+36
View File
@@ -4,6 +4,23 @@ on:
push:
branches:
- master
paths:
- 'src/**'
- '!src/cells/versions.zi'
- 'droid/**'
- 'apps/publishers.json'
- 'CHANGELOG.md'
- 'Makefile'
- 'ziran.lock'
- 'scripts/**'
- '!scripts/package-release.py'
- '!scripts/update-package-version.py'
- '!scripts/generate-package-versions.py'
- '!scripts/prepare-package-assets.py'
- '!scripts/check-package-versions.py'
- '!scripts/package-manifests.py'
- 'packaging/**'
- '.github/workflows/release.yml'
workflow_dispatch:
permissions:
@@ -28,6 +45,9 @@ jobs:
with:
save-toolchain: 'false'
- name: Require configured app publisher
run: python3 scripts/check-package-publishers.py
- name: Check Version Consistency
run: |
python3 scripts/check-version.py
@@ -680,6 +700,9 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Install translation check dependency
run: sudo apt-get update && sudo apt-get install -y python3-fonttools
- name: Cache Android SDK packages
uses: actions/cache@v4
with:
@@ -746,6 +769,14 @@ jobs:
make android-copy-release-apks
make android-copy-bundle
- name: Preserve Android Native Crash Symbols
uses: actions/upload-artifact@v4
with:
name: android-native-symbols
path: droid/app/build/intermediates/native_debug_metadata/**/out/**/*.dbg
if-no-files-found: error
retention-days: 90
- name: Collect Android Release Files
run: |
set -euo pipefail
@@ -762,6 +793,11 @@ jobs:
fi
cp "$apk" build/release/android/
done
for abi in arm64-v8a armeabi-v7a x86 x86_64; do
apk="build/android/inbe-$VERSION-$abi.apk"
test -f "$apk"
cp "$apk" build/release/android/
done
cp "build/android/inbe-$VERSION-gplay.aab" build/release/android/
- name: Upload Android Artifacts
+2
View File
@@ -15,6 +15,7 @@
.ccache
*.wasm
build/
/backup/
/output/
tmp/
vendor-builds/
@@ -79,3 +80,4 @@ design/sun-salutation/*/reference.mp4
design/sun-salutation/*/reference-*.png
design/sun-salutation/generated-video-cut/source.mp4
design/sun-salutation/girl-parts/head-layers-check.png
.wrangler/
+177 -1
View File
@@ -1,4 +1,178 @@
# Changelog
## [2.1.20] - 2026-10-08
### Changed
- Keep Apps beside your desktop favorites without a large empty gap.
- Open Profile beside Settings in Apps, without a fixed desktop Profile shortcut.
### Fixed
- Fix blank desktop pages when regional settings use comma decimals.
## [2.1.19] - 2026-10-08
### Added
- Create or restore an account in Telegram's Mini App, with an encrypted recovery backup saved on your device.
- Connect Telegram with approved, expiring Lumi access without sharing your account's private key.
### Changed
- Keep Telegram access limited to Lumi and let you revoke it from Inbe.
### Fixed
- Preserve existing account data when account setup or recovery is cancelled or fails.
## [2.1.18] - 2026-10-08
### Changed
- Show each app's bundle size in Apps and favorites.
- Start with the searchable Apps screen and ready-to-use apps, without an install chooser.
- Give new users Lumi, Habits and Practices as their first three favorites.
- Arrange favorites by dragging app tiles in Apps, with no separate Apps and Favorites settings page.
- Remove the extra Inbe heading above Apps.
## [2.1.17] - 2026-10-07
### Changed
- Choose apps from a searchable library with a compact favorites dock on mobile and desktop.
- Pin up to two favorites without removing other apps or their saved data.
- Open Profile and Settings from the app library, with a Profile shortcut on desktop.
## [2.1.16] - 2026-10-07
### Changed
- Open faster by keeping feature packages loaded and loading language fonts only when needed.
- Use Android's installed fonts with automatic character fallback where available.
- Prepare Android audio when first used so it no longer delays opening the app.
### Added
- Show a loading indicator on Android until the first app screen is ready.
## [2.1.15] - 2026-10-07
### Fixed
- Open Telegram sync links on Android when the installed chat app is hidden from app availability checks.
- Open Lumi in the installed Telegram app on Android, with a web link available when Telegram is not installed.
## [2.1.14] - 2026-10-07
### Changed
- Scroll up through Lumi chat history without Older and Newer buttons, keeping your place when replies arrive.
- Connect, view connection status and disconnect Telegram from Settings under Sync with Telegram.
## [2.1.13] - 2026-10-07
### Changed
- Merge sync data directly from the action buttons below the change list, without a separate Apply step.
- Review clearer sync changes with colored additions, removals and edits, and fewer repeated or empty details.
## [2.1.12] - 2026-10-07
### Fixed
- Display bold emphasis in Lumi replies and recognize app feature suggestions as feedback offline.
- Keep app text visible when upgrading to the new Lumi formatting.
## [2.1.11] - 2026-10-07
### Added
- Ask Lumi for progress charts and donation links directly in chat.
- Talk naturally with Lumi online, with a daily account allowance and access to app actions.
- Save app feedback from chat, send it when connected, and receive developer replies in Lumi.
### Fixed
- Keep feedback available when online chat is disabled or its allowance runs out.
## [2.1.10] - 2026-10-06
### Fixed
- Open and scroll Lumi smoothly, including longer conversations.
- Use a checkmark for Lists so it is easy to distinguish from Diary.
## [2.1.9] - 2026-10-06
### Fixed
- Keep hidden apps installed so adding them back to the sidebar works immediately offline.
- Preserve the selected page during upgrades and restore missing shortcuts for selected apps.
- Keep the interface responsive if an app fails to reset, and reduce repeated work in Lumi chat.
- Open the Android keyboard correctly when writing to Lumi.
## [2.1.8] - 2026-10-06
### Changed
- Call sidebar items Apps throughout setup and settings.
- Use Shift+Enter for a new line in Lumi chat and Enter to send.
### Fixed
- Save Diary entries from Lumi chat with the current time above your message, including multiline text.
- Ask for the entry text when a Diary request is sent without it, and keep replies short when a request is unclear.
- Show Lumi’s mirrored avatar beside replies so the companion faces the conversation.
## [2.1.7] - 2026-10-06
### Changed
- Manage Lumi and all other cells in one compact list with icons, drag handles and add/remove controls.
- Include Lists and Diary with the app so every cell can be added to the sidebar offline.
## [2.1.6] - 2026-10-06
### Changed
- Manage installed and available cells together in Settings, with drag reordering, trash controls and quick reinstallation from saved packages.
- Keep Lumi included as the app companion while allowing her sidebar shortcut to be hidden, with an outlined firefly icon matching the other navigation icons.
- Let Lumi change themes and appearance directly through chat and app tools.
### Fixed
- Keep sidebars steady while dragging the scale slider and apply the new scale on release.
- Keep Settings available in the final sidebar position.
- Honor every checked startup cell, including Diary, and report Diary correctly when opened in Harmony.
- Exit promptly when Quit is pressed in the close dialog.
## [2.1.5] - 2026-10-06
### Changed
- Chat with Lumi in a simpler conversation view, with her avatar beside replies and a standard cell icon.
- Let Lumi complete today’s habits and start practices immediately, including WHM.
- Show Lumi commands only for installed and enabled cells.
- Ask which habit to complete, choose it by name, and use compact autocomplete chips with case-insensitive matching and command spelling correction.
## [2.1.4] - 2026-10-06
### Added
- Meet Lumi, Inner Breeze's firefly companion, as the first recommended cell and home screen.
- Chat privately with Lumi, complete commands and todo names as you type, and add, complete or reopen todos locally.
### Fixed
- Restore missing characters in translations and mixed-language labels, including the Android language picker.
## [2.1.3] - 2026-10-06
### Fixed
- Restore translated text after the cell packages load, and refresh translations when packages change.
## [2.1.2] - 2026-10-06
### Changed
- Call the independently installed features Cells, with a translated cell picker and separate versions in About.
## [2.1.1] - 2026-10-06
### Added
- Attach, browse and remove Diary photos while preserving imported originals.
- Load graphics, translations, fonts and styles from cell packages so these resources can update without replacing the APK.
- Update the cell picker, Diary and Lists screens through their cell packages.
### Fixed
- Keep browser account signing and update checks working with the current web runtime.
- Keep importing saved account data working in the browser.
## [2.1.0] - 2026-10-06
### Added
- Choose recommended Habits and Practices or download optional Lists and Diary from the cell picker.
- Receive verified cell updates independently, with a switch to disable automatic updates and a manual update check.
- Sync selected apps with your account, including removals, while keeping saved data on each device.
- Write private daily entries in Diary and browse them by calendar, preserving the existing Harmony entry format.
- View the main application version and each cell version in About.
## [2.0.12] - 2026-10-06
### Fixed
- Restore banners and navigation icons when returning to the Android app or changing orientation.
- Keep images from disappearing or showing font characters after graphics resources are recreated.
- Restore missing characters in translated screens.
- Keep Classic and Lightfield styles working on profile actions.
## [2.0.11] - 2026-10-04
### Changed
- Lists, Habits, and Practice now load as separate modules inside Inner Breeze, with shared navigation, settings, and saved data.
## [2.0.10] - 2026-10-02
### Changed
- Smoothed the outlines of all four Sun Salutation characters during movement.
### Fixed
- Corrected the women's neck placement and removed white fringes and specks around their clothing.
## [2.0.9] - 2026-10-02
### Added
- Choose between four painted Sun Salutation characters in Customize. Your choice is saved and appears in the practice, pose previews, and guide.
### Changed
- Replaced the previous Sun Salutation character with the four banner-inspired designs. The men wear distinct rust-and-charcoal and indigo-and-sand outfits.
## [2.0.8] - 2026-10-02
### Fixed
- Fixed an Android startup crash after upgrading from older versions, while preserving saved preferences and practice history.
- Keep drawing the app when a device cannot allocate the graphics buffers used for screen transitions.
- Show the selected breathing speed, round count, breath count, and pause duration in Wim Hof customization.
- Keep the progressive start-speed editor's preview and slider visible.
## [2.0.7] - 2026-10-01
### Added
- Mini mode provides a compact practice window without changing your saved window or navigation settings.
@@ -12,6 +186,8 @@
- Refined Settings, Profile, Lists, habit cards, session controls, and mood check-in buttons. Desktop users can zoom with Ctrl and the mouse wheel.
### Fixed
- Music keeps playing when you switch tabs inside the app or leave practice customization.
- Restored sound and music playback in the web app.
- Appearance dropdown menus stay above the Layout card and other settings, keeping every option visible and selectable.
- Practice Customize and How-to actions now open the correct pages, and carousel swipes reliably change practices.
- Animated screens keep their controls visible, and navigation transitions finish before accepting the next action.
@@ -318,7 +494,7 @@
## [1.9.0] - 2026-08-15
### Added
- Break reminders, Workrave-style: micro, rest and daily break timers with statistics and a desktop timer HUD that lives as a real OS window next to the app (desktop only, off by default, with its own settings tab).
- A dedicated Notifications settings tab. Push delivery uses UnifiedPush (no Google services): "Set up push" opens an in-app picker that lists installed distributor apps with their name and icon and registers with the one you pick; the status line reports the real registration state.
- A dedicated Notifications settings tab. Push delivery uses UnifiedPush (no Google services): "Set up push" opens an in-cell picker that lists installed distributor apps with their name and icon and registers with the one you pick; the status line reports the real registration state.
- Reminders are an editable list: add as many as you want, each with a practice dropdown (Wim Hof, Meditation, Sun Salutation), a [-] time [+] stepper, an on/off toggle and delete. Ships with one enabled Wim-Hof 08:00 reminder.
- A notification when new friend requests arrive over social sync (toggleable, on by default).
- Screenshot scenes for the first-run guide and the notifications settings, for regression coverage.
+339 -54
View File
@@ -375,10 +375,10 @@ SYSTEM_THEME_CFLAGS :=
SYSTEM_THEME_LDLIBS :=
LOCALE_FILES := $(wildcard locales/*.txt)
IMAGE_FILES := assets/app/icon.png assets/easteregg/art.png assets/easteregg/waozi.png assets/practices/whm/1.png assets/practices/whm/2.png assets/practices/meditation/1.png assets/pet/egg1.png $(wildcard assets/practices/*/banner*.png) $(wildcard assets/practices/sunsalutation/girl/*.png)
IMAGE_FILES := assets/app/icon.png assets/easteregg/art.png assets/easteregg/waozi.png assets/practices/whm/1.png assets/practices/whm/2.png assets/practices/meditation/1.png assets/pet/egg1.png $(wildcard assets/practices/*/banner*.png) $(wildcard assets/practices/sunsalutation/characters/*/*.png)
SOUND_FILES := $(wildcard assets/sounds/*.ogg)
FONT_SUBSET_DIR := assets/fonts/subset
FONT_SUBSET_CORPUS := locales assets/fonts/input_common.txt
FONT_SUBSET_CORPUS := locales assets/fonts/input_common.txt assets/fonts/ui_symbols.txt
FONT_FILES := \
$(FONT_SUBSET_DIR)/NotoSans-App-Regular.ttf \
$(FONT_SUBSET_DIR)/NotoSansSC-App-Regular.otf \
@@ -391,8 +391,37 @@ STYLE_FILES := $(wildcard $(KSS_DIR)/styles/*.kss) \
$(wildcard themes/catalog_*.kss)
IMAGE_FILES += assets/app/icon-sky-cradle.png assets/app/icon-ink-and-air.png
IMAGE_FILES += $(wildcard assets/social/*.png)
IMAGE_FILES += $(wildcard assets/profile-pictures/*.png)
IMAGE_FILES += $(KRYON_DIR)/icons/ui.png $(KRYON_DIR)/icons/pfp.png
EMBEDDED_ASSET_FILES := $(STYLE_FILES) $(LOCALE_FILES) $(IMAGE_FILES) $(SOUND_FILES) $(FONT_FILES)
CELL_BUNDLES := $(addprefix $(BUILD_DIR)/cells/,lists.zib habits.zib practices.zib diary.zib lumi.zib)
INBE_BUNDLE := $(BUILD_DIR)/inbe.zib
INBE_FULL_BUNDLE := $(BUILD_DIR)/inbe-full.zib
CELL_SOURCES := $(shell find apps src/cells -name '*.zi' | LC_ALL=C sort) src/core/types.zi src/core/breath_timing.zi $(wildcard src/practices/patterns/*rules.zi) src/practices/patterns/patterns_clock.zi src/practices/patterns/patterns_types.zi src/practices/sun_salutation/sun_salutation_rules.zi src/practices/meditation/meditation_timing.zi
CELL_RESOURCES := $(shell rg --files assets/habits assets/lists assets/diary assets/lumi assets/mcp 2>/dev/null)
WIDGET_SCHEMAS := $(addprefix $(KRYON_DIR)/src/ui/,session.zi geometry.zi drawing_props.zi text_props.zi image_props.zi button_props.zi control_props.zi text_input.zi text_input_props.zi scroll.zi scroll_props.zi semantic.zi text_align.zi checkbox_props.zi toggle_props.zi tab_bar_props.zi box_props.zi) $(addprefix src/cells/,diary_ui_types.zi inbe_ui_types.zi lists_ui_types.zi lumi_ui_types.zi lumi_types.zi)
src/cells/widget_codec.zi: scripts/generate-widget-codecs.py $(WIDGET_SCHEMAS)
python3 scripts/generate-widget-codecs.py
.PHONY: cells
cells: $(CELL_BUNDLES) $(INBE_BUNDLE) $(INBE_FULL_BUNDLE)
.PHONY: lumi-test
lumi-test: cells
sh tests/lumi_engine_test.sh
.PHONY: lumi-ui-test
lumi-ui-test: $(TARGET)
sh tests/lumi_ui_test.sh $(abspath $(TARGET))
.PHONY: lumi-history-ui-test
lumi-history-ui-test: $(TARGET)
env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS \
python3 tests/lumi_history_ui_test.py $(abspath $(TARGET))
$(CELL_BUNDLES) $(INBE_BUNDLE) $(INBE_FULL_BUNDLE) &: $(CELL_SOURCES) $(CELL_RESOURCES) ziran.lock apps/versions.json scripts/check-package-versions.py scripts/generate-package-versions.py scripts/prepare-package-assets.py scripts/animation_inventory.py scripts/build-cells.sh src/practices/sun_salutation/sun_salutation_assets.zi src/practices/sun_salutation/sun_salutation_inventory.zi $(IMAGE_FILES) $(SOUND_FILES) $(FONT_FILES) $(STYLE_FILES) $(LOCALE_FILES) $(ZIRAN_BIN)
sh scripts/build-cells.sh $(ZIRAN_BIN)
EMBEDDED_ASSET_FILES := apps/publishers.json $(INBE_BUNDLE) assets/app/icon.png
KRY_GEN_DIR := $(BUILD_DIR)/kryon/generated
ZI_SRCS := $(shell find src -type f -name '*.zi' 2>/dev/null | LC_ALL=C sort)
GAME2D_DIR := build/packages/game2d
@@ -401,7 +430,7 @@ DAOCHI_CLIENT_MODULES := $(wildcard build/packages/daochi-client/*.zi)
ZIRAN_STD_MODULES := $(wildcard $(ZIRAN_DIR)/std/*.zi)
KRYON_ZI_MODULES := $(shell find $(KRYON_DIR)/src -type f -name '*.zi' | LC_ALL=C sort)
KRY_GEN_SRCS := $(patsubst %.zi,$(KRY_GEN_DIR)/%.c,$(ZI_SRCS))
KRY_GEN_SRCS += $(addprefix $(KRY_GEN_DIR)/,account.c auth.c byte_text_linux.c \
KRY_GEN_SRCS += $(addprefix $(KRY_GEN_DIR)/,account.c auth.c authorization.c authorization_owner.c delegated.c async_delegated.c envelope.c byte_text_linux.c \
c_string.c client.c date_parse.c date_time.c events.c json_scan.c net_http_curl_linux.c \
net_ws_curl_linux.c social.c sync.c \
text.c text_buffer.c transaction.c update.c url.c wire.c)
@@ -416,6 +445,9 @@ WINDOWS_GEN_DIR := $(BUILD_DIR)/kryon/generated-windows
WINDOWS_GEN_SRCS := $(patsubst $(KRY_GEN_DIR)/%,$(WINDOWS_GEN_DIR)/%,$(KRY_GEN_SRCS))
WINDOWS_GEN_GAME_C := $(WINDOWS_GEN_DIR)/Raylib.c
WINDOWS_GEN_STAMP := $(WINDOWS_GEN_DIR)/.fresh
# The Unix clock provider is generated only for the native app. Web and
# Windows source lists above retain their platform clock implementations.
KRY_GEN_SRCS += $(KRY_GEN_DIR)/date_time_linux.c
SRC := $(APP_SRCS) $(KRY_GEN_STAMP) $(EMBEDDED_ASSETS_C)
GENERATED_NATIVE_C = $(shell find $(KRY_GEN_DIR) -type f -name '*.c' | LC_ALL=C sort)
WINDOWS_SRC := $(APP_SRCS) $(EMBEDDED_ASSETS_C)
@@ -469,7 +501,7 @@ COMMON_CFLAGS := -Wall -Wextra -Os -D_DEFAULT_SOURCE -D_GNU_SOURCE -ffunction-se
CFLAGS := $(COMMON_CFLAGS) -std=c99 $(RUNTIME_ASSET_CFLAGS) $(SYSTEM_THEME_CFLAGS) $(KRYON_NOTIFICATION_CPPFLAGS) $(KRYON_NOTIFICATION_CFLAGS)
NATIVE_SYSTEM_LDLIBS := $(KRYON_NOTIFICATION_LDLIBS) -lz -lm -lpthread -latomic $(if $(filter linux,$(NATIVE_PLATFORM)),-ldl -lrt,) $(SYSTEM_THEME_LDLIBS)
WINDOWS_CFLAGS := -Wall -Wextra -std=c99 -Os -D_DEFAULT_SOURCE -D_GNU_SOURCE -ffunction-sections -fdata-sections -DSUPPORT_FILEFORMAT_JPG=1 -DUI_EMBEDDED_ONLY=1 -DKRYON_WITH_SYNC=1
WEB_CFLAGS := $(filter-out -Os -DNATIVE_WINDOW_HAVE_SDL,$(COMMON_CFLAGS)) -Oz -std=gnu99
WEB_CFLAGS := $(filter-out -Os -DNATIVE_WINDOW_HAVE_SDL,$(COMMON_CFLAGS)) -O2 -std=gnu99
CLICK_CFLAGS := -Wall -Wextra -std=c99 -Os -D_DEFAULT_SOURCE -D_GNU_SOURCE -ffunction-sections -fdata-sections -DSUPPORT_FILEFORMAT_JPG=1 -DUI_EMBEDDED_ONLY=1 -DDISABLE_KRYON_FILE_DIALOG -DHAS_LIBCURL=1 -DKRYON_WITH_SYNC=1 $(AARCH64_KRYON_CURL_CFLAGS)
LDFLAGS := -Wl,--gc-sections -s
WINDOWS_LDFLAGS := -Wl,--gc-sections -static -static-libgcc -mwindows
@@ -573,7 +605,7 @@ WEB_TARGET := $(WEB_DIST_DIR)/index.html
WEB_APP_SCRIPT := <script>window.__inbeRenderer="canvas";window.__inbeLoadApp("index.js?v=$(WEB_CACHE_BUSTER)")</script>
WEB_JS_TARGET := $(WEB_DIST_DIR)/index.js
WEB_BOOT_JS := src/web_boot.js
WEB_HOST_JS := src/web_host.js scripts/browser_network.js
WEB_HOST_JS := src/web_host.js scripts/browser_network.js scripts/telegram_host.js
# Kryon's canvas hosts are Ziran modules on Ziran's web bridge; its runtime is the only JS they need.
WEB_CANVAS_HOST_JS := $(ZIRAN_DIR)/web/ziran_web.js
WEB_HOST_JS += $(WEB_CANVAS_HOST_JS)
@@ -634,8 +666,10 @@ all: native
# mixing a new zi2zir with an old ziran fails on the ZIR version.
ZIRAN_TOOLS := $(addprefix $(ZIRAN_BUILD_DIR)/bin/,zi2c zi2zir zi2zib zi2cpp zi2go ziran)
$(ZI2C_BIN): $(ZIRAN_SOURCES)
$(MAKE) -C $(ZIRAN_DIR) BUILD_DIR=$(ZIRAN_BUILD_DIR) $(ZIRAN_TOOLS)
$(ZI2C_BIN) $(ZIRAN_BUILD_DIR)/libziran.a &: $(ZIRAN_SOURCES) ziran.lock
$(MAKE) -C $(ZIRAN_DIR) BUILD_DIR=$(ZIRAN_BUILD_DIR) $(ZIRAN_TOOLS) $(ZIRAN_BUILD_DIR)/libziran.a
$(ZIRAN_BIN): $(ZI2C_BIN)
zi-check: $(ZI_CHECK_STAMP) | build-laws
@@ -682,6 +716,14 @@ break-rules-test: $(ZI2C_BIN)
sun-salutation-test: $(ZI2C_BIN)
@sh tests/sun_salutation_zi_test.sh $(ZIRAN_BUILD_DIR)/bin
.PHONY: sun-salutation-assets-test
sun-salutation-assets-test:
python3 tests/sun_salutation_assets_test.py
.PHONY: sun-salutation-artwork-test
sun-salutation-artwork-test:
python3 tests/sun_salutation_artwork_test.py
.PHONY: break-engine-test
break-engine-test: $(ZI2C_BIN)
@env -u DISPLAY -u WAYLAND_DISPLAY sh tests/break_engine_zi_test.sh $(ZIRAN_BUILD_DIR)/bin
@@ -757,6 +799,26 @@ sync-account-crypto-zi-test: $(ZI2C_BIN) $(LIBOQS_A)
test: sync-account-crypto-zi-test
# Exercise the packaged Ziran crypto API against the exact archive used by
# Inbe, including ML-KEM round trips, tampering and short-buffer rejection.
.PHONY: liboqs-crypto-test
liboqs-crypto-test: $(ZIRAN_BIN) $(LIBOQS_A)
@rm -rf $(BUILD_DIR)/liboqs-crypto-test/generated
@mkdir -p $(BUILD_DIR)/liboqs-crypto-test/generated
@$(ZIRAN_BIN) build --target=c --root $(OQS_DIR)/src \
--module-path $(OQS_DIR)/tests --module-path $(ZIRAN_DIR)/std \
--entry oqs_test:main -o $(BUILD_DIR)/liboqs-crypto-test/generated \
$(OQS_DIR)/tests/oqs_test.zi
@$(CC) -std=c99 -O2 -I$(ZIRAN_DIR)/include \
-I$(BUILD_DIR)/liboqs-crypto-test/generated \
$(BUILD_DIR)/liboqs-crypto-test/generated/*.c $(LIBOQS_A) \
-lm -lpthread -o $(BUILD_DIR)/liboqs-crypto-test/test
@env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS \
$(BUILD_DIR)/liboqs-crypto-test/test
@echo "Inbe liboqs: ML-DSA-44 and ML-KEM-768 checks passed"
test: liboqs-crypto-test
.PHONY: sync-account-zi-test
sync-account-zi-test: $(ZI2C_BIN) $(SQLITE_SRC) $(LIBOQS_A)
@env -u DISPLAY -u WAYLAND_DISPLAY \
@@ -778,6 +840,13 @@ storage-habits-zi-test: $(ZI2C_BIN) $(SQLITE_SRC) $(LIBOQS_A)
test: storage-habits-zi-test
.PHONY: storage-settings-threads-zi-test
storage-settings-threads-zi-test: $(ZI2C_BIN) $(SQLITE_SRC) $(LIBOQS_A)
@env -u DISPLAY -u WAYLAND_DISPLAY \
sh tests/storage_settings_threads_zi_test.sh $(ZIRAN_BUILD_DIR)/bin/ziran $(LIBOQS_A)
test: storage-settings-threads-zi-test
.PHONY: storage-sync-zi-test
storage-sync-zi-test: $(ZI2C_BIN) $(SQLITE_SRC) $(LIBOQS_A)
@env -u DISPLAY -u WAYLAND_DISPLAY \
@@ -800,7 +869,7 @@ sync-review-zi-test: $(ZI2C_BIN) $(SQLITE_SRC) | build-laws
test: sync-review-zi-test
.PHONY: ziran-behavior-tests
ziran-behavior-tests: $(ZI2C_BIN) $(SQLITE_SRC) $(LIBOQS_A) $(RAYLIB_A)
ziran-behavior-tests: cells $(ZI2C_BIN) $(ZIRAN_BUILD_DIR)/libziran.a $(SQLITE_SRC) $(LIBOQS_A) $(RAYLIB_A)
@set -e; for t in storage_more habit_model habit_sessions habit_form practice_carousel; do \
env -u DISPLAY -u WAYLAND_DISPLAY sh tests/$${t}_zi_test.sh $(ZIRAN_BUILD_DIR)/bin/ziran $(LIBOQS_A); \
done
@@ -820,6 +889,16 @@ test: profile-host-test
native: $(TARGET)
.PHONY: launcher-policy-test launcher-ui-test
launcher-policy-test: $(ZI2C_BIN)
sh tests/launcher_policy_zi_test.sh $(ZIRAN_BUILD_DIR)/bin
launcher-ui-test: $(TARGET)
env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS YUE_DESKTOP_RECOVERY=0 \
python3 tests/launcher_ui_test.py $(abspath $(TARGET))
test: launcher-policy-test
.PHONY: native-screenshot-test
native-screenshot-test: $(TARGET)
sh tests/native_screenshot_test.sh $(abspath $(TARGET))
@@ -828,10 +907,25 @@ native-screenshot-test: $(TARGET)
native-navigation-test: $(TARGET)
sh tests/native_navigation_test.sh $(abspath $(TARGET))
.PHONY: music-navigation-test
music-navigation-test: $(TARGET)
@python3 tests/music_navigation_test.py '$(CC)' '$(NATIVE_COMPILE_FLAGS)' \
'$(KRYON_LIBRARY_BUILD_DIR)/libkryon.a $(KRYON_NATIVE_BACKEND_LIBS) $(LIBOQS_A) $(KRYON_NATIVE_BACKEND_LDLIBS) $(RUNTIME_ASSET_LDLIBS) $(NATIVE_SYSTEM_LDLIBS) $(LDFLAGS)'
.PHONY: native-zoom-test
native-zoom-test: $(TARGET)
sh tests/native_zoom_test.sh $(abspath $(TARGET))
.PHONY: settings-sidebar-ui-test
settings-sidebar-ui-test: $(TARGET)
env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS YUE_DESKTOP_RECOVERY=0 \
python3 tests/settings_sidebar_ui_test.py $(abspath $(TARGET))
.PHONY: startup-quit-ui-test
startup-quit-ui-test: $(TARGET) $(INBE_FULL_BUNDLE)
env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS YUE_DESKTOP_RECOVERY=0 \
python3 tests/startup_quit_ui_test.py $(abspath $(TARGET))
kryon-host: $(KRYON_HOST_TARGET)
# Generate Kryon's checked Ziran modules into Inbe's build tree.
@@ -847,7 +941,7 @@ $(KRYON_UI_C) $(KRYON_UI_H): $(KRYON_UI_STAMP)
$(KRYON_KSS_STAMP): Makefile $(ZI2C_BIN) $(KRYON_KSS_ZI) $(KRYON_DIR)/src/ui/modules.txt
mkdir -p $(dir $@)
$(ZI2C_BIN) --no-main --root $(KSS_DIR)/src \
--module-path $(KRYON_DIR)/src/ui --module-path kryon=$(KRYON_DIR)/src/ui \
--module-path $(KRYON_DIR)/src/ui --module-path kryon=$(KRYON_DIR)/src/ui --module-path kryon=$(KRYON_DIR)/src/backend \
-o $(dir $@) $(KRYON_KSS_ZI)
touch $@
@@ -855,11 +949,13 @@ $(KRYON_KSS_C) $(KRYON_KSS_H): $(KRYON_KSS_STAMP)
@test -f $@
$(KRY_GEN_STAMP): Makefile ziran.lock $(ZI2C_BIN) $(ZI_SRCS) $(KRYON_ZI_MODULES) $(GAME2D_MODULES) $(DAOCHI_CLIENT_MODULES) $(ZIRAN_STD_MODULES) $(SYNC_RETRY_SOURCE) | build-laws zi-check
# Imports can change emitted paths; never retain an obsolete header/code pair.
rm -rf $(KRY_GEN_DIR)
mkdir -p $(KRY_GEN_DIR)
sh scripts/run-ziran.sh $(ZI2C_BIN) --no-main --prune-stale --root . \
$(foreach define,$(ZI_NATIVE_DEFINES),--define $(define)) \
--module-path src --module-path $(KRYON_DIR)/src/ui \
--module-path $(KSS_DIR)/src --module-path oqs=$(OQS_DIR)/src --module-path kryon=$(KRYON_DIR)/src/ui \
--module-path $(KSS_DIR)/src --module-path oqs=$(OQS_DIR)/src --module-path kryon=$(KRYON_DIR)/src/ui --module-path kryon=$(KRYON_DIR)/src/backend \
--module-path $(KRYON_DIR)/src/backend \
--module-path $(GAME2D_DIR)/src \
--module-path $(ZIRAN_DIR)/std \
@@ -873,7 +969,7 @@ $(WEB_GEN_STAMP): Makefile ziran.lock $(ZI2C_BIN) $(ZI_SRCS) $(KRYON_ZI_MODULES)
sh scripts/run-ziran.sh $(ZI2C_BIN) --no-main --root . \
--define PLATFORM_WEB --define __EMSCRIPTEN__ \
--module-path src --module-path $(KRYON_DIR)/src/ui \
--module-path $(KSS_DIR)/src --module-path oqs=$(OQS_DIR)/src --module-path kryon=$(KRYON_DIR)/src/ui \
--module-path $(KSS_DIR)/src --module-path oqs=$(OQS_DIR)/src --module-path kryon=$(KRYON_DIR)/src/ui --module-path kryon=$(KRYON_DIR)/src/backend \
--module-path $(KRYON_DIR)/src/backend \
--module-path $(GAME2D_DIR)/src \
--module-path $(ZIRAN_DIR)/std \
@@ -892,7 +988,7 @@ $(WINDOWS_GEN_STAMP): Makefile ziran.lock $(ZI2C_BIN) $(ZI_SRCS) $(KRYON_ZI_MODU
--define PLATFORM_DESKTOP --define _WIN32 \
--define DESKTOP_TRAY_ENABLED \
--module-path src --module-path $(KRYON_DIR)/src/ui \
--module-path $(KSS_DIR)/src --module-path oqs=$(OQS_DIR)/src --module-path kryon=$(KRYON_DIR)/src/ui \
--module-path $(KSS_DIR)/src --module-path oqs=$(OQS_DIR)/src --module-path kryon=$(KRYON_DIR)/src/ui --module-path kryon=$(KRYON_DIR)/src/backend \
--module-path $(KRYON_DIR)/src/backend \
--module-path $(GAME2D_DIR)/src \
--module-path $(ZIRAN_DIR)/std \
@@ -919,7 +1015,7 @@ zi-c-plan9: $(KRY_GEN_STAMP)
sh scripts/run-ziran.sh $(ZI2C_BIN) --no-main --plan9 --define PLAN9_BUILD \
--define KRYON_PLATFORM_PLAN9 --root . \
--module-path src --module-path $(KRYON_DIR)/src/ui \
--module-path $(KSS_DIR)/src --module-path oqs=$(OQS_DIR)/src --module-path kryon=$(KRYON_DIR)/src/ui \
--module-path $(KSS_DIR)/src --module-path oqs=$(OQS_DIR)/src --module-path kryon=$(KRYON_DIR)/src/ui --module-path kryon=$(KRYON_DIR)/src/backend \
--module-path $(KRYON_DIR)/src/backend \
--module-path $(GAME2D_DIR)/src \
--module-path $(ZIRAN_DIR)/std \
@@ -1111,7 +1207,10 @@ sync-restore-sql-test:
test: habit-merge-sql-test sync-restore-sql-test
build-laws: version-check proofs
build-laws: version-check proofs locale-check
.PHONY: locale-check
locale-check: asset-text-tests locale-translated-test locale-used-keys-test
test: proof-test
@@ -1137,6 +1236,7 @@ lists-ui-test: $(TARGET)
.PHONY: storage-literals-check
storage-literals-check:
python3 tests/storage_literals_test.py
bash ./scripts/check-storage-literals.sh
test: clean-text-api-check package-check secret-check storage-literals-check font-bundle-check audio-test-fixture-check embedded-image-assets-check
@@ -1163,7 +1263,7 @@ font-bundle-check:
font-subsets:
sh $(KRYON_DIR)/scripts/subset-fonts.sh "$(FONT_SUBSET_DIR)" \
"$(KRYON_DIR)/fonts/noto" App locales assets/fonts/input_common.txt
"$(KRYON_DIR)/fonts/noto" App $(FONT_SUBSET_CORPUS)
.PHONY: sync-server-test
@@ -1205,7 +1305,7 @@ patterns-session-zi-test: $(ZI2C_BIN)
test: patterns-session-zi-test
.PHONY: session-results-zi-test
session-results-zi-test: $(ZI2C_BIN) $(SQLITE_SRC) $(LIBOQS_A)
session-results-zi-test: cells $(ZI2C_BIN) $(ZIRAN_BUILD_DIR)/libziran.a $(SQLITE_SRC) $(LIBOQS_A) $(RAYLIB_A)
@sh tests/session_results_zi_test.sh $(ZIRAN_BUILD_DIR)/bin/ziran $(LIBOQS_A)
@$(ZI2C_BIN) --no-main --root tests --module-path build/packages/ziran/std \
-o $(BUILD_DIR)/session-mood-generated tests/session_result_storage_behavior.zi
@@ -1403,9 +1503,11 @@ storage-paths-zi-test: $(ZI2C_BIN)
test: storage-paths-zi-test
.PHONY: daochi-client-zi-test
daochi-client-zi-test: $(ZI2C_BIN)
daochi-client-zi-test: $(ZI2C_BIN) $(LIBOQS_A)
@env -u DISPLAY -u WAYLAND_DISPLAY \
ZI2C_BIN=$(abspath $(ZI2C_BIN)) ZIRAN_DIR=$(abspath $(ZIRAN_DIR)) \
ZIRAN_BIN=$(abspath $(ZIRAN_BIN)) OQS_DIR=$(abspath build/packages/oqs) \
LIBOQS_A=$(abspath $(LIBOQS_A)) \
sh build/packages/daochi-client/tests/run.sh
test: daochi-client-zi-test
@@ -1634,6 +1736,25 @@ android-lifecycle-zi-test: $(ZI2C_BIN)
test: android-lifecycle-zi-test
.PHONY: raylib-graphics-test android-graphics-device-test
raylib-graphics-test: $(ZI2C_BIN)
@env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS \
ZIRAN_ROOT="$(ZIRAN_DIR)" ZIRAN_BIN="$(ZIRAN_BUILD_DIR)/bin/ziran" \
sh "$(KRYON_DIR)/tests/ziran_raylib_graphics_test.sh"
test: raylib-graphics-test
.PHONY: graphics-transition-test
graphics-transition-test: $(ZI2C_BIN)
@sh tests/graphics_transition_test.sh $(ZIRAN_BUILD_DIR)/bin
test: graphics-transition-test
# Explicit device check; never part of the CI or ordinary test target.
# Inbe's Device settings must allow System orientation for real rotation.
android-graphics-device-test:
@python3 tests/android_graphics_recovery_device.py $(ANDROID_GRAPHICS_ARGS)
.PHONY: language-selection-zi-test
language-selection-zi-test: $(ZI2C_BIN)
@env -u DISPLAY -u WAYLAND_DISPLAY \
@@ -1676,6 +1797,15 @@ assets-zi-test: $(ZI2C_BIN)
test: assets-zi-test
.PHONY: android-package-assets-test package-size-test
android-package-assets-test: $(ZI2C_BIN)
sh tests/android_package_assets_zi_test.sh $(ZIRAN_BUILD_DIR)/bin
package-size-test:
python3 tests/package_size_test.py
test: android-package-assets-test package-size-test
.PHONY: asset-files-zi-test
asset-files-zi-test: $(ZI2C_BIN) $(RAYLIB_A)
@sh tests/asset_files_zi_test.sh $(ZIRAN_BUILD_DIR)/bin $(RAYLIB_A)
@@ -1805,25 +1935,13 @@ meditation-timing-test: build-laws $(ZI2C_BIN)
test: meditation-timing-test
test: sun-salutation-test
test: sun-salutation-test sun-salutation-assets-test sun-salutation-artwork-test
.PHONY: app-clock-test
app-clock-test: $(ZI2C_BIN)
@mkdir -p $(BUILD_DIR)/app-clock-test/generated
@$(ZI2C_BIN) --no-main --root src \
--module-path $(ZIRAN_DIR)/std \
-o $(BUILD_DIR)/app-clock-test/generated \
src/app/app_clock_host.zi
@$(CC) -std=c11 -Wall -Wextra -Werror \
-Wno-unused-function -I$(ZIRAN_DIR)/include \
-iquote $(BUILD_DIR)/app-clock-test/generated \
tests/app_clock_host_test.c \
$(BUILD_DIR)/app-clock-test/generated/app/app_clock_host.c \
$(BUILD_DIR)/app-clock-test/generated/time_parts.c \
$(BUILD_DIR)/app-clock-test/generated/date_time.c \
-o $(BUILD_DIR)/app-clock-test/test
@env -u DISPLAY -u WAYLAND_DISPLAY \
$(BUILD_DIR)/app-clock-test/test
CC="$(CC)" WINDOWS_CC="$(WIN64_CC)" \
sh tests/app_clock_host_test.sh $(ZIRAN_BUILD_DIR)/bin
test: app-clock-test
@@ -1849,7 +1967,7 @@ direct-draw-plan-test: $(ZI2C_BIN)
.PHONY: elist-screen-test
test: elist-screen-test
elist-screen-test: $(ZI2C_BIN)
elist-screen-test: cells $(ZI2C_BIN) $(ZIRAN_BUILD_DIR)/libziran.a
@sh tests/elist_screen_zi_test.sh $(ZIRAN_BUILD_DIR)/bin
$(BREATH_TIMING_GEN_DIR)/core/breath_timing.c: src/core/breath_timing.zi src/core/types.zi $(ZI2C_BIN)
@@ -1877,6 +1995,12 @@ theme-catalog-bundle-check:
test: theme-catalog-bundle-check
.PHONY: site-assets-test
site-assets-test:
node tests/site_assets_test.mjs
test: site-assets-test
$(EMBEDDED_ASSETS_C): Makefile $(EMBEDDED_ASSET_FILES) scripts/embed-app-assets.py src/app/assets_host.h | $(BUILD_OBJ_DIR) theme-catalog-bundle-check
python3 scripts/embed-app-assets.py $@ $(EMBEDDED_ASSET_FILES)
@@ -1890,7 +2014,7 @@ sync-web-icons: $(KRYON_SYNC_ICONS)
sh $(KRYON_SYNC_ICONS) web-assets/icons $(WEB_SHARED_ICON_SHEETS)
cp assets/app/icon.png web-assets/icons/$(APP_NAME).png
$(CLICK_LIBOQS_A): $(LIBOQS_DIR)/CMakeLists.txt
$(CLICK_LIBOQS_A): $(LIBOQS_DIR)/CMakeLists.txt mk/sync.mk Makefile
rm -rf $(CLICK_LIBOQS_BUILD_DIR)
$(CMAKE) -S $(LIBOQS_DIR) -B $(CLICK_LIBOQS_BUILD_DIR) \
-DCMAKE_SYSTEM_NAME=Linux \
@@ -1905,7 +2029,7 @@ $(CLICK_LIBOQS_A): $(LIBOQS_DIR)/CMakeLists.txt
-DOQS_DIST_BUILD=OFF \
-DOQS_OPT_TARGET=generic \
$(KRYON_LIBOQS_CPU_FEATURE_CMAKE_FLAGS) \
-DOQS_MINIMAL_BUILD=$(KRYON_LIBOQS_MINIMAL_BUILD)
-DOQS_MINIMAL_BUILD="$(KRYON_LIBOQS_MINIMAL_BUILD)"
$(CMAKE) --build $(CLICK_LIBOQS_BUILD_DIR) --target oqs
$(SQLITE_AMALGAMATION_C) $(SQLITE_AMALGAMATION_H): $(SQLITE_DIR)/configure $(SQLITE_DIR)/manifest | $(BUILD_OBJ_DIR)
@@ -1944,7 +2068,7 @@ $(WIN64_CURL_A): $(CURL_DIR)/CMakeLists.txt
-DBUILD_TESTING=OFF
$(CMAKE) --build $(WIN64_CURL_BUILD_DIR) --target install
$(WIN64_LIBOQS_A): $(LIBOQS_DIR)/CMakeLists.txt
$(WIN64_LIBOQS_A): $(LIBOQS_DIR)/CMakeLists.txt mk/sync.mk Makefile
rm -rf $(WIN64_LIBOQS_BUILD_DIR)
$(CMAKE) -S $(LIBOQS_DIR) -B $(WIN64_LIBOQS_BUILD_DIR) \
-DCMAKE_SYSTEM_NAME=Windows \
@@ -1960,10 +2084,10 @@ $(WIN64_LIBOQS_A): $(LIBOQS_DIR)/CMakeLists.txt
-DOQS_DIST_BUILD=OFF \
-DOQS_OPT_TARGET=generic \
$(KRYON_LIBOQS_CPU_FEATURE_CMAKE_FLAGS) \
-DOQS_MINIMAL_BUILD=$(KRYON_LIBOQS_MINIMAL_BUILD)
-DOQS_MINIMAL_BUILD="$(KRYON_LIBOQS_MINIMAL_BUILD)"
$(CMAKE) --build $(WIN64_LIBOQS_BUILD_DIR) --target oqs
$(TARGET): Makefile $(SRC) $(KRYON_LIBRARY_BUILD_DIR)/libkryon.a $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(FONT_FILES) $(EMBEDDED_ASSETS_C) $(KRYON_NATIVE_BACKEND_DEPS) $(LIBOQS_A) $(CURL_PROTOCOL_CHECK) | $(NATIVE_BIN_DIR)
$(TARGET): $(ZIRAN_BUILD_DIR)/libziran.a Makefile $(SRC) $(KRYON_LIBRARY_BUILD_DIR)/libkryon.a $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(FONT_FILES) $(EMBEDDED_ASSETS_C) $(KRYON_NATIVE_BACKEND_DEPS) $(LIBOQS_A) $(CURL_PROTOCOL_CHECK) | $(NATIVE_BIN_DIR)
$(TARGET): | zi-check
$(shell mkdir -p $(NATIVE_OBJ_DIR))
$(file >$(NATIVE_OBJ_DIR)/inputs.mk,NATIVE_SOURCES := $(APP_SRCS) $(GENERATED_NATIVE_C) $(EMBEDDED_ASSETS_C) $(SQLITE_SRC))
@@ -1974,15 +2098,16 @@ $(TARGET): | zi-check
$(CC) $(KRYON_NATIVE_CFLAGS) \
-o $@ \
@$(NATIVE_OBJ_DIR)/objects.rsp \
$(KRYON_LIBRARY_BUILD_DIR)/libkryon.a \
$(KRYON_LIBRARY_BUILD_DIR)/libkryon.a $(ZIRAN_BUILD_DIR)/libziran.a \
$(KRYON_NATIVE_BACKEND_LIBS) \
$(LIBOQS_A) \
$(KRYON_NATIVE_BACKEND_LDLIBS) \
$(RUNTIME_ASSET_LDLIBS) \
$(NATIVE_SYSTEM_LDLIBS) \
$(LDFLAGS)
$(if $(filter linux,$(NATIVE_PLATFORM)),python3 scripts/check-package-size.py --assets $@,)
$(KRYON_HOST_TARGET): Makefile $(KRYON_HOST_SRC) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(FONT_FILES) $(EMBEDDED_ASSETS_C) | $(BUILD_DIR)
$(KRYON_HOST_TARGET): $(ZIRAN_BUILD_DIR)/libziran.a Makefile $(KRYON_HOST_SRC) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(FONT_FILES) $(EMBEDDED_ASSETS_C) | $(BUILD_DIR)
mkdir -p $(dir $@)
$(CC) $(CFLAGS) -fPIC -shared \
$(APP_INCLUDE) \
@@ -1995,7 +2120,7 @@ $(KRYON_HOST_TARGET): Makefile $(KRYON_HOST_SRC) $(SQLITE_SRC) $(SQLITE_AMALGAMA
-DSUPPORT_FILEFORMAT_OGG=1 \
-DSUPPORT_FILEFORMAT_MP3=0 \
-o $@ \
$(KRYON_HOST_SRC) \
$(KRYON_HOST_SRC) $(ZIRAN_BUILD_DIR)/libziran.a \
$(SQLITE_SRC) \
$(NATIVE_SYSTEM_LDLIBS) \
-Wl,-Bsymbolic \
@@ -2015,7 +2140,7 @@ $(CLICK_BIN): Makefile $(SRC) $(KRYON_CLICK_SRCS) $(SQLITE_SRC) $(SQLITE_AMALGAM
-DSUPPORT_FILEFORMAT_OGG=1 \
-DSUPPORT_FILEFORMAT_MP3=0 \
-o $@ \
$(APP_SRCS) $(GENERATED_NATIVE_C) $(EMBEDDED_ASSETS_C) \
$(APP_SRCS) $(GENERATED_NATIVE_C) $(EMBEDDED_ASSETS_C) $(CLICK_BUNDLE_RUNTIME) \
$(KRYON_CLICK_SRCS) \
$(SQLITE_SRC) \
$(CLICK_RAYLIB_A) \
@@ -2099,7 +2224,7 @@ $(WIN64_TARGET): Makefile $(WINDOWS_SRC) $(WINDOWS_GEN_STAMP) $(SQLITE_SRC) $(SQ
-DPLATFORM_DESKTOP \
-DCURL_STATICLIB \
-o $@ \
$(WINDOWS_SRC) $(GENERATED_WINDOWS_C) \
$(WINDOWS_SRC) $(GENERATED_WINDOWS_C) $(WINDOWS_BUNDLE_RUNTIME) \
$(SQLITE_SRC) \
$(WIN64_RAYLIB_A) \
$(WIN64_CURL_A) \
@@ -2301,13 +2426,13 @@ $(SNAP_TARGET): Makefile packaging/snap/snap/snapcraft.yaml | $(SNAP_BUILD_DIR)
mv "$$created" $(SNAP_TARGET)
test -f $@
$(FLATPAK_TARGET): Makefile $(FLATPAK_MANIFEST) | $(FLATPAK_BUILD_DIR) $(FLATPAK_DIST_DIR) podman-check
$(FLATPAK_TARGET): Makefile $(FLATPAK_MANIFEST) scripts/install-build-fonttools.sh | $(FLATPAK_BUILD_DIR) $(FLATPAK_DIST_DIR) podman-check
rm -f $(FLATPAK_DIST_DIR)/*.flatpak
$(PODMAN) run $(PODMAN_RUN_PLATFORM) $(PODMAN_RUN_NETWORK) --rm --privileged \
-v "$(abspath .):/work" \
-w /work \
$(FLATPAK_IMAGE) \
sh -lc 'set -eu; sh scripts/install-build-node.sh /tmp/inbe-build-node; export PATH=/tmp/inbe-build-node/bin:$$PATH; rm -rf .flatpak-builder $(FLATPAK_BUILD_DIR)/repo $(FLATPAK_BUILD_DIR)/build-dir; flatpak-builder --disable-rofiles-fuse --force-clean --repo=$(FLATPAK_BUILD_DIR)/repo $(FLATPAK_BUILD_DIR)/build-dir $(FLATPAK_MANIFEST) || { rm -rf $(FLATPAK_BUILD_DIR)/repo $(FLATPAK_BUILD_DIR)/build-dir vendor-builds/linux build/bin/linux; make vendor-prebuilds-native; make native; flatpak build-init $(FLATPAK_BUILD_DIR)/build-dir $(APP_ID) org.gnome.Sdk org.gnome.Platform 46; install -D -m755 "$$(find build/bin/linux -maxdepth 1 -type f -name '\''inbe-linux-*'\'' | head -n 1)" $(FLATPAK_BUILD_DIR)/build-dir/files/bin/inbe; install -D -m644 packaging/linux/appimage/inbe.desktop $(FLATPAK_BUILD_DIR)/build-dir/files/share/applications/$(APP_ID).desktop; sed -i '\''s/^Icon=.*/Icon=$(APP_ID)/'\'' $(FLATPAK_BUILD_DIR)/build-dir/files/share/applications/$(APP_ID).desktop; install -D -m644 packaging/linux/appimage/inbe.png $(FLATPAK_BUILD_DIR)/build-dir/files/share/icons/hicolor/512x512/apps/$(APP_ID).png; install -D -m644 packaging/linux/appimage/inbe.appdata.xml $(FLATPAK_BUILD_DIR)/build-dir/files/share/metainfo/$(APP_ID).metainfo.xml; flatpak build-finish --share=ipc --share=network --socket=fallback-x11 --socket=wayland --socket=pulseaudio --device=dri --filesystem=home $(FLATPAK_BUILD_DIR)/build-dir; flatpak build-export $(FLATPAK_BUILD_DIR)/repo $(FLATPAK_BUILD_DIR)/build-dir; }; flatpak build-bundle $(FLATPAK_BUILD_DIR)/repo $(FLATPAK_TARGET) $(APP_ID)'
sh -lc 'set -eu; sh scripts/install-build-node.sh /tmp/inbe-build-node; export PATH=/tmp/inbe-build-node/bin:$$PATH; sh scripts/install-build-fonttools.sh /tmp/inbe-build-fonttools; export PYTHONPATH=/tmp/inbe-build-fonttools; rm -rf .flatpak-builder $(FLATPAK_BUILD_DIR)/repo $(FLATPAK_BUILD_DIR)/build-dir; flatpak-builder --disable-rofiles-fuse --force-clean --repo=$(FLATPAK_BUILD_DIR)/repo $(FLATPAK_BUILD_DIR)/build-dir $(FLATPAK_MANIFEST) || { rm -rf $(FLATPAK_BUILD_DIR)/repo $(FLATPAK_BUILD_DIR)/build-dir vendor-builds/linux build/bin/linux; make vendor-prebuilds-native; make native; flatpak build-init $(FLATPAK_BUILD_DIR)/build-dir $(APP_ID) org.gnome.Sdk org.gnome.Platform 46; install -D -m755 "$$(find build/bin/linux -maxdepth 1 -type f -name '\''inbe-linux-*'\'' | head -n 1)" $(FLATPAK_BUILD_DIR)/build-dir/files/bin/inbe; install -D -m644 packaging/linux/appimage/inbe.desktop $(FLATPAK_BUILD_DIR)/build-dir/files/share/applications/$(APP_ID).desktop; sed -i '\''s/^Icon=.*/Icon=$(APP_ID)/'\'' $(FLATPAK_BUILD_DIR)/build-dir/files/share/applications/$(APP_ID).desktop; install -D -m644 packaging/linux/appimage/inbe.png $(FLATPAK_BUILD_DIR)/build-dir/files/share/icons/hicolor/512x512/apps/$(APP_ID).png; install -D -m644 packaging/linux/appimage/inbe.appdata.xml $(FLATPAK_BUILD_DIR)/build-dir/files/share/metainfo/$(APP_ID).metainfo.xml; flatpak build-finish --share=ipc --share=network --socket=fallback-x11 --socket=wayland --socket=pulseaudio --device=dri --filesystem=home $(FLATPAK_BUILD_DIR)/build-dir; flatpak build-export $(FLATPAK_BUILD_DIR)/repo $(FLATPAK_BUILD_DIR)/build-dir; }; flatpak build-bundle $(FLATPAK_BUILD_DIR)/repo $(FLATPAK_TARGET) $(APP_ID)'
test -f $@
$(WEB_JS_TARGET): Makefile $(WEB_SRC) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(FONT_FILES) $(EMBEDDED_ASSETS_C) $(WEB_GEN_STAMP) $(WEB_LIBOQS_A) $(WEB_HOST_JS) web-tools-check | $(WEB_DIST_DIR)
@@ -2321,15 +2446,14 @@ $(WEB_JS_TARGET): | zi-check
-DHAS_LIBOQS=1 \
-DPLATFORM_WEB \
-o $(WEB_JS_TARGET) \
$(WEB_SRC) $(GENERATED_WEB_C) $(SQLITE_SRC) \
$(WEB_SRC) $(GENERATED_WEB_C) $(SQLITE_SRC) $(WEB_BUNDLE_RUNTIME) \
$(foreach library,$(WEB_HOST_JS),--js-library $(library)) \
$(WEB_LIBOQS_A) \
-sASYNCIFY -sASYNCIFY_STACK_SIZE=1048576 -fexceptions \
-sFORCE_FILESYSTEM=1 -sFETCH=1 -sUSE_ZLIB=1 -lidbfs.js \
-sALLOW_MEMORY_GROWTH=1 -sINITIAL_MEMORY=268435456 -sSTACK_SIZE=33554432 \
-sEXPORTED_RUNTIME_METHODS=Asyncify,FS \
-sEXPORTED_FUNCTIONS=_main,_malloc,_free,_app_web_get_play_in_background,_app_web_set_backgrounded,_app_web_background_tick,_app_web_launch_practice,_app_web_extension_host,_app_web_extension_break_now,_app_web_extension_breaks_enabled,_app_web_extension_break_timer_enabled,_app_web_extension_break_timer_limit_s,_app_web_extension_break_timer_duration_s,_app_web_extension_break_timer_postpone_s,_app_web_extension_break_timer_max_prompts,_app_web_extension_break_timer_show_skip,_app_web_extension_break_timer_show_postpone,_app_web_extension_open_break_settings,_app_web_extension_open_habits,_app_web_test_save_onboarding_state,_app_web_test_onboarding_state,_app_web_test_show_first_run_guide,_app_web_test_first_run_guide_active,_app_web_test_first_run_guide_step,_app_web_test_first_run_guide_text_clipped,_app_web_test_first_run_guide_next_x,_app_web_test_first_run_guide_next_y,_app_web_test_first_run_guide_close_x,_app_web_test_first_run_guide_close_y,_app_web_test_first_run_guide_anchor_x,_app_web_test_first_run_guide_anchor_y,_app_web_test_first_run_guide_anchor_w,_app_web_test_first_run_guide_anchor_h,_app_web_test_sync_key_state,_app_web_test_import_sync_key,_app_web_test_habits_click_x,_app_web_test_habits_click_y,_app_web_test_show_practice_home,_app_web_test_practice_selected,_app_web_test_practice_tab,_app_web_test_complete_practice,_app_web_test_completion_stage,_app_web_test_completed_practice_persisted,_app_web_test_screen,_app_web_test_route_transition_active,_app_web_test_practice_start_click_x,_app_web_test_practice_start_click_y,_app_web_test_practice_action_click_x,_app_web_test_practice_action_click_y,_app_web_test_sun_salutation_control_x,_app_web_test_sun_salutation_control_y,_app_web_test_sun_salutation_step,_app_web_test_sun_salutation_ticks,_app_web_test_sun_salutation_paused,_app_web_test_show_appearance,_app_web_test_control_x,_app_web_test_control_y,_app_web_test_control_width,_app_web_test_control_height,_app_web_test_enable_extension_breaks \
--preload-file locales --preload-file assets
-sEXPORTED_FUNCTIONS=_main,_malloc,_free,_app_web_get_play_in_background,_app_web_set_backgrounded,_app_web_background_tick,_app_web_launch_practice,_app_web_extension_host,_app_web_extension_break_now,_app_web_extension_breaks_enabled,_app_web_extension_break_timer_enabled,_app_web_extension_break_timer_limit_s,_app_web_extension_break_timer_duration_s,_app_web_extension_break_timer_postpone_s,_app_web_extension_break_timer_max_prompts,_app_web_extension_break_timer_show_skip,_app_web_extension_break_timer_show_postpone,_app_web_extension_open_break_settings,_app_web_extension_open_habits,_app_web_test_save_onboarding_state,_app_web_test_onboarding_state,_app_web_test_show_first_run_guide,_app_web_test_first_run_guide_active,_app_web_test_first_run_guide_step,_app_web_test_first_run_guide_text_clipped,_app_web_test_first_run_guide_next_x,_app_web_test_first_run_guide_next_y,_app_web_test_first_run_guide_close_x,_app_web_test_first_run_guide_close_y,_app_web_test_first_run_guide_anchor_x,_app_web_test_first_run_guide_anchor_y,_app_web_test_first_run_guide_anchor_w,_app_web_test_first_run_guide_anchor_h,_app_web_test_sync_key_state,_app_web_test_import_sync_key,_app_web_test_habits_click_x,_app_web_test_habits_click_y,_app_web_test_show_practice_home,_app_web_test_practice_selected,_app_web_test_practice_tab,_app_web_test_complete_practice,_app_web_test_completion_stage,_app_web_test_completed_practice_persisted,_app_web_test_screen,_app_web_test_route_transition_active,_app_web_test_practice_start_click_x,_app_web_test_practice_start_click_y,_app_web_test_practice_action_click_x,_app_web_test_practice_action_click_y,_app_web_test_sun_salutation_control_x,_app_web_test_sun_salutation_control_y,_app_web_test_sun_salutation_step,_app_web_test_sun_salutation_ticks,_app_web_test_sun_salutation_paused,_app_web_test_sun_salutation_character,_app_web_test_show_appearance,_app_web_test_prepare_music,_app_web_test_music_button_x,_app_web_test_music_button_y,_app_web_test_control_x,_app_web_test_control_y,_app_web_test_control_width,_app_web_test_control_height,_app_web_test_enable_extension_breaks
$(WEB_TARGET): src/web_shell.html $(WEB_BOOT_JS) $(WEB_JS_TARGET) manifest.json $(WEB_ASSET_FILES) | $(WEB_DIST_DIR)
perl -0pe 's#\{\{\{ APP_SCRIPT \}\}\}#$(WEB_APP_SCRIPT)#g; s/WEB_CACHE_BUSTER/$(WEB_CACHE_BUSTER)/g' src/web_shell.html > $@
@@ -2359,15 +2483,14 @@ $(WEB_CANVAS_TARGET): | zi-check
-DHAS_LIBOQS=1 \
-DPLATFORM_WEB \
-o $(WEB_CANVAS_DIR)/index.js \
$(WEB_SRC) $(GENERATED_WEB_C) $(SQLITE_SRC) \
$(WEB_SRC) $(GENERATED_WEB_C) $(SQLITE_SRC) $(WEB_BUNDLE_RUNTIME) \
$(foreach library,$(WEB_HOST_JS),--js-library $(library)) \
$(WEB_LIBOQS_A) \
-sASYNCIFY -sASYNCIFY_STACK_SIZE=1048576 -fexceptions \
-sFORCE_FILESYSTEM=1 -sFETCH=1 -sUSE_ZLIB=1 -lidbfs.js \
-sALLOW_MEMORY_GROWTH=1 -sINITIAL_MEMORY=268435456 -sSTACK_SIZE=33554432 \
-sEXPORTED_RUNTIME_METHODS=Asyncify,FS \
-sEXPORTED_FUNCTIONS=_main,_malloc,_free,_app_web_get_play_in_background,_app_web_set_backgrounded,_app_web_background_tick,_app_web_launch_practice,_app_web_extension_host,_app_web_extension_break_now,_app_web_extension_breaks_enabled,_app_web_extension_break_timer_enabled,_app_web_extension_break_timer_limit_s,_app_web_extension_break_timer_duration_s,_app_web_extension_break_timer_postpone_s,_app_web_extension_break_timer_max_prompts,_app_web_extension_break_timer_show_skip,_app_web_extension_break_timer_show_postpone,_app_web_extension_open_break_settings,_app_web_extension_open_habits,_app_web_test_save_onboarding_state,_app_web_test_onboarding_state,_app_web_test_show_first_run_guide,_app_web_test_first_run_guide_active,_app_web_test_first_run_guide_step,_app_web_test_first_run_guide_text_clipped,_app_web_test_first_run_guide_next_x,_app_web_test_first_run_guide_next_y,_app_web_test_first_run_guide_close_x,_app_web_test_first_run_guide_close_y,_app_web_test_first_run_guide_anchor_x,_app_web_test_first_run_guide_anchor_y,_app_web_test_first_run_guide_anchor_w,_app_web_test_first_run_guide_anchor_h,_app_web_test_sync_key_state,_app_web_test_import_sync_key,_app_web_test_habits_click_x,_app_web_test_habits_click_y,_app_web_test_show_practice_home,_app_web_test_practice_selected,_app_web_test_practice_tab,_app_web_test_complete_practice,_app_web_test_completion_stage,_app_web_test_completed_practice_persisted,_app_web_test_screen,_app_web_test_route_transition_active,_app_web_test_practice_start_click_x,_app_web_test_practice_start_click_y,_app_web_test_practice_action_click_x,_app_web_test_practice_action_click_y,_app_web_test_sun_salutation_control_x,_app_web_test_sun_salutation_control_y,_app_web_test_sun_salutation_step,_app_web_test_sun_salutation_ticks,_app_web_test_sun_salutation_paused,_app_web_test_show_appearance,_app_web_test_control_x,_app_web_test_control_y,_app_web_test_control_width,_app_web_test_control_height,_app_web_test_enable_extension_breaks \
--preload-file locales --preload-file assets
-sEXPORTED_FUNCTIONS=_main,_malloc,_free,_app_web_get_play_in_background,_app_web_set_backgrounded,_app_web_background_tick,_app_web_launch_practice,_app_web_extension_host,_app_web_extension_break_now,_app_web_extension_breaks_enabled,_app_web_extension_break_timer_enabled,_app_web_extension_break_timer_limit_s,_app_web_extension_break_timer_duration_s,_app_web_extension_break_timer_postpone_s,_app_web_extension_break_timer_max_prompts,_app_web_extension_break_timer_show_skip,_app_web_extension_break_timer_show_postpone,_app_web_extension_open_break_settings,_app_web_extension_open_habits,_app_web_test_save_onboarding_state,_app_web_test_onboarding_state,_app_web_test_show_first_run_guide,_app_web_test_first_run_guide_active,_app_web_test_first_run_guide_step,_app_web_test_first_run_guide_text_clipped,_app_web_test_first_run_guide_next_x,_app_web_test_first_run_guide_next_y,_app_web_test_first_run_guide_close_x,_app_web_test_first_run_guide_close_y,_app_web_test_first_run_guide_anchor_x,_app_web_test_first_run_guide_anchor_y,_app_web_test_first_run_guide_anchor_w,_app_web_test_first_run_guide_anchor_h,_app_web_test_sync_key_state,_app_web_test_import_sync_key,_app_web_test_habits_click_x,_app_web_test_habits_click_y,_app_web_test_show_practice_home,_app_web_test_practice_selected,_app_web_test_practice_tab,_app_web_test_complete_practice,_app_web_test_completion_stage,_app_web_test_completed_practice_persisted,_app_web_test_screen,_app_web_test_route_transition_active,_app_web_test_practice_start_click_x,_app_web_test_practice_start_click_y,_app_web_test_practice_action_click_x,_app_web_test_practice_action_click_y,_app_web_test_sun_salutation_control_x,_app_web_test_sun_salutation_control_y,_app_web_test_sun_salutation_step,_app_web_test_sun_salutation_ticks,_app_web_test_sun_salutation_paused,_app_web_test_sun_salutation_character,_app_web_test_show_appearance,_app_web_test_prepare_music,_app_web_test_music_button_x,_app_web_test_music_button_y,_app_web_test_control_x,_app_web_test_control_y,_app_web_test_control_width,_app_web_test_control_height,_app_web_test_enable_extension_breaks
perl -0pe 's#\{\{\{ APP_SCRIPT \}\}\}#$(WEB_CANVAS_APP_SCRIPT)#g; s/WEB_CACHE_BUSTER/$(WEB_CACHE_BUSTER)/g' src/web_shell.html > $@
cp $(WEB_BOOT_JS) $(WEB_CANVAS_DIR)/index_boot.js
perl -0pi -e 's/WEB_CACHE_BUSTER/$(WEB_CACHE_BUSTER)/g' $(WEB_CANVAS_DIR)/index_boot.js
@@ -2380,7 +2503,7 @@ $(WEB_CANVAS_TARGET): | zi-check
android-copy-assets:
$(MAKE) $(FONT_FILES)
$(MAKE) $(EMBEDDED_ASSETS_C)
$(MAKE) cells
rm -rf droid/app/src/main/assets
mkdir -p droid/app/src/main/assets
@@ -2461,6 +2584,7 @@ android-copy-release-apks: | $(ANDROID_BUILD_DIR)
@found=0; \
for apk in droid/app/build/outputs/apk/release/*.apk droid/app/build/outputs/apk/gplay/*.apk; do \
if [ -f "$$apk" ]; then \
python3 scripts/check-package-size.py --assets "$$apk" || exit $$?; \
cp "$$apk" "$(ANDROID_BUILD_DIR)/$$(basename "$$apk")"; \
found=1; \
fi; \
@@ -2479,6 +2603,13 @@ android-copy-release-apks: | $(ANDROID_BUILD_DIR)
exit 1; \
fi; \
cp "$$release_universal" "$(ANDROID_BUILD_DIR)/$(APP_NAME)-$(APP_VERSION).apk"; \
for abi in arm64-v8a armeabi-v7a x86 x86_64; do \
for apk in droid/app/build/outputs/apk/release/app-$$abi-release*.apk; do \
if [ -f "$$apk" ]; then \
cp "$$apk" "$(ANDROID_BUILD_DIR)/$(APP_NAME)-$(APP_VERSION)-$$abi.apk"; \
fi; \
done; \
done; \
gplay_universal="$$(find droid/app/build/outputs/apk -path '*/gplay/*' -name "app-universal-gplay*.apk" | head -n 1)"; \
if [ -z "$$gplay_universal" ] || [ ! -f "$$gplay_universal" ]; then \
echo "No gplay universal release APK was produced"; \
@@ -2547,7 +2678,13 @@ android-avd:
android-smoke:
@mkdir -p build/android
sh scripts/android-smoke-test.sh "$(ANDROID_SDK)" "$(ANDROID_APP_ID)" "$(ANDROID_ACTIVITY)"
sh scripts/android-smoke-test.sh "$(ANDROID_SDK)" "$(ANDROID_DEBUG_APP_ID)" "$(ANDROID_ACTIVITY)"
.PHONY: android-smoke-script-test
android-smoke-script-test:
python3 tests/android_smoke_script_test.py
test: android-smoke-script-test
android-audio-e2e:
bash scripts/android-audio-e2e.sh
@@ -2797,3 +2934,151 @@ android-release android-bundle android-copy-release-apks android-copy-bundle win
# Actual artifacts are gated too, including direct and incremental builds.
$(TARGET) $(KRYON_HOST_TARGET) $(WIN64_TARGET) $(WEB_JS_TARGET) $(WEB_CANVAS_TARGET): $(SYNC_RETRY_SOURCE) | build-laws
BUNDLE_RUNTIME_INPUTS := $(wildcard $(ZIRAN_DIR)/cmd/zir/*.[ch]) $(ZIRAN_DIR)/Makefile scripts/build-bundle-runtime.py
WEB_BUNDLE_RUNTIME := $(abspath $(BUILD_DIR)/bundle-runtime/web/libziran.a)
WINDOWS_BUNDLE_RUNTIME := $(abspath $(BUILD_DIR)/bundle-runtime/windows/libziran.a)
CLICK_BUNDLE_RUNTIME := $(abspath $(BUILD_DIR)/bundle-runtime/click/libziran.a)
$(WEB_BUNDLE_RUNTIME): $(BUNDLE_RUNTIME_INPUTS)
python3 scripts/build-bundle-runtime.py --source $(ZIRAN_DIR) --output $(dir $@) --cc '$(WEB_CC)' --ar '$(WEB_AR)' --objcopy true --flags='-O2' --wasm
$(WINDOWS_BUNDLE_RUNTIME): $(BUNDLE_RUNTIME_INPUTS)
python3 scripts/build-bundle-runtime.py --source $(ZIRAN_DIR) --output $(dir $@) --cc '$(WIN64_CC)' --ar '$(WIN64_AR)' --objcopy x86_64-w64-mingw32-objcopy
$(CLICK_BUNDLE_RUNTIME): $(BUNDLE_RUNTIME_INPUTS)
python3 scripts/build-bundle-runtime.py --source $(ZIRAN_DIR) --output $(dir $@) --cc '$(AARCH64_CC)' --ar '$(AARCH64_AR)' --objcopy aarch64-linux-gnu-objcopy
$(WIN64_TARGET): $(WINDOWS_BUNDLE_RUNTIME)
$(WEB_JS_TARGET) $(WEB_CANVAS_TARGET): $(WEB_BUNDLE_RUNTIME)
$(CLICK_BIN): $(CLICK_BUNDLE_RUNTIME)
.PHONY: cells-test
cells-test: cells $(ZIRAN_BUILD_DIR)/libziran.a $(LIBOQS_A)
sh tests/cells_zi_test.sh $(ZIRAN_BIN) $(LIBOQS_A)
.PHONY: cells-navigation-test
cells-navigation-test: $(TARGET)
sh tests/cells_navigation_test.sh $(abspath $(TARGET))
.PHONY: host-actions-test
host-actions-test: $(TARGET)
env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS YUE_DESKTOP_RECOVERY=0 python3 tests/host_actions_test.py $(abspath $(TARGET))
.PHONY: cells-artifact-test
cells-artifact-test: $(TARGET) $(CELL_BUNDLES)
python3 tests/cells_artifact_test.py $(abspath $(TARGET))
.PHONY: cells-onboarding-test
cells-onboarding-test: $(TARGET)
sh tests/cells_onboarding_test.sh $(abspath $(TARGET))
.PHONY: locale-render-ui-test
locale-render-ui-test: $(TARGET) $(INBE_BUNDLE)
sh tests/locale_render_ui_test.sh $(abspath $(TARGET))
.PHONY: cells-platform-test cells-android-probe
cells-platform-test: cells $(ZIRAN_BUILD_DIR)/libziran.a
sh tests/cells_platform_test.sh $(ZIRAN_BIN) native
cells-android-probe: cells
sh tests/cells_platform_test.sh $(ZIRAN_BIN) android
.PHONY: sync-review-ui-test
sync-review-ui-test: $(TARGET)
@sh tests/sync_review_ui_test.sh $(TARGET)
.PHONY: app-click-block-zi-test data-back-ui-test
app-click-block-zi-test: $(ZI2C_BIN)
@sh tests/app_click_block_zi_test.sh $(ZIRAN_BUILD_DIR)/bin
data-back-ui-test: $(TARGET)
@sh tests/data_back_ui_test.sh $(abspath $(TARGET))
test: app-click-block-zi-test
.PHONY: package-release-test
package-release-test: cells $(ZIRAN_BUILD_DIR)/libziran.a
python3 tests/package_release_test.py
test: package-release-test
.PHONY: app-preferences-sync-test
app-preferences-sync-test:
python3 tests/app_preferences_sync_test.py
test: app-preferences-sync-test
.PHONY: cells-diary-test
cells-diary-test: $(TARGET)
sh tests/cells_diary_test.sh $(abspath $(TARGET))
.PHONY: package-version-test
package-version-test:
python3 scripts/check-package-versions.py
python3 tests/package_versions_test.py
test: package-version-test
.PHONY: package-workflow-test
package-workflow-test:
python3 tests/package_workflow_test.py
test: package-workflow-test
.PHONY: package-manifest-test
package-manifest-test:
python3 tests/package_manifests_test.py
test: package-manifest-test
.PHONY: package-upload-test
package-upload-test:
python3 tests/package_upload_test.py
test: package-upload-test
.PHONY: device-key-test device-key-wasm-test
device-key-test: $(ZI2C_BIN)
python3 tests/device_key_zi_test.py $(ZI2C_BIN)
device-key-wasm-test: $(ZI2C_BIN)
python3 tests/device_key_zi_test.py $(ZI2C_BIN) --wasm --emcc $(WEB_CC)
test: device-key-test
web-smoke-test web-canvas-smoke-test: device-key-wasm-test
.PHONY: telegram-authorization-test telegram-bridge-test telegram-host-test telegram-entry-protocol-test telegram-account-flow-test telegram-account-ui-test settings-telegram-ui-test lumi-authorization-test delegate-account-test delegate-secret-cleanup-test storage-delegate-test lumi-delegate-scope-test
telegram-bridge-test:
@sh tests/telegram_bridge_test.sh
telegram-host-test:
@sh tests/telegram_host_test.sh
telegram-entry-protocol-test: $(ZIRAN_BIN) $(LIBOQS_A)
@sh tests/telegram_entry_protocol_zi_test.sh $(ZIRAN_BIN) $(LIBOQS_A)
telegram-account-flow-test: $(ZIRAN_BIN) $(LIBOQS_A)
@sh tests/telegram_account_flow_zi_test.sh $(ZIRAN_BIN) $(LIBOQS_A)
telegram-account-ui-test: $(ZIRAN_BIN)
@sh tests/telegram_account_ui_zi_test.sh $(ZIRAN_BUILD_DIR)/bin
settings-telegram-ui-test: $(ZIRAN_BIN) $(LIBOQS_A)
@sh tests/settings_telegram_ui_zi_test.sh $(ZIRAN_BUILD_DIR)/bin $(LIBOQS_A)
lumi-authorization-test: $(ZIRAN_BIN) $(LIBOQS_A)
@sh tests/lumi_authorization_zi_test.sh $(ZIRAN_BIN) $(LIBOQS_A)
delegate-account-test: $(ZIRAN_BIN) $(LIBOQS_A)
@sh tests/delegate_account_zi_test.sh $(ZIRAN_BIN) $(LIBOQS_A)
delegate-secret-cleanup-test: $(ZIRAN_BIN) $(LIBOQS_A)
@sh tests/delegate_secret_cleanup_zi_test.sh $(ZIRAN_BIN) $(LIBOQS_A)
storage-delegate-test: $(ZIRAN_BIN) $(LIBOQS_A)
@sh tests/storage_delegate_zi_test.sh $(ZIRAN_BIN) $(LIBOQS_A)
lumi-delegate-scope-test: $(ZIRAN_BIN) $(LIBOQS_A)
@sh tests/lumi_delegate_scope_zi_test.sh $(ZIRAN_BIN) $(LIBOQS_A)
telegram-authorization-test: telegram-bridge-test telegram-host-test telegram-entry-protocol-test telegram-account-flow-test telegram-account-ui-test settings-telegram-ui-test lumi-authorization-test delegate-account-test delegate-secret-cleanup-test storage-delegate-test lumi-delegate-scope-test
test: telegram-authorization-test
+4
View File
@@ -19,6 +19,7 @@ optionally sync user-owned data through a Daochi-compatible sync server.
## Features
- Lumi, a local firefly companion with private chat, habit completion, practice starts, and optional todo tools
- Guided practice sessions with visual and audio cues
- Mind, Yoga, and Fitness organization for different practice routines
- Customizable breathing sessions, meditation timers, and habit counters
@@ -83,6 +84,9 @@ make sync-server-test DAOCHI_BIN=/absolute/path/to/daochi
This uses disposable client databases and a loopback server; see
[web and sync test coverage](WEB_RENDERER_TESTS.md) for details.
The Apps picker, independent ZIB packages, update settings, account choices and
publisher setup are described in [app packages](docs/cells.md).
Native binaries are written to `build/bin/<platform>/`. Release artifacts are
written under `build/dist/`.
+78
View File
@@ -0,0 +1,78 @@
# Inner Breeze TODO
Marketing plan from 2026-10-02. Tick items off as they land and add a date or
link where it helps. Inner Breeze's edge: free, no ads, no account, offline,
open source, against breathing apps that charge $60–100 a year. It is also
visual (painted practice art, the Sun Salutation characters), so put effort
where those two things matter.
## Store listing
- [x] Rewrite the Play/F-Droid short and full descriptions around what people
search for (Wim Hof breathing, box and 4-7-8 breathing, Sun Salutation,
meditation timer, habit tracker, no ads, no account) in en-US, de-DE,
es-ES, fr-FR and pt-BR. (2026-10-02)
- [x] Regenerate the store screenshots from the current app at real phone and
tablet scale: painted practice cards, a Sun Salutation pose and showcase
habits (`make screenshot`). (2026-10-02)
- [ ] Publish the new text and screenshots on Google Play. F-Droid reads them
from this repo at the next release. `scripts/upload-play-screenshots.py`
uploads images only; the text goes in through Play Console.
- [ ] Make a new 1024x500 feature graphic in the painted style. The current
one is the old pixel art.
- [ ] Add a one-line caption to each store screenshot ("Wim Hof-style
rounds", "Follow the Sun Salutation").
- [ ] Keep "Wim Hof" out of the app title and icon. Wim Hof Method is a
registered trademark; a description that says "based on the Wim Hof
Method" is fine.
- [ ] Fix the Portuguese app string "Saudacao ao sol" to "Saudação ao sol".
- [ ] Give each channel its own tagged Play link, for example
`https://play.google.com/store/apps/details?id=xyz.waozi.inbe&referrer=utm_source%3Dreddit`,
and check Play Console's acquisition report every month.
## Short vertical video (best reach for new users)
- [ ] Record 30–60 second "breathe with me" sessions: a Wim Hof round, box
breathing, a Sun Salutation sequence.
- [ ] Post them on YouTube Shorts, TikTok and Instagram Reels. Reels can be
posted by hand from the phone; the Meta API hold only blocks automation.
- [ ] Finish Social's YouTube path: approval in Telegram and a background
upload worker (yuebot `plugins/social`).
- [ ] Optional: Pinterest pins for Sun Salutation and breathing technique
guides, which keep bringing traffic for a long time.
## Reddit
Read each subreddit's self-promotion rules first. Post as the developer, show
the app, and stay to answer comments.
- [ ] For users: r/WimHofMethod, r/breathwork, r/Meditation, r/yoga
- [ ] For the free/open-source angle: r/androidapps, r/fossdroid,
r/opensource, r/degoogle, r/linux
## Website (inbe.waozi.xyz)
- [ ] One page per technique with the `?mini` embed, so visitors practise on
the page: box breathing timer, 4-7-8 breathing, Wim Hof-style breathing,
Sun Salutation steps, meditation timer.
- [ ] Put the Play and F-Droid links under each embed.
## Directories and launches (one-time)
- [ ] AlternativeTo: list Inner Breeze as an alternative to Calm, Headspace,
Breathwrk and Prana Breath.
- [ ] Flathub: check whether `packaging/flatpak/xyz.waozi.inbe.yml` is
published, and submit it if not.
- [ ] Open-source app lists (awesome lists, F-Droid collections).
- [ ] Product Hunt launch.
- [ ] One Show HN about how it is built: the whole app in Ziran and Kryon,
running on Android, web, Linux and Windows. This brings developers and
GitHub stars, not meditators, so do it once.
## Channels to keep small
- Facebook and Threads Pages: the Meta API is on hold (no business
verification). Social is moving Facebook to the ThinkPad's signed-in
Chromium instead.
- X: the audience is mostly developers; keep it for Ziran and Kryon.
- Telegram @lotusinbe: keeps current users engaged but does not find new ones.
+18
View File
@@ -0,0 +1,18 @@
# Changelog
## [1.1.2] - 2026-10-07
- Keep app labels and content visible after updating Inner Breeze.
## [1.1.1] - 2026-10-06
- Use Cells consistently in the cell and its independently delivered package.
## [1.1.0] - 2026-10-06
- The journal editor and calendar can update independently through the Diary package.
- Attach and browse photos in daily entries, including photos imported from Harmony. Removing an attachment preserves its original private file.
## [1.0.0] - 2026-10-06
- First independently versioned Diary module.
+506
View File
@@ -0,0 +1,506 @@
// Date arithmetic and per-day documents moved from Harmony's original Diary.
// File effects belong to the host; this bundle has no OS or database access.
#import "json_scan"
#import, file "diary_view.zi";
#import "text"
#import "vec"
#import "byte_text_linux"
#import, file "../../src/cells/diary_types.zi";
#import, file "../../src/cells/module_types.zi";
#import, file "../../src/core/types.zi";
host_api :: #system_library "host_api";
ReadDiaryHost :: () -> DiaryMessage #foreign host_api;
WriteDiaryHost :: (message: DiaryMessage) #foreign host_api;
ReadDiaryFileHost :: (name: string) -> DiaryFileResult #foreign host_api;
SaveDiaryFileHost :: (name: string, data: string) -> bool #foreign host_api;
DiaryClockHost :: () -> string #foreign host_api;
Date :: struct {
year: s32;
month: s32;
day: s32;
}
Leap :: (year: s32) -> bool {
return year % 4 == 0 && (year % 100 != 0 || year % 400 == 0)
}
Days :: (year: s32, month: s32) -> s32 {
lengths: [12]s32 = .[31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
if month < 1 || month > 12 {
return 0
}
if month == 2 && Leap(year) {
return 29
}
return lengths[month - 1]
}
Valid :: (date: Date) -> bool {
return date.year >= 1 && date.year <= 9999 && date.month >= 1 &&
date.month <= 12 && date.day >= 1 && date.day <= Days(date.year, date.month)
}
Next :: (date: Date, delta: s32) -> Date {
value := date
if delta > 0 {
value.day += 1
if value.day > Days(value.year, value.month) {
value.day = 1
value.month += 1
if value.month > 12 {
value.month = 1;
value.year += 1
}
}
}
if delta < 0 {
value.day -= 1
if value.day < 1 {
value.month -= 1
if value.month < 1 {
value.month = 12;
value.year -= 1
}
value.day = Days(value.year, value.month)
}
}
return ifx Valid(value) then value else date
}
Weekday :: (date: Date) -> s32 {
year := date.year
if date.month < 3 {
year -= 1
}
offsets: [12]s32 = .[0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4]
return (year + year / 4 - year / 100 + year / 400 +
offsets[date.month - 1] + date.day + 6) % 7
}
ISO :: (date: Date) -> string {
bytes: [10]u8
values: [3]s32 = .[date.year, date.month, date.day]
starts: [3]s32 = .[0, 5, 8]
lengths: [3]s32 = .[4, 2, 2]
bytes[4] = cast(u8)45
bytes[7] = cast(u8)45
for index: cast(s32)0..cast(s32)2 {
number := values[index]
for digit: cast(s32)0..lengths[index] - 1 {
bytes[starts[index] + lengths[index] - digit - 1] = cast(u8)(48 + number % 10)
number /= 10
}
}
out: Vec(u8)
BuilderPrint(*out, "%", TextFromBytes(bytes[:]))
return BuilderFinish(out)
}
ParseDate :: (value: string) -> Date {
date: Date
if value.count != 10 || value[4] != cast(u8)45 || value[7] != cast(u8)45 {
return date
}
for index: cast(s32)0..cast(s32)9 {
if index == 4 || index == 7 {
continue
}
if value[index] < cast(u8)48 || value[index] > cast(u8)57 {
return Date.{}
}
number := cast(s32)value[index] - 48
if index < 4 {
date.year = date.year * 10 + number
}
else if index < 7 {
date.month = date.month * 10 + number
}
else {
date.day = date.day * 10 + number
}
}
return ifx Valid(date) then date else Date.{}
}
Today :: () -> Date {
clock := DiaryClockHost()
if clock.count < 10 {
return Date.{}
}
return ParseDate(clock[:10])
}
Filename :: (date: Date) -> string {
out: Vec(u8)
BuilderPrint(*out, "%.json", ISO(date))
return BuilderFinish(out)
}
Decode :: (value: string, at: s32) -> string {
bytes: Vec(u8)
for index: 0..value.count {
if !VecPush(bytes, cast(u8)0) {
VecFree(bytes);
return ""
}
}
count := ReadStringText(value, at, VecSlice(bytes, 0, bytes.count))
if count < 0 {
VecFree(bytes);
return ""
}
out: Vec(u8)
BuilderPrint(*out, "%", TextFromBytes(VecSlice(bytes, 0, count)))
VecFree(bytes)
return BuilderFinish(out)
}
Json :: (out: *Vec(u8), value: string) {
BuilderPrint(out, "\"")
for index: 0..value.count - 1 {
byte := value[index]
if byte == cast(u8)34 {
BuilderPrint(out, "\\\"")
}
else if byte == cast(u8)92 {
BuilderPrint(out, "\\\\")
}
else if byte == cast(u8)10 {
BuilderPrint(out, "\\n")
}
else if byte == cast(u8)13 {
BuilderPrint(out, "\\r")
}
else if byte == cast(u8)9 {
BuilderPrint(out, "\\t")
}
else if byte < cast(u8)32 {
BuilderPrint(out, " ")
}
else {
BuilderPrint(out, "%", value[index:index + 1])
}
}
BuilderPrint(out, "\"")
}
Document :: (message: DiaryMessage) -> string {
out: Vec(u8)
BuilderPrint(*out, "{\"version\":1,\"date\":")
Json(*out, ISO(Date.{message.year, message.month, message.day}))
BuilderPrint(*out, ",\"text\":")
Json(*out, message.text)
BuilderPrint(*out, ",\"photos\":")
photos := FieldAt(message.document, 0, "photos")
if photos >= 0 && ArrayCount(message.document, photos) >= 0 {
end := ValueEnd(message.document, photos, 0)
BuilderPrint(*out, "%", message.document[photos:end])
} else {
BuilderPrint(*out, "[]")
}
BuilderPrint(*out, "}")
return BuilderFinish(out)
}
SafePhoto :: (file: string) -> bool {
if file.count == 0 || file.count > 200 || file == "." || file == ".." {
return false
}
for byte: file {
if !((byte >= cast(u8)48 && byte <= cast(u8)57) ||
(byte >= cast(u8)97 && byte <= cast(u8)122) ||
byte == cast(u8)45 || byte == cast(u8)46) {
return false
}
}
return true
}
PhotoSelection :: (message: DiaryMessage) -> DiaryMessage {
rows := FieldAt(message.document, 0, "photos")
message.photo_count = ArrayCount(message.document, rows)
if message.photo_count < 0 {
message.photo_count = 0
}
message.photo_file = ""
message.photo_name = ""
if message.photo_count == 0 {
message.photo_index = 0
return message
}
if message.photo_index < 0 || message.photo_index >= message.photo_count {
message.photo_index = 0
}
row := ElementAt(message.document, rows, message.photo_index)
message.photo_file = Decode(message.document, FieldAt(message.document, row, "file"))
message.photo_name = Decode(message.document, FieldAt(message.document, row, "name"))
return message
}
PhotoChange :: (message: DiaryMessage, remove: bool) -> DiaryMessage {
if message.load_error || (!remove && !SafePhoto(message.attachment_file)) {
message.succeeded = false
return message
}
rows := FieldAt(message.document, 0, "photos")
count := ArrayCount(message.document, rows)
out: Vec(u8)
BuilderPrint(*out, "{\"photos\":[")
written: s32 = 0
for index: cast(s32)0..count - 1 {
if remove && index == message.photo_index {
continue
}
row := ElementAt(message.document, rows, index)
end := ValueEnd(message.document, row, 0)
if written > 0 { BuilderPrint(*out, ",") }
BuilderPrint(*out, "%", message.document[row:end])
written += 1
}
if !remove {
if written > 0 { BuilderPrint(*out, ",") }
BuilderPrint(*out, "{\"file\":")
Json(*out, message.attachment_file)
BuilderPrint(*out, ",\"name\":")
Json(*out, message.attachment_name)
BuilderPrint(*out, "}")
message.photo_index = written
}
BuilderPrint(*out, "]}")
previous := message
message.document = BuilderFinish(out)
message.saved = false
message = Save(message)
if !message.saved {
previous.succeeded = false
return previous
}
// Removing a reference keeps its private original bytes. A damaged entry
// or another imported document can still refer to that same photo.
return PhotoSelection(message)
}
Load :: (message: DiaryMessage, date: Date) -> DiaryMessage {
if !Valid(date) {
message.succeeded = false;
return message
}
loaded := ReadDiaryFileHost(Filename(date))
message.year = date.year
message.month = date.month
message.day = date.day
message.text = ""
message.document = loaded.data
message.photo_index = 0
message.photo_count = 0
message.photo_file = ""
message.photo_name = ""
message.cursor = 0
message.anchor = 0
message.load_error = !loaded.succeeded
message.saved = true
if loaded.missing {
message.load_error = false;
return message
}
version := ReadNumber(loaded.data, FieldAt(loaded.data, 0, "version"))
day := Decode(loaded.data, FieldAt(loaded.data, 0, "date"))
text := FieldAt(loaded.data, 0, "text")
if !version.valid || version.value != 1.0 || day != ISO(date) || text < 0 ||
loaded.data[text] != cast(u8)34 ||
ArrayCount(loaded.data, FieldAt(loaded.data, 0, "photos")) < 0 ||
Space(loaded.data, ValueEnd(loaded.data, 0, 0)) != loaded.data.count {
message.load_error = true
return message
}
rows := FieldAt(loaded.data, 0, "photos")
for index: cast(s32)0..ArrayCount(loaded.data, rows) - 1 {
row := ElementAt(loaded.data, rows, index)
file := Decode(loaded.data, FieldAt(loaded.data, row, "file"))
label := FieldAt(loaded.data, row, "name")
if !SafePhoto(file) || label < 0 || loaded.data[label] != cast(u8)34 {
message.load_error = true
return message
}
}
message.text = Decode(loaded.data, text)
return PhotoSelection(message)
}
Save :: (message: DiaryMessage) -> DiaryMessage {
if message.load_error {
message.succeeded = false;
return message
}
if message.saved {
return message
}
message.document = Document(message)
message.saved = SaveDiaryFileHost(Filename(Date.{message.year, message.month, message.day}),
message.document)
message.succeeded = message.saved
return message
}
Apply :: (message: DiaryMessage) -> DiaryMessage {
message.succeeded = true
if message.action == DIARY_ROUTE {
message.succeeded = message.screen == ScreenDiary
return message
}
if message.action == DIARY_LOAD {
date := Date.{message.year, message.month, message.day}
if !Valid(date) {
date = Today()
}
return Load(message, date)
}
if message.action == DIARY_SAVE {
return Save(message)
}
if message.action == DIARY_ATTACH {
return PhotoChange(message, false)
}
if message.action == DIARY_EDIT {
if message.load_error || message.edit_start < 0 ||
message.edit_end < message.edit_start || message.edit_end > message.text.count {
message.succeeded = false
return message
}
out: Vec(u8)
BuilderPrint(*out, "%", message.text[0:message.edit_start])
BuilderPrint(*out, "%", message.replacement)
BuilderPrint(*out, "%", message.text[message.edit_end:message.text.count])
message.text = BuilderFinish(out)
message.cursor = message.edit_start + cast(s32)message.replacement.count
message.anchor = message.cursor
message.saved = false
return message
}
if message.action != DIARY_CONTROL {
message.succeeded = false;
return message
}
if message.control == 29008 || message.control == 29009 {
if message.photo_count > 0 {
message.photo_index = (message.photo_index + message.photo_count +
(ifx message.control == 29008 then -1 else 1)) % message.photo_count
}
return PhotoSelection(message)
}
if message.control == 29010 {
if message.photo_count > 0 {
return PhotoChange(message, true)
}
return message
}
if message.control == 29013 {
clock := DiaryClockHost()
if message.load_error || message.calendar || clock.count < 16 {
message.succeeded = false
return message
}
stamp: Vec(u8)
BuilderPrint(*stamp, "**%**", clock[11:16])
message.replacement = BuilderFinish(stamp)
message.edit_start = ifx message.cursor < message.anchor then message.cursor else message.anchor
message.edit_end = ifx message.cursor > message.anchor then message.cursor else message.anchor
message.action = DIARY_EDIT
return Apply(message)
}
if message.control == 29003 {
message.calendar = !message.calendar
message.month_year = message.year
message.month_number = message.month
} else if message.control == 29011 || message.control == 29012 {
previous_year := message.month_year
previous_month := message.month_number
message.month_number += ifx message.control == 29011 then -1 else 1
if message.month_number < 1 {
message.month_number = 12;
message.month_year -= 1
}
if message.month_number > 12 {
message.month_number = 1;
message.month_year += 1
}
if message.month_year < 1 || message.month_year > 9999 {
message.month_year = previous_year
message.month_number = previous_month
message.succeeded = false;
return message
}
} else {
before := message
message = Save(message)
if !message.saved && !message.load_error {
return message
}
date := Date.{before.year, before.month, before.day}
if message.control == 29001 {
date = Next(date, -1)
}
else if message.control == 29002 {
date = Next(date, 1)
}
else if message.control == 29004 {
date = Today()
}
else if message.control >= 29101 && message.control <= 29131 {
date = Date.{message.month_year, message.month_number, message.control - 29100}
} else {
message.succeeded = false;
return message
}
message = Load(message, date)
message.calendar = false
}
if message.calendar {
if !Valid(Date.{message.month_year, message.month_number, 1}) {
message.succeeded = false
message.calendar = false
return message
}
message.month_days = Days(message.month_year, message.month_number)
message.month_weekday = Weekday(Date.{message.month_year, message.month_number, 1})
for day: cast(s32)0..cast(s32)31 {
message.marks[day] = cast(u8)0
}
for day: cast(s32)1..Days(message.month_year, message.month_number) {
file := ReadDiaryFileHost(Filename(Date.{message.month_year, message.month_number, day}))
text := FieldAt(file.data, 0, "text")
has_text := text >= 0 && text + 1 < file.data.count && file.data[text + 1] != cast(u8)34
message.marks[day] = ifx has_text ||
ArrayCount(file.data, FieldAt(file.data, 0, "photos")) > 0 then cast(u8)1 else cast(u8)0
}
}
return message
}
#program_export "DiaryMain"
Main :: () -> s32 {
message := ReadDiaryHost()
if message.abi != MODULE_ABI {
return -1
}
if message.action == MODULE_IDENTIFY {
return MODULE_DIARY
}
if message.action == DIARY_FRAME {
message.succeeded = true
message = DiaryView(message, DiaryObserve())
if message.action != DIARY_FRAME {
message = Apply(message)
}
// A quiet editor saves after its typing delay; file errors stay visible.
if !message.saved && DiarySaveDue() {
message = Save(message)
}
WriteDiaryHost(message)
} else {
WriteDiaryHost(Apply(message))
}
return 0
}
+222
View File
@@ -0,0 +1,222 @@
#import "geometry"
#import "image_props"
#import "image_widget"
#import "layout"
#import "text_props"
#import "text_widget"
#import "text_input_props"
#import "text_area_widget"
#import "button_props"
#import "button_widget"
#import "control_props"
#import "text"
#import "vec"
#import "byte_text_linux"
#import "scroll_props"
#import "scroll_widget"
#import "tree"
#import, file "../../src/cells/diary_types.zi";
#import, file "../../src/cells/diary_ui_types.zi";
using ImageFit;
using ButtonTone;
using ButtonEmphasis;
host_api :: #system_library "host_api";
ReadDiaryUiHost :: () -> DiaryUiFrame #foreign host_api;
WriteDiaryUiHost :: (frame: DiaryUiFrame) #foreign host_api;
DiaryLocaleHost :: (key: string) -> string #foreign host_api;
state: DiaryMessage;
frame: DiaryUiFrame;
pending: bool;
DiaryObserve :: () -> DiaryUiFrame {
return ReadDiaryUiHost()
}
DiarySaveDue :: () -> bool {
return frame.now >= frame.save_at
}
DateTitle :: (year: s32, month: s32, day: s32) -> string {
bytes: [10]u8
numbers: [3]s32 = .[year, month, day]
positions: [3]s32 = .[0, 5, 8]
lengths: [3]s32 = .[4, 2, 2]
bytes[4] = cast(u8)45
bytes[7] = cast(u8)45
for index: cast(s32)0..cast(s32)2 {
number := numbers[index]
for digit: cast(s32)0..lengths[index] - 1 {
bytes[positions[index] + lengths[index] - digit - 1] = cast(u8)(48 + number % 10)
number /= 10
}
}
title: Vec(u8)
BuilderPrint(*title, "%", TextFromBytes(bytes[:ifx day == 0 then 7 else 10]))
return BuilderFinish(title)
}
Scale :: (value: s32) -> s32 {
return cast(s32)(cast(float32)value * frame.scale)
}
FinishView :: () -> DiaryMessage {
WriteDiaryUiHost(frame)
return state
}
DiaryAction :: ( id: s32, label: string, bounds: Rectangle) {
if Button(frame.session, ButtonProps.{.id = id, .bounds = bounds,
.label = label, .tone = cast(ButtonTone)ButtonToneNeutral,
.emphasis = cast(ButtonEmphasis)ButtonEmphasisSoft}) != 0 {
if id == 29005 {
frame.photo_requested = true
frame.focused = false
return
}
state.action = DIARY_CONTROL
state.control = id
pending = true
frame.scroll = 0
frame.focused = false
}
}
DiaryView :: (message: DiaryMessage, observed: DiaryUiFrame) -> DiaryMessage {
state = message
frame = observed
column := CenteredColumnFor(frame.width, Scale(640), Scale(16))
left := cast(float32)column.x
width := cast(float32)column.width
Text(frame.session, TextProps.{.bounds = Rectangle.{left, cast(float32)Scale(24),
width, cast(float32)Scale(40)}, .text = DateTitle(state.year, state.month, state.day), .font = frame.font})
part := (width - cast(float32)Scale(12)) / 3.0
compact := frame.height < Scale(480)
top := cast(float32)(ifx compact then Scale(44) else Scale(76))
DiaryAction(29001, "‹", Rectangle.{left, top, part, cast(float32)Scale(44)})
DiaryAction(29004, DiaryLocaleHost("diary_today"), Rectangle.{left + part + cast(float32)Scale(6),
top, part, cast(float32)Scale(44)})
DiaryAction(29002, "›", Rectangle.{left + 2.0 * (part + cast(float32)Scale(6)),
top, part, cast(float32)Scale(44)})
DiaryAction(29003, DiaryLocaleHost("tab_diary_calendar"),
Rectangle.{left, top + cast(float32)Scale(52), width, cast(float32)Scale(44)})
if state.calendar {
scroll := Scroll(frame.session, ScrollProps.{.key = cast(u64)290300,
.bounds = Rectangle.{left, top + cast(float32)Scale(104), width,
cast(float32)(frame.height - frame.bottom - Scale(200))},
.content_height = Scale(344), .scroll_offset = frame.calendar_scroll})
frame.calendar_scroll = scroll.scroll_offset
if !scroll.opened {
return FinishView()
}
origin := scroll.content.y
DiaryAction(29011, "‹", Rectangle.{left, origin, part, cast(float32)Scale(44)})
DiaryAction(29012, "›", Rectangle.{left + 2.0 * (part + cast(float32)Scale(6)),
origin, part, cast(float32)Scale(44)})
Text(frame.session, TextProps.{.bounds = Rectangle.{left + part,
origin + cast(float32)Scale(8), part, cast(float32)Scale(32)},
.text = DateTitle(state.month_year, state.month_number, 0), .font = frame.font})
weekdays: [7]string = .["habit_day_mon", "habit_day_tue", "habit_day_wed", "habit_day_thu",
"habit_day_fri", "habit_day_sat", "habit_day_sun"]
for day: cast(s32)0..cast(s32)6 {
Text(frame.session, TextProps.{.bounds = Rectangle.{left + cast(float32)day * width / 7.0,
origin + cast(float32)Scale(52), width / 7.0, cast(float32)Scale(24)},
.text = DiaryLocaleHost(weekdays[day]), .font = frame.font})
}
for day: cast(s32)1..state.month_days {
position := state.month_weekday + day - 1
label: Vec(u8)
BuilderPrint(*label, "%", day)
if state.marks[day] != cast(u8)0 { BuilderPrint(*label, " •") }
day_title := BuilderFinish(label)
cell := width / 7.0
DiaryAction(29100 + day, day_title,
Rectangle.{left + cast(float32)(position % 7) * cell,
origin + cast(float32)Scale(80 + (position / 7) * 44), cell - 2.0,
cast(float32)Scale(42)})
}
End(frame.session)
return FinishView()
}
editor_height := frame.height - frame.bottom - cast(s32)top - Scale(236)
if editor_height < Scale(120) {
editor_height = Scale(120)
}
page := Scroll(frame.session, ScrollProps.{.key = cast(u64)290301,
.bounds = Rectangle.{left, top + cast(float32)Scale(104), width,
cast(float32)(frame.height - frame.bottom - cast(s32)top - Scale(120))},
.content_height = editor_height + Scale(104) +
(ifx state.photo_count > 0 then Scale(380) else 0), .scroll_offset = frame.page_scroll})
frame.page_scroll = page.scroll_offset
if !page.opened {
return FinishView()
}
DiaryAction(29013, DiaryLocaleHost("diary_insert_time"),
Rectangle.{left, page.content.y, (width - cast(float32)Scale(8)) / 2.0, cast(float32)Scale(44)})
DiaryAction(29005, DiaryLocaleHost("diary_attach_photo"),
Rectangle.{left + (width + cast(float32)Scale(8)) / 2.0, page.content.y,
(width - cast(float32)Scale(8)) / 2.0, cast(float32)Scale(44)})
area: TextAreaProps
area.key = cast(u64)290200
area.focus_id = 29020
area.bounds = Rectangle.{left, page.content.y + cast(float32)Scale(56), width,
cast(float32)editor_height}
area.value = state.text
area.placeholder = DiaryLocaleHost("diary_placeholder")
area.label = DiaryLocaleHost("tab_diary")
area.wrap = true
area.cursor = state.cursor
area.anchor = state.anchor
area.scroll_y = frame.scroll
area.focused = frame.focused
area.selecting = frame.selecting
area.read_only = state.load_error || state.year < 1
area.max_bytes = 2147483646
area.max_codepoints = 2147483646
area.input = frame.input
edited := TextArea(frame.session, area)
state.cursor = edited.cursor
state.anchor = edited.anchor
frame.scroll = edited.scroll_y
frame.focused = edited.focused
frame.selecting = edited.selecting
if edited.edit.changed {
state.action = DIARY_EDIT
state.edit_start = edited.edit.start
state.edit_end = edited.edit.end
state.replacement = edited.edit.replacement
pending = true
frame.save_at = frame.now + 0.75
}
if edited.clipboard_write {
frame.clipboard_write = true
frame.clipboard_text = edited.clipboard_text
}
status := ifx frame.photo_error then "diary_photo_error" else ifx state.load_error then "diary_read_error" else ifx state.saved then "diary_saved" else "diary_save_pending"
Text(frame.session, TextProps.{.bounds = Rectangle.{left,
area.bounds.y + area.bounds.height + cast(float32)Scale(12), width, cast(float32)Scale(40)},
.text = DiaryLocaleHost(status), .font = frame.font})
if state.photo_count > 0 {
photo_top := area.bounds.y + area.bounds.height + cast(float32)Scale(60)
path: Vec(u8)
BuilderPrint(*path, "diary/photos/%.%", state.photo_file, frame.photo_format)
image := BuilderFinish(path)
Image(frame.session, ImageProps.{.asset_path = image,
.alt_text = state.photo_name,
.bounds = Rectangle.{left, photo_top, width, cast(float32)Scale(240)},
.fit = cast(ImageFit)ImageFitContain})
Text(frame.session, TextProps.{.text = state.photo_name,
.bounds = Rectangle.{left, photo_top + cast(float32)Scale(248), width,
cast(float32)Scale(32)}, .font = frame.font})
DiaryAction(29008, "‹", Rectangle.{left, photo_top + cast(float32)Scale(288),
part, cast(float32)Scale(44)})
DiaryAction(29010, DiaryLocaleHost("diary_remove_photo"),
Rectangle.{left + part + cast(float32)Scale(6), photo_top + cast(float32)Scale(288),
part, cast(float32)Scale(44)})
DiaryAction(29009, "›", Rectangle.{left + 2.0 * (part + cast(float32)Scale(6)),
photo_top + cast(float32)Scale(288), part, cast(float32)Scale(44)})
}
End(frame.session)
return FinishView()
}
+17
View File
@@ -0,0 +1,17 @@
# Changelog
## [1.0.3] - 2026-10-07
- Keep app labels and content visible after updating Inner Breeze.
## [1.0.2] - 2026-10-06
- Use Cells consistently in the cell and its independently delivered package.
## [1.0.1] - 2026-10-06
- Load independently in the updated app host while retaining saved tracking.
## [1.0.0] - 2026-10-06
- First independently versioned Habits module.
+128
View File
@@ -0,0 +1,128 @@
// Habits owns page transitions, linked-day actions and form validation.
#import, file "../../src/cells/habits_types.zi";
#import, file "../../src/habits/habit_types.zi";
#import, file "../../src/core/types.zi";
#import, file "../../src/cells/module_types.zi";
host_api :: #system_library "host_api";
ReadHabitsHost :: () -> HabitsMessage #foreign host_api;
WriteHabitsHost :: (message: HabitsMessage) #foreign host_api;
HabitNameExistsHost :: (name: string, excluding: s32) -> bool #foreign host_api;
SaveHabitHost :: (message: HabitsMessage) -> bool #foreign host_api;
HabitTrimName :: (name: string) -> string {
start: s64 = 0
end := name.count
while start < end && (name[start] == cast(u8)32 || name[start] == cast(u8)9) {
start += 1
}
while end > start && (name[end - 1] == cast(u8)32 || name[end - 1] == cast(u8)9) {
end -= 1
}
return name[start:end]
}
using HabitSyncMode;
HabitsApply :: (message: HabitsMessage) -> HabitsMessage {
message.succeeded = true
if message.action == HABITS_ROUTE {
message.succeeded = message.screen == ScreenHabits ||
message.screen == ScreenHabitEdit || message.screen == ScreenHabitSessionEdit
return message
}
if message.action == HABITS_DAY_ACTION {
if message.modal_active || message.index < 0 || message.index >= message.count ||
(!message.scheduled && !message.completed) {
return message
}
if message.counter_enabled != 0 {
message.day_action = ifx message.decrement then HABITS_DAY_DECREMENT else HABITS_DAY_COUNT
} else if message.linked_count > 0 {
message.day_action = HABITS_DAY_LINKED
} else {
message.day_action = HABITS_DAY_TOGGLE
}
message.block_click = true
return message
}
if message.action == HABITS_COMMIT {
if !message.active {
return message
}
if !message.is_new && (message.index < 0 || message.index >= message.count) {
message.cancel_edit = true
return message
}
message.name_error = 0
message.name = HabitTrimName(message.name)
if message.name.count == 0 {
message.name_error = 1
} else if HabitNameExistsHost(message.name,
ifx message.is_new then -1 else message.index) {
message.name_error = 2
}
if message.name_error != 0 {
message.reset_scroll = true
return message
}
message.sync_mode = ifx message.sync_activity != 0 then HABIT_SYNC_ACTIVITIES else HABIT_SYNC_NONE
message.weekdays = message.weekdays & 0xff
message.color.a = 255
message.succeeded = SaveHabitHost(message)
if !message.succeeded {
return message
}
message.cancel_edit = true
message.action = HABITS_OVERVIEW
}
if message.action == HABITS_EXPAND {
if message.index < 0 || message.index >= message.count {
return message
}
message.selected = message.index
message.screen_mode = HABITS_SCREEN_OVERVIEW
message.tab = HABIT_TAB_WEEKLY
message.view_mode = HABIT_VIEW_WEEKLY
} else if message.action == HABITS_HISTORY || message.action == HABITS_STATISTICS {
if message.selected < 0 || message.selected >= message.count {
return message
}
message.reset_scroll = true
if message.action == HABITS_HISTORY {
message.screen_mode = HABITS_SCREEN_HISTORY
message.view_mode = HABIT_VIEW_CALENDAR
message.tab = HABIT_TAB_MONTHLY
} else {
message.screen_mode = HABITS_SCREEN_STATISTICS
message.tab = HABIT_TAB_STATISTICS
}
} else if message.action == HABITS_FOCUS {
message.screen_mode = HABITS_SCREEN_OVERVIEW
message.tab = HABIT_TAB_WEEKLY
message.reset_scroll = true
} else if message.action == HABITS_OVERVIEW {
message.selected = -1
message.screen_mode = HABITS_SCREEN_OVERVIEW
message.tab = HABIT_TAB_WEEKLY
message.view_mode = HABIT_VIEW_WEEKLY
message.reset_scroll = true
} else if message.action == HABITS_COLLAPSE {
message.selected = -1
} else {
message.succeeded = false
}
return message
}
#program_export "HabitsMain"
Main :: () -> s32 {
message := ReadHabitsHost()
if message.abi != MODULE_ABI {
return -1
}
if message.action == MODULE_IDENTIFY {
return MODULE_HABITS
}
WriteHabitsHost(HabitsApply(message))
return 0
}
+67
View File
@@ -0,0 +1,67 @@
# Changelog
## [2.1.17] - 2026-10-07
- Find every app in a searchable library and keep up to two favorites in the compact dock.
- Preserve saved app data when changing favorites and keep Profile and Settings close by.
## [2.1.13] - 2026-10-07
- Show clean, colored sync changes with translated explanations and complete change symbols.
## [2.1.12] - 2026-10-07
- Keep all apps working with Lumi's bold formatting and offline feature suggestions.
## [2.1.11] - 2026-10-07
- Connect Lumi to online conversation and app actions without blocking the interface.
- Deliver saved app feedback and show developer replies in chat.
## [2.1.10] - 2026-10-06
- Preserve the selected page during upgrades and add hidden apps instantly offline.
- Keep the interface responsive when an app cannot reset its view.
- Open Lumi smoothly and distinguish Lists from Diary with a checkmark icon.
## [2.1.8] - 2026-10-06
- Call sidebar choices Apps in setup and settings, with shorter instructions.
## [2.1.7] - 2026-10-06
- Show Lumi alongside every other cell in one compact, reorderable list.
- Include all cells for instant sidebar additions without a download.
## [2.1.6] - 2026-10-06
- Show a clearer firefly icon for Lumi and keep the bundled companion available when her shortcut is hidden.
- Keep every selected startup cell in the sidebar and preserve cached packages for quick reinstallation.
- Provide app tools for changing themes, appearance and settings directly.
## [2.1.5] - 2026-10-06
- Use a standard cell icon for Lumi and include translations for her habit and practice commands.
## [2.1.4] - 2026-10-06
- Recommend Lumi first in the cell picker and open her chat as the default home.
- Keep the firefly helper available offline alongside Habits and Practices.
- Include every character used by the current translations in the shared fonts.
## [2.1.3] - 2026-10-06
- Use Cells consistently in the cell picker and its independently delivered package.
## [2.1.2] - 2026-10-06
- Keep all app choices, the automatic update switch and the manual update button visible at normal desktop sizes.
## [2.1.1] - 2026-10-06
- The app picker and its update controls now travel with the app package, together with shared fonts, translations, styles and icons.
## [2.1.0] - 2026-10-06
- First independently versioned Inner Breeze module.
+115
View File
@@ -0,0 +1,115 @@
// The portable root owns app selection and unified navigation policy.
// Its assets contain Lumi, Habits and Practices as recommended cells.
#import, file "../../src/cells/inbe_types.zi";
#import, file "inbe_view.zi";
#import, file "../../src/cells/module_types.zi";
#import, file "../../src/core/types.zi";
host_api :: #system_library "host_api";
ReadInbeHost :: () -> InbeMessage #foreign host_api;
WriteInbeHost :: (message: InbeMessage) #foreign host_api;
RouteFeatureHost :: (app: s32, screen: s32) -> bool #foreign host_api;
InbeAppForScreen :: (screen: s32) -> s32 {
if screen == ScreenLumi {
return APP_LUMI
}
if screen == ScreenDiary {
return APP_DIARY
}
if screen == ScreenEList {
return APP_LISTS
}
if screen == ScreenHabits || screen == ScreenHabitEdit ||
screen == ScreenHabitSessionEdit {
return APP_HABITS
}
if screen == ScreenStart || screen == ScreenSession ||
screen == ScreenMeditation || screen == ScreenSunSalutation ||
screen == ScreenPatterns || screen == ScreenResults ||
screen == ScreenPracticeConfig || screen == ScreenManual {
return APP_PRACTICE
}
return 0
}
InbeHome :: (apps: s32) -> s32 {
if (apps & APP_LUMI) != 0 {
return ScreenLumi
}
if (apps & APP_PRACTICE) != 0 {
return ScreenStart
}
if (apps & APP_HABITS) != 0 {
return ScreenHabits
}
if (apps & APP_LISTS) != 0 {
return ScreenEList
}
if (apps & APP_DIARY) != 0 {
return ScreenDiary
}
return ScreenSettings
}
InbeApply :: (message: InbeMessage) -> InbeMessage {
message.enabled_apps &= APP_ALL
message.succeeded = true
if message.action == INBE_MINI_CONFIGURE {
// An explicit mini launch is a temporary practice session. It does
// not replace the profile's saved selection for the full app.
message.enabled_apps = APP_PRACTICE
message.screen = ScreenStart
}
if message.action == INBE_TOGGLE_APP {
if message.app != APP_LISTS && message.app != APP_HABITS &&
message.app != APP_PRACTICE && message.app != APP_DIARY && message.app != APP_LUMI {
message.succeeded = false
return message
}
if message.checked {
message.enabled_apps |= message.app
} else {
message.enabled_apps &= ~message.app
}
}
if message.action == INBE_CONFIGURE || message.action == INBE_TOGGLE_APP ||
message.action == INBE_MINI_CONFIGURE {
message.screen = InbeHome(message.enabled_apps)
} else if message.action == INBE_INITIAL_SCREEN {
if !message.language_selected {
message.screen = ScreenLanguage
} else if !message.apps_selected {
message.screen = ScreenAppSelection
} else {
app := InbeAppForScreen(message.screen)
if app != 0 && (message.enabled_apps & app) == 0 {
message.screen = InbeHome(message.enabled_apps)
}
}
} else if message.action != INBE_ROUTE {
message.succeeded = false
}
app := InbeAppForScreen(message.screen)
message.allowed = app == 0 || (message.enabled_apps & app) != 0
if message.action == INBE_ROUTE && message.allowed && app != 0 {
message.succeeded = RouteFeatureHost(app, message.screen)
}
return message
}
#program_export "InnerBreezeMain"
Main :: () -> s32 {
message := ReadInbeHost()
if message.abi != MODULE_ABI {
return -1
}
if message.action == MODULE_IDENTIFY {
return MODULE_INBE
}
if message.action == INBE_FRAME {
WriteInbeHost(InbePickerView(message))
} else {
WriteInbeHost(InbeApply(message))
}
return 0
}
+159
View File
@@ -0,0 +1,159 @@
#import "button_props"
#import "button_widget"
#import "checkbox_props"
#import "checkbox_widget"
#import "geometry"
#import "layout"
#import "text_props"
#import "text_widget"
#import "control_props"
#import "scroll_props"
#import "scroll_widget"
#import "tree"
#import "toggle_props"
#import "toggle_widget"
#import, file "../../src/cells/inbe_types.zi";
#import, file "../../src/cells/inbe_ui_types.zi";
using ButtonTone;
using ButtonEmphasis;
host_api :: #system_library "host_api";
ReadPickerUiHost :: () -> InbeUiFrame #foreign host_api;
WritePickerUiHost :: (frame: InbeUiFrame) #foreign host_api;
PickerLocaleHost :: (key: string) -> string #foreign host_api;
frame: InbeUiFrame;
state: InbeMessage;
Scale :: (pixels: s32) -> s32 {
return cast(s32)(cast(float32)pixels * frame.scale)
}
Bit :: (package: s32) -> s32 { return cast(s32)1 << (package - 1) }
Row :: (package: s32) -> AppPackageView {
if package == 1 { return frame.lists }
if package == 2 { return frame.habits }
if package == 3 { return frame.practices }
if package == 5 { return frame.lumi }
return frame.diary
}
Status :: (package: s32) -> s32 { return Row(package).status }
Available :: (package: s32) -> bool { return Row(package).available }
FinishPicker :: () -> InbeMessage {
WritePickerUiHost(frame)
state.succeeded = true
return state
}
InbePickerView :: (message: InbeMessage) -> InbeMessage {
frame = ReadPickerUiHost()
state = message
column := CenteredColumnFor(frame.width, Scale(420), Scale(16))
top := Scale(20)
compact := frame.height < Scale(480)
scroll_top := ifx compact then Scale(104) else Scale(156)
content_height := Scale(548)
for package: cast(s32)1..cast(s32)5 {
if Status(package) >= 3 {
content_height += Scale(16)
}
}
Text(frame.session, TextProps.{
.bounds = Rectangle.{cast(float32)column.x, cast(float32)top,
cast(float32)column.width, cast(float32)(ifx compact then Scale(28) else Scale(40))},
.text = PickerLocaleHost("cells_picker_title"), .font = Scale(24)})
Text(frame.session, TextProps.{
.bounds = Rectangle.{cast(float32)column.x, cast(float32)(top + (ifx compact then Scale(32) else Scale(48))),
cast(float32)column.width, cast(float32)(ifx compact then Scale(44) else Scale(84))},
.text = PickerLocaleHost("cells_picker_body"), .font = frame.font})
scroll := Scroll(frame.session, ScrollProps.{.key = cast(u64)27000,
.bounds = Rectangle.{cast(float32)column.x, cast(float32)scroll_top,
cast(float32)column.width, cast(float32)(frame.height - scroll_top - Scale(80))},
.content_height = content_height, .scroll_offset = frame.scroll})
frame.scroll = scroll.scroll_offset
if !scroll.opened {
return FinishPicker()
}
content_width := cast(s32)scroll.content.width
row_top := cast(s32)scroll.content.y
labels: [5]string = .["Lumi", PickerLocaleHost("tab_habits"), PickerLocaleHost("tab_practices"),
PickerLocaleHost("tab_elist"), PickerLocaleHost("tab_diary")]
packages: [5]s32 = .[5, 2, 3, 1, 4]
index: s32 = 0
while index < 5 {
if index == 0 || index == 3 {
Text(frame.session, TextProps.{.bounds = Rectangle.{cast(float32)column.x,
cast(float32)row_top, cast(float32)content_width, cast(float32)Scale(36)},
.text = PickerLocaleHost(ifx index == 0 then "cells_recommended" else "cells_optional"),
.font = frame.font})
row_top += Scale(40)
}
package := packages[index]
bit := Bit(package)
checkbox := Checkbox(frame.session, CheckboxProps.{
.id = ifx package == 5 then 278 else 270 + package - 1,
.bounds = Rectangle.{cast(float32)column.x,
cast(float32)row_top,
cast(float32)content_width, cast(float32)Scale(44)},
.label = labels[index], .checked = (state.enabled_apps & bit) != 0})
if checkbox.changed {
if checkbox.checked {
state.enabled_apps |= bit
} else {
state.enabled_apps &= ~bit
}
}
row_top += Scale(44)
{
status := Status(package)
key := ifx ((frame.installed & bit) != 0 || Available(package)) then "cells_installed" else "cells_download"
if status == 1 {
key = "update_downloading"
}
else if status == 3 {
key = "cells_download_failed"
}
else if status == 4 {
key = "cells_signing_setup"
}
Text(frame.session, TextProps.{.bounds = Rectangle.{cast(float32)(column.x + Scale(32)),
cast(float32)row_top, cast(float32)(content_width - Scale(32)),
cast(float32)(ifx status >= 3 then Scale(44) else Scale(28))},
.text = PickerLocaleHost(key), .font = Scale(14)})
row_top += ifx status >= 3 then Scale(44) else Scale(28)
}
index += 1
}
Text(frame.session, TextProps.{
.bounds = Rectangle.{cast(float32)column.x, cast(float32)(row_top + Scale(12)),
cast(float32)(content_width - Scale(80)), cast(float32)Scale(44)},
.text = PickerLocaleHost("cells_auto_update"), .font = frame.font})
automatic := Toggle(frame.session, ToggleProps.{.id = 276,
.bounds = Rectangle.{cast(float32)(column.x + content_width - Scale(64)),
cast(float32)(row_top + Scale(12)), cast(float32)Scale(64), cast(float32)Scale(44)},
.label = PickerLocaleHost("cells_auto_update"), .value = frame.automatic})
if automatic.changed {
frame.automatic = automatic.value
}
row_top += Scale(64)
if Button(frame.session, ButtonProps.{.id = 277,
.bounds = Rectangle.{cast(float32)column.x, cast(float32)row_top,
cast(float32)content_width, cast(float32)Scale(44)},
.label = PickerLocaleHost("cells_check_updates"),
.tone = cast(ButtonTone)ButtonToneNeutral,
.emphasis = cast(ButtonEmphasis)ButtonEmphasisSoft}) != 0 {
frame.check_updates = true
}
End(frame.session)
if Button(frame.session, ButtonProps.{.id = 274,
.bounds = Rectangle.{cast(float32)column.x,
cast(float32)(frame.height - Scale(64)), cast(float32)column.width,
cast(float32)Scale(44)},
.label = PickerLocaleHost("next_button"),
.tone = cast(ButtonTone)ButtonToneNeutral,
.emphasis = cast(ButtonEmphasis)ButtonEmphasisSoft}) != 0 {
frame.confirm = true
}
return FinishPicker()
}
+18
View File
@@ -0,0 +1,18 @@
# Changelog
## [1.0.3] - 2026-10-07
- Keep app labels and content visible after updating Inner Breeze.
## [1.0.2] - 2026-10-06
- Use Cells consistently in the cell and its independently delivered package.
## [1.0.1] - 2026-10-06
- Load independently in the updated app host while retaining saved lists.
- Update the list tabs, editor and completion controls with the Lists package.
## [1.0.0] - 2026-10-06
- First independently versioned Lists module.
+140
View File
@@ -0,0 +1,140 @@
// Lists owns edit decisions and list/item mutations. Storage capabilities use
// the unified host's open database and identity.
#import, file "../../src/cells/lists_types.zi";
#import, file "../../src/core/types.zi";
#import, file "../../src/cells/module_types.zi";
#import, file "lists_view.zi";
host_api :: #system_library "host_api";
ReadListsHost :: () -> ListsMessage #foreign host_api;
WriteListsHost :: (message: ListsMessage) #foreign host_api;
PersistListsHost :: (mutation: ListsMutation) -> ListsMutationResult #foreign host_api;
ListsApply :: (message: ListsMessage) -> ListsMessage {
message.succeeded = true
if message.action == LISTS_FRAME {
return message
}
if message.action == LISTS_ROUTE {
message.visible = message.screen == ScreenEList
return message
}
if message.action == LISTS_SELECT {
if message.index < 0 || message.index >= message.list_count ||
message.index == message.selected_list {
return message
}
message.selected_list = message.index
message.show_completed = 0
message.completing_id = ""
message.completing_until = 0.0
message.editing_item = -1
message.reset_input = true
message.reset_scroll = true
message.changed = true
return message
}
if message.action == LISTS_VISIBLE {
message.visibility_deadline = 0.0
message.visible = message.index >= 0 && message.index < message.item_count &&
message.selected_list >= 0 && message.selected_list < message.list_count &&
message.parent_id == message.selected_id &&
(message.done == 0 || message.show_completed != 0 ||
(message.now < message.completing_until &&
message.id == message.completing_id))
if message.visible && message.done != 0 && message.show_completed == 0 {
message.visibility_deadline = message.completing_until
}
return message
}
mutation: ListsMutation
mutation.id = message.id
mutation.parent_id = message.parent_id
mutation.title = message.title
mutation.comment = message.comment
mutation.done = message.done
mutation.sort_order = message.sort_order
if message.action == LISTS_COMMIT {
if message.title.count == 0 {
return message
}
if message.editing_item == -2 {
mutation.kind = LISTS_CREATE_LIST
} else if message.editing_item == -3 && message.selected_list >= 0 &&
message.selected_list < message.list_count {
mutation.kind = LISTS_UPDATE_LIST
} else if message.editing_item >= 0 &&
message.editing_item < message.item_count {
mutation.kind = LISTS_UPDATE_ITEM
} else if message.selected_list >= 0 && message.selected_list < message.list_count {
mutation.kind = LISTS_CREATE_ITEM
mutation.parent_id = message.selected_id
mutation.comment = ""
} else {
message.input_error = 1
message.succeeded = false
return message
}
} else if message.action == LISTS_SET_DONE {
if message.index < 0 || message.index >= message.item_count {
message.succeeded = false
return message
}
mutation.kind = LISTS_UPDATE_ITEM
} else if message.action == LISTS_DELETE_LIST {
if message.selected_list < 0 || message.selected_list >= message.list_count {
message.succeeded = false
return message
}
mutation.kind = LISTS_REMOVE_LIST
} else if message.action == LISTS_DELETE_ITEM {
if message.index < 0 || message.index >= message.item_count {
message.succeeded = false
return message
}
mutation.kind = LISTS_REMOVE_ITEM
} else {
message.succeeded = false
return message
}
result := PersistListsHost(mutation)
message.succeeded = result.saved
if !result.saved {
message.input_error = 1
return message
}
message.input_error = 0
message.changed = true
message.reload = true
message.sync = true
if message.action == LISTS_COMMIT {
message.reset_input = true
message.editing_item = -1
message.selected_id = result.created_id
} else if message.action == LISTS_SET_DONE {
if message.done != 0 {
message.completing_id = message.id
message.completing_until = message.now + 0.45
} else if message.id == message.completing_id {
message.completing_id = ""
}
} else if message.action == LISTS_DELETE_LIST {
message.selected_list = 0
}
return message
}
#program_export "ListsMain"
Main :: () -> s32 {
message := ReadListsHost()
if message.abi != MODULE_ABI {
return -1
}
if message.action == MODULE_IDENTIFY {
return MODULE_LISTS
}
if message.action == LISTS_FRAME {
message = ListsView(message)
}
WriteListsHost(ListsApply(message))
return 0
}
+277
View File
@@ -0,0 +1,277 @@
// Lists owns its complete screen composition; the host supplies saved rows,
// device input and ordinary Kryon widget effects.
#import "session"
#import "geometry"
#import "text"
#import "vec"
#import "text_props"
#import "text_align"
#import "text_widget"
#import "text_input_props"
#import "text_field_widget"
#import "button_props"
#import "button_widget"
#import "control_props"
#import "checkbox_props"
#import "checkbox_widget"
#import "tab_bar_props"
#import "tab_bar_widget"
#import "scroll_props"
#import "scroll_widget"
#import "tree"
#import "icon"
#import, file "../../src/cells/lists_ui_types.zi";
#import, file "../../src/cells/lists_types.zi";
using ButtonTone;
using ButtonEmphasis;
using TextAlign;
using TextWrap;
using IconType;
host_api :: #system_library "host_api";
ReadListsUiHost :: () -> ListsUiFrame #foreign host_api;
WriteListsUiHost :: (frame: ListsUiFrame) #foreign host_api;
ReadListsRowHost :: (index: s32, item: bool) -> ListsUiRow #foreign host_api;
ListsLocaleHost :: (key: string) -> string #foreign host_api;
frame: ListsUiFrame;
state: ListsMessage;
Scale :: (pixels: s32) -> s32 {
return cast(s32)(cast(float32)pixels * frame.scale)
}
Bounds :: (x: s32, y: s32, width: s32, height: s32) -> Rectangle {
return Rectangle.{cast(float32)x, cast(float32)y,
cast(float32)width, cast(float32)height}
}
ListsActionProps :: (key: u64, label: string, bounds: Rectangle,
accent: bool, disabled: bool, icon: s32) -> ButtonProps {
return ButtonProps.{.key = key, .bounds = bounds,
.label = label, .tone = cast(ButtonTone)(ifx accent then ButtonToneAccent else ButtonToneNeutral),
.emphasis = cast(ButtonEmphasis)(ifx accent then ButtonEmphasisFilled else ButtonEmphasisSoft),
.pill = icon == 0, .icon_only = icon != 0, .icon_type = icon,
.disabled = disabled}
}
BeginInput :: (item: s32, value: string) {
state.editing_item = item
state.input_error = 0
frame.value = value
frame.cursor = cast(s32)value.count
frame.anchor = frame.cursor
frame.scroll_x = 0
frame.focused = true
}
Finish :: () -> ListsMessage {
WriteListsUiHost(frame)
state.succeeded = true
return state
}
Mutation :: (action: s32, index: s32) {
state.action = action
state.index = index
if state.selected_list >= 0 && state.selected_list < state.list_count {
row := ReadListsRowHost(state.selected_list, false)
state.id = row.id
state.selected_id = row.id
state.sort_order = row.sort_order
}
item := ifx action == LISTS_COMMIT then state.editing_item else index
if item >= 0 && item < state.item_count {
row := ReadListsRowHost(item, true)
state.id = row.id
state.parent_id = row.parent_id
state.title = row.title
state.comment = row.comment
state.done = row.done
state.sort_order = row.sort_order
}
if action == LISTS_COMMIT {
state.title = frame.value
}
}
Field :: (bounds: Rectangle) -> bool {
edited := TextField(frame.session, TextFieldProps.{.key = cast(u64)6501,
.bounds = bounds, .value = frame.value, .cursor = frame.cursor,
.anchor = frame.anchor, .scroll_x = frame.scroll_x,
.focused = frame.focused, .focus_id = 6501,
.max_bytes = 127, .max_codepoints = 127, .input = frame.input})
if edited.edit.changed {
start := edited.edit.start
end := edited.edit.end
if start >= 0 && end >= start && end <= frame.value.count {
value: Vec(u8)
BuilderPrint(*value, "%", frame.value[:start])
BuilderPrint(*value, "%", edited.edit.replacement)
BuilderPrint(*value, "%", frame.value[end:])
replacement := BuilderFinish(value)
if replacement.count <= 127 {
frame.value = replacement
}
}
}
frame.cursor = edited.cursor
frame.anchor = edited.anchor
frame.scroll_x = edited.scroll_x
frame.focused = edited.focused
frame.clipboard_write = edited.clipboard_write
frame.clipboard_text = edited.clipboard_text
return edited.committed
}
ListsView :: (message: ListsMessage) -> ListsMessage {
frame = ReadListsUiHost()
state = message
x := Scale(16)
width := frame.width - x * 2
y := Scale(12)
tabs: [32]Tab
for index: cast(s32)0..state.list_count - 1 {
row := ReadListsRowHost(index, false)
tabs[index] = Tab.{.key = cast(u64)(6800 + index), .label = row.title}
}
action_width := Scale(118)
actions := action_width
if state.list_count > 0 && state.selected_list >= 0 {
actions += Scale(88)
}
selector := width - actions - Scale(10)
if selector < Scale(160) {
actions = action_width
selector = width - actions - Scale(10)
}
if state.list_count > 0 && selector > 0 {
selected := TabBar(frame.session, TabBarProps.{.id = 6500,
.bounds = Bounds(x, y, selector, Scale(44)),
.selected_index = state.selected_list, .min_tab_width = Scale(72),
.max_tab_width = selector}, tabs[:state.list_count])
if selected.selected_index != state.selected_list {
state.action = LISTS_SELECT
state.index = selected.selected_index
return Finish()
}
}
if Button(frame.session, ListsActionProps(cast(u64)6505, ListsLocaleHost("elist_new_list"),
Bounds(x + width - action_width, y, action_width, Scale(44)), false, false, 0)) != 0 {
BeginInput(-2, "")
return Finish()
}
if state.list_count > 0 && state.selected_list >= 0 && actions > action_width {
edit_x := x + width - action_width - Scale(84)
if Button(frame.session, ListsActionProps(cast(u64)6503, "", Bounds(edit_x, y, Scale(38), Scale(38)),
false, false, cast(s32)IconEdit)) != 0 {
BeginInput(-3, ReadListsRowHost(state.selected_list, false).title)
}
if Button(frame.session, ListsActionProps(cast(u64)6504, "", Bounds(edit_x + Scale(40), y, Scale(38), Scale(38)),
false, false, cast(s32)IconTrash)) != 0 {
Mutation(LISTS_DELETE_LIST, -1)
return Finish()
}
}
y += Scale(60)
if state.input_error != 0 {
Text(frame.session, TextProps.{.bounds = Bounds(x, y, width, Scale(40)),
.text = ListsLocaleHost("results_write_failed"), .wrap = cast(TextWrap)TextWrapAuto})
y += Scale(48)
}
if state.editing_item == -2 || state.editing_item == -3 {
committed := Field(Bounds(x, y, width, Scale(44)))
if Button(frame.session, ListsActionProps(cast(u64)6506,
ListsLocaleHost(ifx state.editing_item == -3 then "done_button" else "elist_create_list"),
Bounds(x, y + Scale(52), width, Scale(40)), true, frame.value.count == 0, 0)) != 0 || committed {
Mutation(LISTS_COMMIT, -1)
}
return Finish()
}
if state.list_count == 0 {
Text(frame.session, TextProps.{.bounds = Bounds(x, y + Scale(48), width, Scale(30)),
.text = ListsLocaleHost("elist_empty_title"), .align = cast(TextAlign)TextAlignCenter})
Text(frame.session, TextProps.{.bounds = Bounds(x, y + Scale(88), width, Scale(48)),
.text = ListsLocaleHost("elist_empty_detail"), .align = cast(TextAlign)TextAlignCenter,
.wrap = cast(TextWrap)TextWrapAuto})
return Finish()
}
field_width := width - Scale(92)
committed := Field(Bounds(x, y, field_width, Scale(44)))
if Button(frame.session, ListsActionProps(cast(u64)6507,
ListsLocaleHost(ifx state.editing_item >= 0 then "done_button" else "elist_add_item"),
Bounds(x + field_width + Scale(8), y, Scale(84), Scale(44)),
true, frame.value.count == 0, 0)) != 0 || committed {
Mutation(LISTS_COMMIT, -1)
return Finish()
}
y += Scale(52)
footer := frame.height - frame.bottom - Scale(72)
if footer < y + Scale(58) {
footer = y + Scale(58)
}
footer_width := ifx Scale(176) > width then width else Scale(176)
if Button(frame.session, ListsActionProps(cast(u64)6502,
ListsLocaleHost(ifx state.show_completed != 0 then "elist_hide_completed" else "elist_show_completed"),
Bounds(x + width - footer_width, footer, footer_width, Scale(44)), false, false, 0)) != 0 {
state.show_completed = ifx state.show_completed == 0 then 1 else 0
frame.scroll = 0
}
visible: [256]bool
count: s32 = 0
selected_id := ReadListsRowHost(state.selected_list, false).id
for index: cast(s32)0..state.item_count - 1 {
row := ReadListsRowHost(index, true)
visible[index] = row.parent_id == selected_id && (row.done == 0 ||
state.show_completed != 0 || (row.id == state.completing_id && state.now < state.completing_until))
if visible[index] {
count += 1
}
}
scroll := Scroll(frame.session, ScrollProps.{.key = cast(u64)6600,
.bounds = Bounds(x, y, width, footer - y - Scale(12)),
.content_height = count * Scale(66), .scroll_offset = frame.scroll})
frame.scroll = scroll.scroll_offset
if scroll.opened {
row_y := cast(s32)scroll.content.y
for index: cast(s32)0..state.item_count - 1 {
if !visible[index] {
continue
}
if row_y + Scale(58) > cast(s32)scroll.viewport.y &&
row_y < cast(s32)(scroll.viewport.y + scroll.viewport.height) {
row := ReadListsRowHost(index, true)
key := cast(u64)(7000 + index * 4)
checked := Checkbox(frame.session, CheckboxProps.{.key = key,
.bounds = Bounds(x + Scale(10), row_y + Scale(17), Scale(28), Scale(28)),
.checked = row.done != 0})
if checked.changed {
Mutation(LISTS_SET_DONE, index)
state.done = ifx checked.checked then 1 else 0
End(frame.session)
return Finish()
}
Text(frame.session, TextProps.{.bounds = Bounds(x + Scale(52), row_y,
width - Scale(138), ifx row.comment.count > 0 then Scale(28) else Scale(58)),
.text = row.title, .vertical_align = cast(TextAlign)TextAlignCenter,
.strikethrough = row.done != 0})
if row.comment.count > 0 {
Text(frame.session, TextProps.{.bounds = Bounds(x + Scale(52), row_y + Scale(32),
width - Scale(138), Scale(18)), .text = row.comment})
}
if Button(frame.session, ListsActionProps(key + cast(u64)1, "", Bounds(x + width - Scale(78), row_y + Scale(12), Scale(34), Scale(34)),
false, false, cast(s32)IconEdit)) != 0 {
BeginInput(index, row.title)
}
if Button(frame.session, ListsActionProps(key + cast(u64)2, "", Bounds(x + width - Scale(40), row_y + Scale(12), Scale(34), Scale(34)),
false, false, cast(s32)IconTrash)) != 0 {
Mutation(LISTS_DELETE_ITEM, index)
End(frame.session)
return Finish()
}
}
row_y += Scale(66)
}
End(frame.session)
}
return Finish()
}
+52
View File
@@ -0,0 +1,52 @@
# Changelog
## [1.3.2] - 2026-10-07
### Changed
- Load earlier chat messages automatically as you scroll up, preserving your reading position.
- Move Telegram setup from the chat toolbar into Settings.
## [1.3.1] - 2026-10-07
- Format bold emphasis in replies and save explicit feature suggestions as feedback offline.
## [1.3.0] - 2026-10-07
- Show daily progress charts from saved practices, meditation, breath retention and completed habits.
- Keep charts in chat, select daily values, and show an empty state when no activity is recorded.
- Show donation cards with Bitcoin and Monero addresses, wallet links and browser donation links.
## [1.2.0] - 2026-10-07
- Understand natural conversation online with the same tools in Inner Breeze and Harmony.
- Save explicit app feedback offline and receive private developer replies in chat.
## [1.1.3] - 2026-10-06
- Keep longer conversations responsive when opening, scrolling and typing.
## [1.1.2] - 2026-10-06
- Write to today's Diary from chat, with the current time above each message.
- Ask for text when a Diary request has no entry yet, and preserve multiline messages.
- Insert a new line with Shift+Enter and send with Enter.
- Keep replies short when a request is unclear.
- Display the mirrored avatar beside replies.
## [1.1.1] - 2026-10-06
- Change color themes, light and dark mode directly from chat, and open Settings or Appearance.
- Keep the bundled companion available when its sidebar shortcut is hidden.
- Show a clearer firefly icon in the sidebar.
## [1.1.0] - 2026-10-06
- Place Lumi’s avatar beside her replies in a chat without a title bar.
- Complete habits for today and start WHM, meditation, Sun Salutation or breathing patterns directly from chat.
- Offer only commands supported by installed and enabled cells.
- Ask which habit to complete, choose it by name, and use compact autocomplete chips with case-insensitive matching and command spelling correction.
## [1.0.0] - 2026-10-06
- Meet Lumi, Inner Breeze's firefly companion, in a private local chat.
- Complete commands and todo names as you type, add todos, mark them complete, reopen them, and open your selected apps.
+140
View File
@@ -0,0 +1,140 @@
#import "text"
#import "vec"
#import "utf8"
CommandSpace :: (byte: u8) -> bool {
return byte == 32 || byte == 9 || byte == 10 || byte == 13
}
CommandFold :: (codepoint: u32) -> u32 {
if (codepoint >= 65 && codepoint <= 90) || (codepoint >= 192 && codepoint <= 222 && codepoint != 215) ||
(codepoint >= 1040 && codepoint <= 1071) {
return codepoint + cast(u32)32
}
if codepoint >= 1024 && codepoint <= 1039 {
return codepoint + cast(u32)80
}
if ((codepoint >= 256 && codepoint <= 311) || (codepoint >= 330 && codepoint <= 375)) && codepoint % cast(u32)2 == 0 {
return codepoint + cast(u32)1
}
if codepoint >= 313 && codepoint <= 328 && codepoint % cast(u32)2 == 1 {
return codepoint + cast(u32)1
}
if codepoint == 376 {
return cast(u32)255
}
return codepoint
}
CommandEqual :: (left: string, right: string) -> bool {
a: s32 = 0
b: s32 = 0
while a < left.count && b < right.count {
x := Decode(left, a)
y := Decode(right, b)
if CommandFold(x.value) != CommandFold(y.value) {
return false
}
a = x.after
b = y.after
}
return a == left.count && b == right.count
}
// One insertion, deletion, substitution or adjacent transposition in a command
// word. Names and IDs never pass through this spelling correction.
CommandTypo :: (left: string, right: string) -> bool {
if CommandEqual(left, right) {
return true
}
if (left.count > 0 && left[0] == cast(u8)47) || (right.count > 0 && right[0] == cast(u8)47) {
return false
}
if left.count < 4 || right.count < 4 || left.count > 32 || right.count > 32 ||
left.count > right.count + 1 || right.count > left.count + 1 {
return false
}
for byte: left {
if byte >= 128 { return false }
}
for byte: right {
if byte >= 128 { return false }
}
a: s64 = 0
b: s64 = 0
edits: s32 = 0
while a < left.count && b < right.count {
if LowerASCII(left[a]) == LowerASCII(right[b]) {
a += 1
b += 1
continue
}
edits += 1
if edits > 1 { return false }
if left.count == right.count && a + 1 < left.count && b + 1 < right.count &&
LowerASCII(left[a]) == LowerASCII(right[b + 1]) && LowerASCII(left[a + 1]) == LowerASCII(right[b]) {
a += 2
b += 2
} else if left.count > right.count {
a += 1
} else if right.count > left.count {
b += 1
} else {
a += 1
b += 1
}
}
if a < left.count || b < right.count { edits += 1 }
return edits <= 1
}
CommandPrefixEnd :: (input: string, command: string) -> s32 {
a: s32 = 0
b: s32 = 0
while b < command.count {
while a < input.count && CommandSpace(input[a]) { a += 1 }
while b < command.count && CommandSpace(command[b]) { b += 1 }
if b >= command.count { break }
start_a := a
start_b := b
while a < input.count && !CommandSpace(input[a]) { a += 1 }
while b < command.count && !CommandSpace(command[b]) { b += 1 }
if !CommandTypo(input[start_a:a], command[start_b:b]) { return -1 }
}
return a
}
CommandPhrase :: (input: string, command: string) -> bool {
return command.count > 0 && CommandPrefixEnd(input, command) == input.count
}
CommandNormalize :: (input: string) -> string {
words: [10]string = .["start", "meditation", "sun", "salutation", "salutations",
"breathing", "patterns", "wim", "hof", "method"]
out: Vec(u8)
at: s32 = 0
while at < input.count {
while at < input.count && CommandSpace(input[at]) { at += 1 }
start := at
while at < input.count && !CommandSpace(input[at]) { at += 1 }
if start == at { break }
word := input[start:at]
matches: s32 = 0
replacement := word
for candidate: words {
if CommandEqual(word, candidate) {
replacement = candidate
matches = 1
break
}
if CommandTypo(word, candidate) {
replacement = candidate
matches += 1
}
}
if matches != 1 { replacement = word }
if out.count > 0 { BuilderPrint(*out, " ") }
BuilderPrint(*out, "%", replacement)
}
return BuilderFinish(out)
}
+289
View File
@@ -0,0 +1,289 @@
// A small offline engine. UI and host effects do not depend on its internals;
// an on-device model can later produce the same typed LumiAction values.
#import "utf8"
#import, file "command_text.zi";
#import, file "regex.zi";
#import, file "../../src/cells/lumi_types.zi";
#import, file "../../src/app/route_types.zi";
using AppNavRoute;
LumiTrim :: (value: string) -> string {
start: s64 = 0
end := value.count
while start < end && CommandSpace(value[start]) {
start += 1
}
while end > start && CommandSpace(value[end - 1]) {
end -= 1
}
return value[start:end]
}
LumiLower :: (byte: u8) -> u8 {
if byte >= cast(u8)65 && byte <= cast(u8)90 {
return byte + cast(u8)32
}
return byte
}
LumiStarts :: (value: string, prefix: string) -> bool {
a: s32 = 0
b: s32 = 0
while b < prefix.count {
if a >= value.count { return false }
x := Decode(value, a)
y := Decode(prefix, b)
if CommandFold(x.value) != CommandFold(y.value) { return false }
a = x.after
b = y.after
}
return true
}
LumiEqual :: (left: string, right: string) -> bool {
return CommandEqual(left, right)
}
LumiSuggests :: (candidate: string, typed: string) -> bool {
a: s32 = 0
b: s32 = 0
while b < typed.count {
while a < candidate.count && CommandSpace(candidate[a]) { a += 1 }
while b < typed.count && CommandSpace(typed[b]) { b += 1 }
if b >= typed.count { return true }
start_a := a
start_b := b
while a < candidate.count && !CommandSpace(candidate[a]) { a += 1 }
while b < typed.count && !CommandSpace(typed[b]) { b += 1 }
word := typed[start_b:b]
option := candidate[start_a:a]
if b == typed.count && LumiStarts(option, word) { return true }
if !CommandTypo(word, option) { return false }
}
return true
}
LumiArgument :: (input: string, command: string) -> string {
end := CommandPrefixEnd(input, command)
if command.count == 0 || end < 0 || end >= input.count || !CommandSpace(input[end]) {
return ""
}
return LumiTrim(input[end:])
}
LumiProgressIntent :: (input: string, commands: LumiCommands) -> LumiAction {
prefixes: [2]string = .[commands.progress, "/progress"]
for prefix: prefixes {
if prefix.count == 0 {
continue
}
if LumiEqual(input, prefix) {
return LumiAction.{.kind = LUMI_SHOW_PROGRESS, .practice = LUMI_PROGRESS_SESSIONS, .route = 7}
}
argument := LumiArgument(input, prefix)
if argument.count == 0 {
continue
}
boundary: s64 = 0
while boundary < argument.count && !CommandSpace(argument[boundary]) {
boundary += 1
}
metrics: [4]string = .["sessions", "meditation", "retention", "habits"]
for metric: cast(s32)0..cast(s32)3 {
if !LumiEqual(argument[:boundary], metrics[metric]) {
continue
}
days_text := LumiTrim(argument[boundary:])
days: s32 = 7
if days_text.count > 0 {
if days_text.count > 2 {
return LumiAction.{}
}
days = 0
for byte: days_text {
if byte < cast(u8)48 || byte > cast(u8)57 {
return LumiAction.{}
}
days = days * 10 + cast(s32)(byte - cast(u8)48)
}
}
if days >= 1 && days <= LUMI_PROGRESS_MAX_DAYS {
return LumiAction.{.kind = LUMI_SHOW_PROGRESS, .practice = metric, .route = days}
}
}
}
aliases: [4]string = .["show my progress", "show progress", "show progress chart", "progress chart"]
for alias: aliases {
if CommandPhrase(input, alias) {
return LumiAction.{.kind = LUMI_SHOW_PROGRESS, .practice = LUMI_PROGRESS_SESSIONS, .route = 7}
}
}
return LumiAction.{}
}
LumiIntent :: (input: string, commands: LumiCommands) -> LumiAction {
input = LumiTrim(input)
progress := LumiProgressIntent(input, commands)
if progress.kind != 0 {
return progress
}
donation_aliases: [5]string = .[commands.donations, "/donate", "donation links", "show donation links", "how can I donate?"]
for alias: donation_aliases {
if alias.count > 0 && LumiEqual(input, alias) {
return LumiAction.{.kind = LUMI_SHOW_DONATIONS}
}
}
// Explicit reports remain usable without a network or a model allowance.
feedback_prefixes: [19]string = .["/feedback ", "feedback:", "feedback ", "fix ", "please fix ",
"/suggest ", "suggestion:", "suggestion ", "feature request:", "feature request ",
"app idea:", "improve the app ", "the app should ", "this app should ", "inbe should ",
"inner breeze should ", "lumi should ", "i wish the app ", "i suggest "]
for prefix: feedback_prefixes {
if LumiStarts(input, prefix) && input.count > prefix.count {
return LumiAction.{.kind = LUMI_REPORT_FEEDBACK, .title = input}
}
}
diary_prefixes: [7]string = .[commands.write_diary, "write this to my diary",
"write to my diary", "add to my diary", "save to my diary", "/journal", "/diary"]
for prefix: diary_prefixes {
if prefix.count == 0 || (prefix == "/diary" && LumiEqual(input, prefix)) {
continue
}
boundary: s32 = 0
while boundary < input.count && input[boundary] != cast(u8)58 && input[boundary] != cast(u8)10 {
boundary += 1
}
if boundary < input.count && CommandPhrase(LumiTrim(input[:boundary]), prefix) {
return LumiAction.{.kind = LUMI_WRITE_DIARY, .title = LumiTrim(input[boundary + 1:])}
}
end := CommandPrefixEnd(input, prefix)
if end >= 0 && (end == input.count || CommandSpace(input[end])) {
return LumiAction.{.kind = LUMI_WRITE_DIARY, .title = LumiTrim(input[end:])}
}
}
if LumiEqual(input, commands.settings) || LumiEqual(input, "/settings") ||
CommandPhrase(input, "open settings") {
return LumiAction.{.kind = LUMI_OPEN, .route = APP_NAV_ROUTE_SETTINGS}
}
if LumiEqual(input, commands.appearance) || LumiEqual(input, "/appearance") ||
CommandPhrase(input, "open appearance") {
return LumiAction.{.kind = LUMI_OPEN, .route = APP_NAV_ROUTE_SETTINGS, .practice = 1}
}
modes: [3]string = .[commands.system, commands.light, commands.dark]
mode_aliases: [3]string = .["system mode", "light mode", "dark mode"]
mode_commands: [3]string = .["/system", "/light", "/dark"]
for index: cast(s32)0..cast(s32)2 {
if LumiEqual(input, modes[index]) || LumiEqual(input, mode_commands[index]) ||
CommandPhrase(input, mode_aliases[index]) {
return LumiAction.{.kind = LUMI_SET_MODE, .route = index}
}
}
theme := LumiArgument(input, commands.theme)
if theme.count == 0 {
theme = LumiArgument(input, "/theme")
}
if theme.count == 0 {
theme = LumiArgument(input, "theme")
}
if theme.count > 0 {
return LumiAction.{.kind = LUMI_SET_THEME, .title = theme}
}
starts: [4]string = .[commands.start_whm, commands.start_meditation,
commands.start_sun, commands.start_patterns]
for index: cast(s32)0..cast(s32)3 {
if starts[index].count > 0 && CommandPhrase(input, starts[index]) {
return LumiAction.{.kind = LUMI_START_PRACTICE, .practice = index}
}
}
normalized := CommandNormalize(input)
practice_patterns: [7]string = .["^start\\s+whm[.!?]*$", "^start\\s+wim\\s+hof$",
"^start\\s+wim\\s+hof\\s+method$", "^start\\s+meditation[.!?]*$",
"^start\\s+sun\\s+salutations?[.!?]*$", "^start\\s+breathing\\s+patterns[.!?]*$",
"^start\\s+patterns[.!?]*$"]
ids: [7]s32 = .[0, 0, 0, 1, 2, 3, 3]
for index: cast(s32)0..cast(s32)6 {
if RegexMatch(practice_patterns[index], normalized) {
return LumiAction.{.kind = LUMI_START_PRACTICE, .practice = ids[index]}
}
}
practice_aliases: [10]string = .["start whm", "start wim hof", "start wim hof method",
"/whm", "start meditation", "start sun salutation", "start sun salutations",
"start breathing patterns", "start patterns", "/meditate"]
practice_ids: [10]s32 = .[0, 0, 0, 0, 1, 2, 2, 3, 3, 1]
for index: cast(s32)0..cast(s32)9 {
if LumiEqual(input, practice_aliases[index]) {
return LumiAction.{.kind = LUMI_START_PRACTICE, .practice = practice_ids[index]}
}
}
habit_prefixes: [5]string = .[commands.complete_habit, "/habit", "complete habit",
"done habit", "mark habit complete"]
for prefix: habit_prefixes {
if CommandPhrase(input, prefix) {
return LumiAction.{.kind = LUMI_COMPLETE_HABIT}
}
title := LumiArgument(input, prefix)
if title.count > 0 {
return LumiAction.{.kind = LUMI_COMPLETE_HABIT, .title = title}
}
}
routes: [4]s32 = .[APP_NAV_ROUTE_ELIST, APP_NAV_ROUTE_HABITS,
APP_NAV_ROUTE_PRACTICE, APP_NAV_ROUTE_DIARY]
labels: [4]string = .[commands.lists, commands.habits, commands.practices, commands.diary]
aliases: [4]string = .["/lists", "/habits", "/practices", "/diary"]
for index: cast(s32)0..cast(s32)3 {
if CommandPhrase(input, labels[index]) || LumiEqual(input, aliases[index]) {
return LumiAction.{.kind = LUMI_OPEN, .route = routes[index]}
}
}
prefixes: [9]string = .[commands.add, "/todo", "add todo", commands.complete,
"/done", "complete todo", commands.reopen, "/reopen", "reopen todo"]
for index: cast(s32)0..cast(s32)8 {
title := LumiArgument(input, prefixes[index])
if title.count > 0 {
kind: s32 = ifx index < 3 then LUMI_ADD_TODO else ifx index < 6 then LUMI_COMPLETE_TODO else LUMI_REOPEN_TODO
return LumiAction.{.kind = kind, .title = title}
}
}
// Common English shorthand remains available beside translated commands.
add := LumiArgument(input, "add")
if add.count > 0 {
return LumiAction.{.kind = LUMI_ADD_TODO, .title = add}
}
done := LumiArgument(input, "done")
if done.count > 0 {
return LumiAction.{.kind = LUMI_COMPLETE_TODO, .title = done}
}
return LumiAction.{}
}
// Both the conversation and autocomplete use the same installed tool policy.
LumiActionAvailable :: (action: LumiAction, available_apps: s32) -> bool {
if action.kind == LUMI_SHOW_DONATIONS || action.kind == LUMI_REPORT_FEEDBACK || action.kind == LUMI_SET_THEME || action.kind == LUMI_SET_MODE ||
(action.kind == LUMI_OPEN && action.route == APP_NAV_ROUTE_SETTINGS) {
return true
}
bit: s32 = 0
if action.kind == LUMI_SHOW_PROGRESS {
bit = ifx action.practice == LUMI_PROGRESS_HABITS then LUMI_HABITS else LUMI_PRACTICES
} else if action.kind == LUMI_ADD_TODO || action.kind == LUMI_COMPLETE_TODO || action.kind == LUMI_REOPEN_TODO {
bit = LUMI_LISTS
} else if action.kind == LUMI_WRITE_DIARY {
bit = LUMI_DIARY
} else if action.kind == LUMI_COMPLETE_HABIT {
bit = LUMI_HABITS
} else if action.kind == LUMI_START_PRACTICE {
bit = LUMI_PRACTICES
} else if action.kind == LUMI_OPEN {
if action.route == APP_NAV_ROUTE_ELIST {
bit = LUMI_LISTS
} else if action.route == APP_NAV_ROUTE_HABITS {
bit = LUMI_HABITS
} else if action.route == APP_NAV_ROUTE_PRACTICE {
bit = LUMI_PRACTICES
} else if action.route == APP_NAV_ROUTE_DIARY {
bit = LUMI_DIARY
}
}
return bit != 0 && (available_apps & bit) != 0
}
+215
View File
@@ -0,0 +1,215 @@
// Lumi owns conversation decisions. The host supplies only explicit app tools.
#import "text"
#import "vec"
#import, file "../../src/cells/lumi_types.zi";
#import, file "../../src/cells/module_types.zi";
#import, file "../../src/cells/lumi_ui_types.zi";
#import, file "../../src/core/types.zi";
#import, file "engine.zi";
#import, file "lumi_view.zi";
host_api :: #system_library "host_api";
ReadLumiHost :: () -> LumiMessage #foreign host_api;
WriteLumiHost :: (message: LumiMessage) #foreign host_api;
ReadLumiTaskHost :: (index: s32) -> LumiTask #foreign host_api;
ReadLumiHabitHost :: (index: s32) -> LumiTask #foreign host_api;
LumiTaskCountHost :: () -> s32 #foreign host_api;
PerformLumiActionHost :: (action: LumiAction) -> bool #foreign host_api;
AppendLumiChatHost :: (text: string, user: bool) #foreign host_api;
LumiLocaleHost :: (key: string) -> string #foreign host_api;
ReadLumiToolsHost :: () -> LumiTools #foreign host_api;
SetLumiHabitChoiceHost :: (choosing: bool) #foreign host_api;
SetLumiDiaryChoiceHost :: (choosing: bool) #foreign host_api;
StartLumiOnlineHost :: (input: string) -> bool #foreign host_api;
LumiAskHabit :: (tools: LumiTools) {
if tools.habit_count == 0 {
SetLumiHabitChoiceHost(false)
AppendLumiChatHost(LumiLocaleHost("lumi_no_habits"), false)
return
}
SetLumiHabitChoiceHost(true)
out: Vec(u8)
BuilderPrint(*out, "%", LumiLocaleHost("lumi_choose_habit"))
for index: cast(s32)0..tools.habit_count - 1 {
habit := ReadLumiHabitHost(index)
if out.count + habit.title.count + 6 >= LUMI_INPUT_MAX {
AppendLumiChatHost(BuilderFinish(out), false)
out = Vec(u8).{}
}
BuilderPrint(*out, "\n• %", habit.title)
}
AppendLumiChatHost(BuilderFinish(out), false)
}
LumiCommandSet :: () -> LumiCommands {
return LumiCommands.{.add = LumiLocaleHost("lumi_add"),
.complete = LumiLocaleHost("lumi_complete"), .reopen = LumiLocaleHost("lumi_reopen"),
.complete_habit = LumiLocaleHost("lumi_complete_habit"),
.start_whm = LumiLocaleHost("lumi_start_whm"),
.start_meditation = LumiLocaleHost("lumi_start_meditation"),
.start_sun = LumiLocaleHost("lumi_start_sun"), .start_patterns = LumiLocaleHost("lumi_start_patterns"),
.lists = LumiLocaleHost("lumi_open_lists"), .habits = LumiLocaleHost("lumi_open_habits"),
.practices = LumiLocaleHost("lumi_open_practices"), .diary = LumiLocaleHost("lumi_open_diary"),
.write_diary = LumiLocaleHost("lumi_write_diary"),
.settings = LumiLocaleHost("lumi_open_settings"), .appearance = LumiLocaleHost("lumi_open_appearance"),
.theme = LumiLocaleHost("lumi_theme"), .dark = LumiLocaleHost("lumi_dark"),
.light = LumiLocaleHost("lumi_light"), .system = LumiLocaleHost("lumi_system"),
.progress = LumiLocaleHost("lumi_show_progress"), .donations = LumiLocaleHost("lumi_show_donations")}
}
LumiRespond :: (input: string) {
input = LumiTrim(input)
if input.count == 0 || input.count >= LUMI_INPUT_MAX {
return
}
AppendLumiChatHost(input, true)
tools := ReadLumiToolsHost()
help_requested := LumiEqual(input, "help") || LumiEqual(input, "/help") || LumiEqual(input, "how can you help?")
if (tools.choosing_diary || tools.choosing_habit) &&
(LumiEqual(input, "/cancel") || LumiEqual(input, "cancel") || LumiEqual(input, LumiLocaleHost("cancel_button"))) {
SetLumiDiaryChoiceHost(false)
SetLumiHabitChoiceHost(false)
AppendLumiChatHost(LumiLocaleHost("lumi_cancelled"), false)
return
}
action := LumiIntent(input, LumiCommandSet())
if tools.choosing_diary && !help_requested {
action = LumiAction.{.kind = LUMI_WRITE_DIARY, .title = input}
} else if action.kind == 0 && tools.choosing_habit && !help_requested {
action = LumiAction.{.kind = LUMI_COMPLETE_HABIT, .title = input}
}
reply := ifx help_requested then "lumi_help" else "lumi_unknown"
if action.kind != 0 && !LumiActionAvailable(action, tools.available_apps) {
action.kind = 0
reply = "lumi_unavailable"
}
if action.kind == LUMI_COMPLETE_HABIT && action.title.count == 0 {
SetLumiDiaryChoiceHost(false)
LumiAskHabit(tools)
return
}
if action.kind == LUMI_WRITE_DIARY && action.title.count == 0 {
SetLumiHabitChoiceHost(false)
SetLumiDiaryChoiceHost(true)
AppendLumiChatHost(LumiLocaleHost("lumi_diary_prompt"), false)
return
}
if action.kind == LUMI_COMPLETE_TODO || action.kind == LUMI_REOPEN_TODO || action.kind == LUMI_COMPLETE_HABIT {
count := ifx action.kind == LUMI_COMPLETE_HABIT then tools.habit_count else tools.task_count
matches: s32 = 0
exact_matches: s32 = 0
id: string
exact_id: string
for index: cast(s32)0..count - 1 {
task := ifx action.kind == LUMI_COMPLETE_HABIT then ReadLumiHabitHost(index) else ReadLumiTaskHost(index)
eligible := action.kind == LUMI_COMPLETE_HABIT || (action.kind == LUMI_COMPLETE_TODO && !task.done) ||
(action.kind == LUMI_REOPEN_TODO && task.done)
if eligible && LumiStarts(task.title, action.title) {
matches += 1
id = task.id
if LumiEqual(task.title, action.title) {
exact_matches += 1
exact_id = task.id
}
}
}
if exact_matches == 1 {
action.id = exact_id
} else if exact_matches == 0 && matches == 1 {
action.id = id
} else {
reply = ifx matches == 0 then "lumi_not_found" else "lumi_ambiguous"
action.kind = 0
if tools.choosing_habit {
SetLumiHabitChoiceHost(true)
}
}
}
if action.kind != 0 {
if PerformLumiActionHost(action) {
SetLumiHabitChoiceHost(false)
SetLumiDiaryChoiceHost(false)
if action.kind == LUMI_SHOW_PROGRESS || action.kind == LUMI_SHOW_DONATIONS {
// These tools already appended their typed card to the chat.
return
}
reply = "lumi_opened"
if action.kind == LUMI_ADD_TODO {
reply = "lumi_added"
} else if action.kind == LUMI_COMPLETE_TODO {
reply = "lumi_completed"
} else if action.kind == LUMI_REOPEN_TODO {
reply = "lumi_reopened"
} else if action.kind == LUMI_COMPLETE_HABIT {
reply = "lumi_habit_completed"
} else if action.kind == LUMI_SET_THEME || action.kind == LUMI_SET_MODE {
reply = "lumi_settings_changed"
} else if action.kind == LUMI_START_PRACTICE {
reply = "lumi_practice_started"
} else if action.kind == LUMI_WRITE_DIARY {
reply = "lumi_diary_saved"
} else if action.kind == LUMI_REPORT_FEEDBACK {
reply = "lumi_feedback_confirm"
}
} else {
reply = "lumi_unavailable"
}
}
if action.kind == 0 && !help_requested && StartLumiOnlineHost(input) {
return
}
if reply == "lumi_help" {
out: Vec(u8)
BuilderPrint(*out, "%", LumiLocaleHost(reply))
commands := LumiCommandSet()
if (tools.available_apps & LUMI_PRACTICES) != 0 {
BuilderPrint(*out, "\n%", commands.start_whm)
}
if (tools.available_apps & LUMI_HABITS) != 0 {
BuilderPrint(*out, " · %", commands.complete_habit)
}
if (tools.available_apps & LUMI_LISTS) != 0 {
BuilderPrint(*out, " · %", commands.add)
}
if (tools.available_apps & LUMI_DIARY) != 0 {
BuilderPrint(*out, " · %", commands.write_diary)
}
if (tools.available_apps & LUMI_PRACTICES) != 0 {
BuilderPrint(*out, "\n/progress sessions 7 · /progress meditation 30 · /progress retention 7")
}
if (tools.available_apps & LUMI_HABITS) != 0 {
BuilderPrint(*out, "\n/progress habits 7")
}
BuilderPrint(*out, "\n%", commands.donations)
AppendLumiChatHost(BuilderFinish(out), false)
} else {
AppendLumiChatHost(LumiLocaleHost(reply), false)
}
}
#program_export "LumiMain"
Main :: () -> s32 {
message := ReadLumiHost()
if message.abi != MODULE_ABI {
return -1
}
if message.action == MODULE_IDENTIFY {
return MODULE_LUMI
}
message.succeeded = true
if message.action == LUMI_ROUTE {
message.succeeded = message.screen == ScreenLumi
} else if message.action == LUMI_FRAME {
message = LumiView(message, LumiCommandSet())
if message.action == LUMI_SEND {
LumiRespond(message.input)
}
} else if message.action == LUMI_SEND {
LumiRespond(message.input)
} else {
message.succeeded = false
}
WriteLumiHost(message)
return 0
}
+392
View File
@@ -0,0 +1,392 @@
#import "geometry"
#import "drawing_props"
#import "layout"
#import "image_props"
#import "image_widget"
#import "text_props"
#import "text_widget"
#import "text_align"
#import "text_input_props"
#import "text_area_widget"
#import "button_props"
#import "button_widget"
#import "control_props"
#import "box_props"
#import "box_widget"
#import "scroll_props"
#import "scroll_widget"
#import "tree"
#import "text"
#import "byte_text_linux"
#import "vec"
#import, file "../../src/cells/lumi_types.zi";
#import, file "../../src/cells/lumi_ui_types.zi";
#import, file "../../src/cells/lumi_chart.zi";
#import, file "engine.zi";
#import, file "message_text.zi";
using ImageFit;
using TextWrap;
using ButtonTone;
using ButtonEmphasis;
host_api :: #system_library "host_api";
ReadLumiUiHost :: () -> LumiUiFrame #foreign host_api;
WriteLumiUiHost :: (frame: LumiUiFrame) #foreign host_api;
ReadLumiChatRowHost :: (index: s32) -> LumiChatRow #foreign host_api;
ReadLumiSuggestionTaskHost :: (index: s32) -> LumiTask #foreign host_api;
ReadLumiSuggestionHabitHost :: (index: s32) -> LumiTask #foreign host_api;
LumiViewLocaleHost :: (key: string) -> string #foreign host_api;
LumiFeedbackChoiceHost :: (id: string, action: s32) -> bool #foreign host_api;
LumiLoadOlderHost :: () -> bool #foreign host_api;
LumiFirstVisibleRowHost :: (scroll: s32) -> s32 #foreign host_api;
LumiRowOffsetHost :: (index: s32) -> s32 #foreign host_api;
ReadLumiDonationHost :: (coin: s32) -> LumiDonation #foreign host_api;
LumiDonationActionHost :: (coin: s32, action: s32) -> bool #foreign host_api;
frame: LumiUiFrame;
chart_selected_key: u64;
chart_selected_point: s32;
donation_notice: string;
donation_notice_row: s32 = -1;
Scale :: (value: s32) -> s32 {
return cast(s32)(cast(float32)value * frame.scale)
}
Bounds :: (x: s32, y: s32, width: s32, height: s32) -> Rectangle {
return Rectangle.{cast(float32)x, cast(float32)y, cast(float32)width, cast(float32)height}
}
Suggestion :: (id: s32, text: string, bounds: Rectangle, label: string = "") -> bool {
if Button(frame.session, ButtonProps.{.id = id, .bounds = bounds,
.label = ifx label.count > 0 then label else text, .pill = true, .tone = cast(ButtonTone)ButtonToneNeutral,
.emphasis = cast(ButtonEmphasis)ButtonEmphasisSoft}) != 0 {
frame.value = text
frame.cursor = cast(s32)text.count
frame.anchor = frame.cursor
frame.input_scroll = 0
frame.selecting = false
frame.preferred_x_valid = false
frame.focused = true
return true
}
return false
}
ChartDate :: (date: s32) -> string {
out: Vec(u8)
month := date / 100 % 100
day := date % 100
BuilderPrint(*out, "%-", date / 10000)
BuilderPrint(*out, "%", ifx month < 10 then "0" else "")
BuilderPrint(*out, "%-", month)
BuilderPrint(*out, "%", ifx day < 10 then "0" else "")
BuilderPrint(*out, "%", day)
// Keep date labels independent of the host's locale and timezone.
text := BuilderFinish(out)
return text
}
ProgressCard :: (row: LumiChatRow, index: s32, x: s32, y: s32, width: s32) {
chart := LumiChartRead(row.payload)
if !chart.valid {
return
}
key := 330000 + index * 64
selection_key := KeyHash(row.payload)
selected := ifx chart_selected_key == selection_key then chart_selected_point else 0
if selected < 0 || selected >= chart.count {
selected = 0
}
plot_y := y + Scale(30)
plot_height := Scale(130)
step := cast(float32)width / cast(float32)chart.count
for point: cast(s32)0..chart.count - 1 {
left := x + cast(s32)(cast(float32)point * step)
bar_width := cast(s32)step - Scale(2)
if bar_width < 1 {
bar_width = 1
}
bar_height: s32 = 0
if chart.maximum > 0 {
bar_height = cast(s32)(cast(float64)chart.values[point] / cast(float64)chart.maximum * cast(float64)plot_height)
}
if Button(frame.session, ButtonProps.{.id = 310000 + index * 32 + point,
.bounds = Bounds(left, plot_y, cast(s32)step, plot_height), .invisible = true}) != 0 {
selected = point
chart_selected_key = selection_key
chart_selected_point = point
}
Box(frame.session, BoxProps.{.key = cast(u64)(key + point),
.bounds = Bounds(left, plot_y + plot_height - bar_height, bar_width, bar_height),
.fill = ifx selected == point then Color.{93, 148, 110, 255} else Color.{156, 188, 143, 200},
.radius = cast(float32)Scale(2)})
}
Box(frame.session, BoxProps.{.key = cast(u64)(key + 31),
.bounds = Bounds(x, plot_y + plot_height, width, Scale(1)), .fill = Color.{156, 156, 156, 120}})
summary: Vec(u8)
BuilderPrint(*summary, "% · %", ChartDate(chart.dates[selected]), chart.values[selected])
Text(frame.session, TextProps.{.key = cast(u64)(key + 32),
.bounds = Bounds(x, y, width, Scale(24)), .text = BuilderFinish(summary), .font = Scale(14)})
half := width / 2
Text(frame.session, TextProps.{.key = cast(u64)(key + 33),
.bounds = Bounds(x, plot_y + plot_height + Scale(6), half, Scale(22)),
.text = ChartDate(chart.dates[0]), .font = Scale(12)})
Text(frame.session, TextProps.{.key = cast(u64)(key + 34),
.bounds = Bounds(x + half, plot_y + plot_height + Scale(6), width - half, Scale(22)),
.text = ChartDate(chart.dates[chart.count - 1]), .font = Scale(12)})
if chart.maximum == 0 {
Text(frame.session, TextProps.{.key = cast(u64)(key + 35),
.bounds = Bounds(x, y + Scale(196), width, Scale(40)),
.text = LumiViewLocaleHost("lumi_chart_empty"), .font = Scale(14)})
}
}
DonationCard :: (index: s32, x: s32, y: s32, width: s32) {
labels: [3]string = .[LumiViewLocaleHost("copy_address_button"),
LumiViewLocaleHost("open_wallet_button"), LumiViewLocaleHost("trocador_button")]
for coin: cast(s32)0..cast(s32)1 {
donation := ReadLumiDonationHost(coin)
address := donation.address
if width < Scale(360) && address.count > 42 {
abbreviated: Vec(u8)
BuilderPrint(*abbreviated, "%…%", address[:16], address[address.count - 12:])
address = BuilderFinish(abbreviated)
}
key := 340000 + index * 16 + coin * 8
Text(frame.session, TextProps.{.key = cast(u64)key,
.bounds = Bounds(x, y, width, Scale(24)), .text = donation.name, .font = frame.font})
Text(frame.session, TextProps.{.key = cast(u64)(key + 1),
.bounds = Bounds(x, y + Scale(26), width, Scale(62)),
.text = address, .font = Scale(12), .selectable = true})
for action: cast(s32)0..cast(s32)2 {
if Button(frame.session, ButtonProps.{.id = 320000 + index * 8 + coin * 3 + action,
.bounds = Bounds(x, y + Scale(92 + action * 46), width, Scale(42)),
.label = labels[action], .tone = cast(ButtonTone)ButtonToneNeutral,
.emphasis = cast(ButtonEmphasis)ButtonEmphasisSoft}) != 0 {
succeeded := LumiDonationActionHost(coin, action)
donation_notice_row = index
donation_notice = ""
if action == 0 && succeeded {
donation_notice = "address_copied"
} else if !succeeded {
donation_notice = ifx action == 1 then "wallet_not_installed_toast" else "lumi_unavailable"
}
}
}
y += Scale(232)
}
if donation_notice_row == index && donation_notice.count > 0 {
Text(frame.session, TextProps.{.key = cast(u64)(340000 + index * 16 + 15),
.bounds = Bounds(x, y, width, Scale(36)),
.text = LumiViewLocaleHost(donation_notice), .font = Scale(12)})
}
}
LumiView :: (message: LumiMessage, commands: LumiCommands) -> LumiMessage {
frame = ReadLumiUiHost()
column := CenteredColumnFor(frame.width, Scale(720), Scale(16))
x := column.x
width := column.width
input_height := Scale(48)
measured_height := frame.draft_height + Scale(24)
if measured_height > input_height {
input_height = measured_height
}
if input_height > Scale(144) {
input_height = Scale(144)
}
footer := frame.height - frame.bottom - Scale(16) - input_height
suggestions_top := footer - Scale(ifx LumiTrim(frame.value).count > 0 then 46 else 0)
history_top := Scale(12)
chat_height := suggestions_top - history_top - Scale(8)
if chat_height < Scale(60) {
chat_height = Scale(60)
}
history := Scroll(frame.session, ScrollProps.{.key = cast(u64)300100,
.bounds = Bounds(x, history_top, width, chat_height),
.content_height = frame.history_height, .scroll_offset = frame.scroll, .scale = frame.scale})
frame.scroll = history.scroll_offset
frame.follow_end = history.scroll_offset == history.max_scroll
if history.opened {
first := LumiFirstVisibleRowHost(history.scroll_offset)
top := cast(s32)history.content.y + LumiRowOffsetHost(first)
for index: first..frame.chat_count - 1 {
if top > history_top + chat_height {
break
}
row := ReadLumiChatRowHost(index)
row_height := row.height
bubble_width := width - Scale(ifx row.user then 60 else 80)
left := x + Scale(48)
if !row.user {
Image(frame.session, ImageProps.{.key = cast(u64)(300400 + index * 4),
.asset_path = "assets/lumi/mascot.png", .alt_text = "Lumi",
.bounds = Bounds(x, top + row_height - Scale(54), Scale(40), Scale(40)),
.source = Rectangle.{0.0, 0.0, -1254.0, 1254.0},
.fit = cast(ImageFit)ImageFitContain})
}
Box(frame.session, BoxProps.{.key = cast(u64)(300401 + index * 4),
.bounds = Bounds(left, top, bubble_width, row_height - Scale(10)),
.fill = ifx row.user then Color.{156, 188, 143, 48} else Color.{156, 156, 156, 24},
.radius = cast(float32)Scale(16)})
if !row.user {
Text(frame.session, TextProps.{.key = cast(u64)(300402 + index * 4),
.bounds = Bounds(left + Scale(14), top + Scale(8),
bubble_width - Scale(28), Scale(20)), .text = "Lumi", .font = Scale(12)})
}
text_top := Scale(ifx row.user then 12 else 32)
card_height := Scale(ifx row.kind == LUMI_CHAT_PROGRESS then 242 else
ifx row.kind == LUMI_CHAT_DONATIONS then 500 else ifx row.kind == LUMI_CHAT_FEEDBACK then 54 else 0)
text_height := row_height - text_top - Scale(16) - card_height
formatted := LumiFormatMessage(row.text, !row.user)
Text(frame.session, TextProps.{.key = cast(u64)(300403 + index * 4),
.bounds = Bounds(left + Scale(14), top + text_top,
bubble_width - Scale(28), text_height),
.text = TextFromBytes(formatted.bytes[:formatted.count]),
.strong = formatted.strong[:formatted.strong_count],
.font = frame.font, .selectable = true, .wrap = cast(TextWrap)TextWrapAuto})
card_top := top + text_top + text_height + Scale(8)
if row.kind == LUMI_CHAT_PROGRESS {
ProgressCard(row, index, left + Scale(14), card_top, bubble_width - Scale(28))
} else if row.kind == LUMI_CHAT_DONATIONS {
DonationCard(index, left + Scale(14), card_top, bubble_width - Scale(28))
} else if row.kind == LUMI_CHAT_FEEDBACK {
pending := LumiFeedbackChoiceHost(row.payload, 0)
if Button(frame.session, ButtonProps.{.id = 351000 + index * 2,
.bounds = Bounds(left + Scale(14), card_top, Scale(88), Scale(44)),
.label = LumiViewLocaleHost("lumi_feedback_yes"), .disabled = !pending}) != 0 {
unused LumiFeedbackChoiceHost(row.payload, 1)
}
if Button(frame.session, ButtonProps.{.id = 351001 + index * 2,
.bounds = Bounds(left + Scale(108), card_top, Scale(88), Scale(44)),
.label = LumiViewLocaleHost("lumi_feedback_no"), .disabled = !pending}) != 0 {
unused LumiFeedbackChoiceHost(row.payload, 2)
}
}
top += row_height
}
End(frame.session)
}
typed := LumiTrim(frame.value)
candidates: [20]string = .[commands.start_whm, commands.complete_habit,
commands.start_meditation, commands.start_sun, commands.start_patterns,
commands.add, commands.complete, commands.reopen,
commands.lists, commands.habits, commands.practices, commands.diary,
commands.settings, commands.appearance, commands.dark, commands.light, commands.system, commands.write_diary,
commands.progress, commands.donations]
requirements: [20]s32 = .[LUMI_PRACTICES, LUMI_HABITS, LUMI_PRACTICES,
LUMI_PRACTICES, LUMI_PRACTICES, LUMI_LISTS, LUMI_LISTS, LUMI_LISTS,
LUMI_LISTS, LUMI_HABITS, LUMI_PRACTICES, LUMI_DIARY, 0, 0, 0, 0, 0, LUMI_DIARY, LUMI_PRACTICES, 0]
suggestion_count: s32 = 0
selected: bool
limit: s32 = 2
chip_width := (width - Scale(8)) / limit
action := LumiIntent(typed, commands)
if action.kind == 0 && frame.choosing_habit {
action = LumiAction.{.kind = LUMI_COMPLETE_HABIT, .title = typed}
}
if typed.count > 0 && !frame.choosing_diary && LumiActionAvailable(action, frame.available_apps) &&
(action.kind == LUMI_COMPLETE_TODO || action.kind == LUMI_REOPEN_TODO || action.kind == LUMI_COMPLETE_HABIT) {
count := ifx action.kind == LUMI_COMPLETE_HABIT then frame.habit_count else frame.task_count
for index: cast(s32)0..count - 1 {
if suggestion_count >= limit {
break
}
task := ifx action.kind == LUMI_COMPLETE_HABIT then ReadLumiSuggestionHabitHost(index) else ReadLumiSuggestionTaskHost(index)
eligible := action.kind == LUMI_COMPLETE_HABIT || (action.kind == LUMI_COMPLETE_TODO && !task.done) ||
(action.kind == LUMI_REOPEN_TODO && task.done)
if !eligible || !LumiStarts(task.title, action.title) || suggestion_count >= limit {
continue
}
out: Vec(u8)
command := commands.reopen
if action.kind == LUMI_COMPLETE_HABIT {
command = commands.complete_habit
} else if action.kind == LUMI_COMPLETE_TODO {
command = commands.complete
}
BuilderPrint(*out, "% %", command, task.title)
completion := BuilderFinish(out)
selected = Suggestion(30020 + suggestion_count, completion,
Bounds(x + suggestion_count * (chip_width + Scale(8)), suggestions_top, chip_width, Scale(36)), task.title) || selected
suggestion_count += 1
}
}
for index: cast(s32)0..cast(s32)19 {
if typed.count == 0 || frame.choosing_diary || action.kind == LUMI_COMPLETE_HABIT || suggestion_count >= limit {
break
}
candidate_action := LumiIntent(candidates[index], commands)
practice_match := action.kind == LUMI_START_PRACTICE && candidate_action.kind == LUMI_START_PRACTICE &&
action.practice == candidate_action.practice
if (requirements[index] != 0 && (frame.available_apps & requirements[index]) == 0) || suggestion_count >= limit ||
(typed.count > 0 && !LumiSuggests(candidates[index], typed) && !practice_match) {
continue
}
text := candidates[index]
if index == 1 || (index >= 5 && index <= 7) {
out: Vec(u8)
BuilderPrint(*out, "% ", text)
text = BuilderFinish(out)
}
selected = Suggestion(30030 + index, text,
Bounds(x + suggestion_count * (chip_width + Scale(8)), suggestions_top, chip_width, Scale(36))) || selected
suggestion_count += 1
}
field := TextArea(frame.session, TextAreaProps.{.key = cast(u64)300200, .focus_id = 30010,
.bounds = Bounds(x, footer, width - Scale(80), input_height),
.value = frame.value, .placeholder = LumiViewLocaleHost("lumi_placeholder"), .label = "Lumi",
.cursor = frame.cursor, .anchor = frame.anchor, .scroll_y = frame.input_scroll,
.selecting = frame.selecting, .preferred_x = frame.preferred_x,
.preferred_x_valid = frame.preferred_x_valid, .wrap = true,
.focused = frame.focused, .input = frame.input, .max_bytes = LUMI_INPUT_MAX - 1,
.max_codepoints = LUMI_INPUT_MAX - 1})
if !selected {
if field.edit.changed && field.edit.start >= 0 && field.edit.end >= field.edit.start &&
field.edit.end <= frame.value.count {
out: Vec(u8)
BuilderPrint(*out, "%", frame.value[:field.edit.start])
BuilderPrint(*out, "%", field.edit.replacement)
BuilderPrint(*out, "%", frame.value[field.edit.end:])
replacement := BuilderFinish(out)
if replacement.count < LUMI_INPUT_MAX {
frame.value = replacement
}
}
frame.cursor = field.cursor
frame.anchor = field.anchor
frame.input_scroll = field.scroll_y
frame.selecting = field.selecting
frame.preferred_x = field.preferred_x
frame.preferred_x_valid = field.preferred_x_valid
frame.focused = field.focused
}
frame.clipboard_write = field.clipboard_write
frame.clipboard_text = field.clipboard_text
send := Button(frame.session, ButtonProps.{.id = 30011,
.bounds = Bounds(x + width - Scale(72), footer, Scale(72), Scale(48)),
.label = LumiViewLocaleHost("lumi_send"), .disabled = frame.waiting,
.loading = frame.waiting, .tone = cast(ButtonTone)ButtonToneNeutral,
.emphasis = cast(ButtonEmphasis)ButtonEmphasisSoft}) != 0
if !frame.waiting && (send || field.committed) && LumiTrim(frame.value).count > 0 && !selected {
message.action = LUMI_SEND
// The host owns the draft buffer. Keep the submitted text before
// WriteLumiUiHost clears that buffer for the next message.
submitted: Vec(u8)
BuilderPrint(*submitted, "%", frame.value)
message.input = BuilderFinish(submitted)
frame.value = ""
frame.cursor = 0
frame.anchor = 0
frame.input_scroll = 0
frame.selecting = false
frame.preferred_x_valid = false
frame.scroll = 1000000
frame.follow_end = true
}
WriteLumiUiHost(frame)
if message.action != LUMI_SEND && frame.has_older && !frame.follow_end && frame.scroll <= Scale(96) {
unused LumiLoadOlderHost()
}
return message
}
+90
View File
@@ -0,0 +1,90 @@
// Reply emphasis is presentation only. Stored messages remain verbatim, and
// typed messages and code keep their literal text.
#import "text_props"
#import "byte_text_linux"
#import, file "../../src/cells/lumi_types.zi";
LumiMessageText :: struct {
bytes: [LUMI_INPUT_MAX]u8
count: s32
strong: [256]TextRange
strong_count: s32
}
LumiTextEscaped :: (value: string, at: s32) -> bool {
slashes: s32 = 0
at -= 1
while at >= 0 && value[at] == cast(u8)92 {
slashes += 1
at -= 1
}
return slashes % 2 == 1
}
LumiTextMarker :: (value: string, at: s32) -> bool {
if at < 0 || at + 1 >= value.count || LumiTextEscaped(value, at) {
return false
}
marker := value[at]
return (marker == cast(u8)42 || marker == cast(u8)95) && value[at + 1] == marker &&
(at == 0 || value[at - 1] != marker) &&
(at + 2 >= value.count || value[at + 2] != marker)
}
LumiTextClosing :: (value: string, at: s32) -> s32 {
marker := value[at]
start := at + 2
if start >= value.count || value[start] <= cast(u8)32 {
return -1
}
code: bool
while start + 1 < value.count {
if value[start] == cast(u8)96 && !LumiTextEscaped(value, start) {
code = !code
}
if !code && value[start] == marker && LumiTextMarker(value, start) &&
start > at + 2 && value[start - 1] > cast(u8)32 {
return start
}
start += 1
}
return -1
}
LumiFormatMessage :: (value: string, formatted: bool) -> LumiMessageText {
result: LumiMessageText
at: s32 = 0
code: bool
while at < value.count && result.count < LUMI_INPUT_MAX - 1 {
byte := value[at]
if formatted && byte == cast(u8)96 && !LumiTextEscaped(value, at) {
code = !code
}
if formatted && !code && LumiTextMarker(value, at) && result.strong_count < 256 {
end := LumiTextClosing(value, at)
if end >= 0 {
range := TextRange.{.start = result.count}
at += 2
while at < end && result.count < LUMI_INPUT_MAX - 1 {
result.bytes[result.count] = value[at]
result.count += 1
at += 1
}
range.end = result.count
result.strong[result.strong_count] = range
result.strong_count += 1
at = end + 2
continue
}
}
if formatted && byte == cast(u8)92 && at + 1 < value.count &&
(value[at + 1] == cast(u8)42 || value[at + 1] == cast(u8)95 || value[at + 1] == cast(u8)92) {
at += 1
byte = value[at]
}
result.bytes[result.count] = byte
result.count += 1
at += 1
}
return result
}
+85
View File
@@ -0,0 +1,85 @@
// Bounded, case-insensitive regex matching for Lumi's fixed command patterns.
// Supports anchors, character classes, escapes and ?, * and + quantifiers.
RegexAtom :: struct {
after: s32
matches: bool
}
RegexLower :: (byte: u8) -> u8 {
return ifx byte >= 65 && byte <= 90 then byte + cast(u8)32 else byte
}
RegexReadAtom :: (pattern: string, at: s32, value: u8) -> RegexAtom {
atom := RegexAtom.{.after = at + 1}
byte := pattern[at]
if byte == cast(u8)92 && at + 1 < pattern.count {
atom.after += 1
escaped := pattern[at + 1]
atom.matches = ifx escaped == cast(u8)115 then value == 32 || value == 9 || value == 10 || value == 13 else RegexLower(escaped) == RegexLower(value)
} else if byte == cast(u8)91 {
cursor := at + 1
while cursor < pattern.count && pattern[cursor] != cast(u8)93 {
if RegexLower(pattern[cursor]) == RegexLower(value) {
atom.matches = true
}
cursor += 1
}
atom.after = cursor + 1
} else {
atom.matches = byte == cast(u8)46 || RegexLower(byte) == RegexLower(value)
}
return atom
}
RegexHere :: (pattern: string, at: s32, input: string, position: s32, budget: *s32) -> bool {
budget.* -= 1
if budget.* <= 0 {
return false
}
if at >= pattern.count {
return true
}
if pattern[at] == cast(u8)36 && at + 1 == pattern.count {
return position == input.count
}
atom := RegexReadAtom(pattern, at, ifx position < input.count then input[position] else cast(u8)0)
if atom.after > pattern.count {
return false
}
quantifier := ifx atom.after < pattern.count then pattern[atom.after] else cast(u8)0
if quantifier == 42 || quantifier == 43 || quantifier == 63 {
minimum := ifx quantifier == 43 then 1 else 0
maximum: s32 = 0
while position + maximum < input.count &&
RegexReadAtom(pattern, at, input[position + maximum]).matches {
maximum += 1
if quantifier == 63 {
break
}
}
while maximum >= minimum {
if RegexHere(pattern, atom.after + 1, input, position + maximum, budget) {
return true
}
maximum -= 1
}
return false
}
return position < input.count && atom.matches && RegexHere(pattern, atom.after, input, position + 1, budget)
}
RegexMatch :: (pattern: string, input: string) -> bool {
if pattern.count == 0 || pattern.count > 128 || input.count >= 1024 {
return false
}
budget: s32 = 8192
if pattern[0] == cast(u8)94 {
return RegexHere(pattern, 1, input, 0, *budget)
}
for position: cast(s32)0..cast(s32)input.count {
if RegexHere(pattern, 0, input, position, *budget) {
return true
}
}
return false
}
+22
View File
@@ -0,0 +1,22 @@
# Changelog
## [1.1.3] - 2026-10-07
- Keep app labels and content visible after updating Inner Breeze.
## [1.1.2] - 2026-10-07
- Keep all four Sun Salutation characters and smooth movement in a smaller offline package.
- Keep older installations on their working practice graphics until the app is upgraded.
## [1.1.1] - 2026-10-06
- Use Cells consistently in the cell and its independently delivered package.
## [1.1.0] - 2026-10-06
- Practice banners, characters and sounds now travel with Practices and update with its package.
## [1.0.0] - 2026-10-06
- First independently versioned Practices module.
+69
View File
@@ -0,0 +1,69 @@
// The live practice clocks run in this bundle; the unified host performs
// audio, notification, session-save and mobile lifecycle effects.
#import, file "../../src/cells/practice_types.zi";
#import, file "../../src/core/breath_timing.zi";
#import, file "../../src/practices/meditation/meditation_timing.zi";
#import, file "../../src/practices/patterns/patterns_clock.zi";
#import, file "../../src/cells/module_types.zi";
#import, file "../../src/core/types.zi";
#import, file "../../src/practices/sun_salutation/sun_salutation_rules.zi";
host_api :: #system_library "host_api";
ReadPracticeHost :: () -> PracticeMessage #foreign host_api;
WritePracticeHost :: (message: PracticeMessage) #foreign host_api;
SunSalutationStoredFrame :: (timeline_frame: s32) -> s32 #foreign host_api;
PracticeApply :: (message: PracticeMessage) -> PracticeMessage {
message.succeeded = true
if message.action == PRACTICE_ROUTE {
message.succeeded = message.screen == ScreenStart || message.screen == ScreenSession ||
message.screen == ScreenMeditation || message.screen == ScreenSunSalutation ||
message.screen == ScreenPatterns || message.screen == ScreenResults ||
message.screen == ScreenPracticeConfig || message.screen == ScreenManual
return message
}
if message.paused {
return message
}
if message.action == PRACTICE_BREATH_STEP {
message.breathing = BreathSessionStep(message.breathing)
message.completed = message.breathing.completed != 0
} else if message.action == PRACTICE_MEDITATION_STEP {
next := AdvanceMeditationTime(message.remaining_seconds,
message.remainder_ms, message.elapsed_ms)
message.remaining_seconds = next.remaining_seconds
message.remainder_ms = next.remainder_ms
message.elapsed_seconds = next.elapsed_seconds
message.completed = next.completed
} else if message.action == PRACTICE_SALUTATION_STEP {
next := SalutationAdvance(message.salutation, message.elapsed)
message.salutation = next.state
message.completed = next.completed != 0
} else if message.action == PRACTICE_PATTERNS_STEP {
next := PatternsAdvance(message.patterns)
message.patterns = next.state
message.cue = next.cue
message.completed = next.completed
} else {
message.succeeded = false
}
return message
}
#program_export "PracticeMain"
Main :: () -> s32 {
message := ReadPracticeHost()
if message.abi != MODULE_ABI {
return -1
}
if message.action == MODULE_IDENTIFY {
// The smaller frame inventory needs the wrapper's frame mapping.
// Older wrappers reject this required capability before replacing
// their working package.
if SunSalutationStoredFrame(0) != 0 {
return -1
}
return MODULE_PRACTICE
}
WritePracticeHost(PracticeApply(message))
return 0
}
+14
View File
@@ -0,0 +1,14 @@
[
{
"key_id": "inbe-2026-10",
"public_key": "d9a549043c0ac91a5197d85053a815c831d342a1082143c2bd1ffd43e1e6f145",
"app_ids": [
"inbe",
"inbe.habits",
"inbe.practices",
"inbe.lists",
"inbe.diary",
"inbe.lumi"
]
}
]
+42
View File
@@ -0,0 +1,42 @@
{
"host_api": 4,
"module_api": 2,
"apps": {
"inbe": {
"id": "inbe",
"version": "2.1.17",
"sequence": 14,
"bundled": true
},
"habits": {
"id": "inbe.habits",
"version": "1.0.3",
"sequence": 4,
"bundled": true
},
"practices": {
"id": "inbe.practices",
"version": "1.1.3",
"sequence": 5,
"bundled": true
},
"lists": {
"id": "inbe.lists",
"version": "1.0.3",
"sequence": 4,
"bundled": true
},
"diary": {
"id": "inbe.diary",
"version": "1.1.2",
"sequence": 4,
"bundled": true
},
"lumi": {
"id": "inbe.lumi",
"version": "1.3.2",
"sequence": 9,
"bundled": true
}
}
}
+1
View File
@@ -12,3 +12,4 @@ abcdefghijklmnopqrstuvwxyz
。,、!?:;()[]「」『』ー〜・
中文简体繁體日本語한국어
·—›
+ −
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1
View File
@@ -0,0 +1 @@
↔ →
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

+6
View File
@@ -0,0 +1,6 @@
Lumi's navigation glyph is an outlined firefly with antennae and wings.
Its 1.6-unit rounded stroke in a 24-unit view box matches the app's navigation
icons. sidebar.shape uses Kryon's vector icon format, so the sidebar applies
the same size and foreground color as other buttons. sidebar.svg contains the
same path; sidebar.png is its 64-pixel transparent export for navigation bars.
The full-color conversation avatar remains mascot.png.
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

+1
View File
@@ -0,0 +1 @@
S1.6rr:M9 7C9 5 7.5 4 6 4M15 7C15 5 16.5 4 18 4M12 7C15 7 17 9 17 12C17 15 15 17 12 17C9 17 7 15 7 12C7 9 9 7 12 7ZM9.5 12L9.5 12.1M14.5 12L14.5 12.1M10 17C10 19 11 20 12 20C13 20 14 19 14 17M7 12C4 10 3 12 4 14C4.5 16 6 17 9 16M17 12C20 10 21 12 20 14C19.5 16 18 17 15 16
+3
View File
@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path fill="none" stroke="white" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" d="M9 7C9 5 7.5 4 6 4M15 7C15 5 16.5 4 18 4M12 7C15 7 17 9 17 12C17 15 15 17 12 17C9 17 7 15 7 12C7 9 9 7 12 7ZM9.5 12L9.5 12.1M14.5 12L14.5 12.1M10 17C10 19 11 20 12 20C13 20 14 19 14 17M7 12C4 10 3 12 4 14C4.5 16 6 17 9 16M17 12C20 10 21 12 20 14C19.5 16 18 17 15 16"/>
</svg>

After

Width:  |  Height:  |  Size: 441 B

+324
View File
@@ -0,0 +1,324 @@
[
{
"name": "get_settings",
"description": "Read the current Inner Breeze theme, appearance, scale and sidebar settings.",
"inputSchema": {
"type": "object",
"properties": {},
"required": [],
"additionalProperties": false
},
"annotations": {
"readOnlyHint": true
}
},
{
"name": "set_theme",
"description": "Change and save the Inner Breeze color theme immediately.",
"inputSchema": {
"type": "object",
"properties": {
"theme": {
"type": "string",
"enum": [
"system",
"sky",
"ocean",
"forest",
"sunset",
"lavender",
"cherry",
"dawn",
"sage",
"sepia",
"mono",
"mint",
"cobalt",
"sweet"
]
}
},
"required": [
"theme"
],
"additionalProperties": false
}
},
{
"name": "set_theme_mode",
"description": "Change and save light, dark or device-following mode.",
"inputSchema": {
"type": "object",
"properties": {
"mode": {
"type": "string",
"enum": [
"system",
"light",
"dark"
]
}
},
"required": [
"mode"
],
"additionalProperties": false
}
},
{
"name": "set_setting",
"description": "Change one app preference. Scale is in tenths (5 to 25), navigation is automatic/left/bottom/right/top (0 to 4), compact sidebar is 0 or 1, style is material/classic/lightfield (1 to 3).",
"inputSchema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"enum": [
"scale",
"navigation",
"sidebar_compact",
"style"
]
},
"value": {
"type": "integer"
}
},
"required": [
"name",
"value"
],
"additionalProperties": false
}
},
{
"name": "open_view",
"description": "Open an installed view or Settings in the same Inner Breeze app. Hidden Lumi remains available.",
"inputSchema": {
"type": "object",
"properties": {
"view": {
"type": "string",
"enum": [
"lumi",
"habits",
"lists",
"practices",
"diary",
"settings",
"appearance"
]
}
},
"required": [
"view"
],
"additionalProperties": false
}
},
{
"name": "practice",
"description": "Start an installed practice, or pause/resume the active session.",
"inputSchema": {
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": [
"whm",
"meditation",
"sun_salutation",
"patterns",
"pause",
"resume"
]
}
},
"required": [
"action"
],
"additionalProperties": false
}
},
{
"name": "read_context",
"description": "Read the current app state, available apps, tasks and habits.",
"inputSchema": {
"type": "object",
"properties": {},
"required": [],
"additionalProperties": false
},
"annotations": {
"readOnlyHint": true
}
},
{
"name": "add_todo",
"description": "Add a task to the selected list.",
"inputSchema": {
"type": "object",
"properties": {
"title": {
"type": "string",
"maxLength": 255
}
},
"required": [
"title"
],
"additionalProperties": false
}
},
{
"name": "complete_todo",
"description": "Mark a task done using its exact ID.",
"inputSchema": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
{
"name": "reopen_todo",
"description": "Reopen a completed task using its exact ID.",
"inputSchema": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
{
"name": "complete_habit",
"description": "Complete a habit for today using its exact ID.",
"inputSchema": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
{
"name": "write_diary",
"description": "Append the requested text to today's diary with the current time. Preserve the user's wording.",
"inputSchema": {
"type": "object",
"properties": {
"text": {
"type": "string",
"maxLength": 1000
}
},
"required": [
"text"
],
"additionalProperties": false
}
},
{
"name": "read_diary",
"description": "Read the diary entry for a date when the user asks for it.",
"inputSchema": {
"type": "object",
"properties": {
"date": {
"type": "string",
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
}
},
"required": [
"date"
],
"additionalProperties": false
},
"annotations": {
"readOnlyHint": true
}
},
{
"name": "report_feedback",
"description": "Save an app bug report or suggestion and queue it for the developer. Preserve the original report; exclude unrelated personal data. This reports feedback; it does not fix code.",
"inputSchema": {
"type": "object",
"properties": {
"title": {
"type": "string",
"maxLength": 160
},
"message": {
"type": "string",
"maxLength": 4096
}
},
"required": [
"title",
"message"
],
"additionalProperties": false
}
},
{
"name": "show_progress_chart",
"description": "Show a daily progress chart in Lumi from the active account's saved activity. Use only when requested. Includes today, fills missing days with zero, and keeps a snapshot in chat. sessions counts practices; meditation sums meditation seconds; retention shows each day's best WHM retention in seconds; habits counts scheduled habits that reached their completion target. Do not invent values or render a text imitation of the chart.",
"inputSchema": {
"type": "object",
"properties": {
"metric": {
"type": "string",
"enum": [
"sessions",
"meditation",
"retention",
"habits"
]
},
"days": {
"type": "integer",
"minimum": 1,
"maximum": 31
}
},
"required": [
"metric",
"days"
],
"additionalProperties": false
},
"annotations": {
"readOnlyHint": true
}
},
{
"name": "show_donation_links",
"description": "Show Inner Breeze's official Bitcoin and Monero donation cards in Lumi when asked, with copy address, open wallet and Trocador browser actions. No payment or external navigation occurs until the user clicks. Use the returned official links; never invent a donation destination.",
"inputSchema": {
"type": "object",
"properties": {},
"required": [],
"additionalProperties": false
},
"annotations": {
"readOnlyHint": true
}
}
]
Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Loaded 100 of 5709 files, more files were not shown because too many files have changed in this diff. Show more