Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b8722b6b28 | ||
|
|
26047247f9 | ||
|
|
c801c62542 | ||
|
|
7601d7c58c | ||
|
|
47d77ab0ad |
No files matched your search
@@ -6,7 +6,7 @@ first.
|
||||
## Tools are separate apps
|
||||
|
||||
- Each tool lives in `apps/<tool>/` and builds into its own bundle,
|
||||
`build/apps/<tool>.zib`. A tool reaches the host only through
|
||||
`build/apps/<tool>.zx`. A tool reaches the host only through
|
||||
`shared/werk_app.zi`; the host (`src/apps.zi`) checks every call a
|
||||
bundle asks for and keeps each tool's files, assets and secret separate.
|
||||
- Tools never import another tool's modules. Code two tools need goes in
|
||||
@@ -23,9 +23,10 @@ first.
|
||||
- Never commit, print or log a real master password, Auth secret, otpauth
|
||||
link, export file or current code. Tests use fixture values only, such as
|
||||
the RFC 6238 keys.
|
||||
- Keep Pass's on-disk formats and the Android package `xyz.waozi.pass`:
|
||||
existing installations update in place and keep their saved master
|
||||
password. `src/migrate.zi` moves Pass's old files once; keep it.
|
||||
- Keep Pass's on-disk formats and `src/migrate.zi`. The owner's latest choice
|
||||
on 2026-10-23 is an update of the existing Android/F-Droid app: keep
|
||||
`xyz.waozi.pass` and its signing certificate, with the display name Werkzeug.
|
||||
Preserve existing Pass data and any separate `xyz.waozi.werk` installation.
|
||||
- Every file Werkzeug writes is private (0600 in 0700 folders).
|
||||
|
||||
## Platforms and tests
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# Changelog
|
||||
|
||||
## [0.4.4] - 2026-10-23
|
||||
|
||||
- Werkzeug updates the existing Pass Android app using its original application ID and signing certificate, keeping its saved data.
|
||||
- The app continues to appear as Werkzeug, with Pass, Auth, Calculator and Clock together.
|
||||
|
||||
## [0.4.3] - 2026-10-23
|
||||
|
||||
- Werkzeug uses its own Android application ID, `xyz.waozi.werk`.
|
||||
- Werkzeug installs alongside legacy Pass, preserving the older app and its data.
|
||||
|
||||
## [0.4.2] - 2026-10-23
|
||||
|
||||
- Linux packages include the libraries needed for sync and importing QR-code pictures.
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
.DEFAULT_GOAL := all
|
||||
ZIRAN ?= ./scripts/ziran.sh
|
||||
# Gradle invokes make again for portable bundles. Inherited environment
|
||||
# variables otherwise export these shell-derived paths while resolving them.
|
||||
unexport ZIRAN_ROOT KRYON_DIR RAYLIB_DIR MINGCUTE_DIR LIBOQS_DIR MONOCYPHER_DIR QRCODE_DIR WORKBOOK_DIR ENTITY_DIR APPS_DIR
|
||||
# Local overrides refer to the real root repositories. Published builds
|
||||
# require the exact versions recorded in the committed lock.
|
||||
LOCK_FLAGS := $(if $(wildcard ziran.local.toml),,--locked)
|
||||
@@ -50,8 +53,8 @@ cli: build/pass
|
||||
# Each app is its own bundle; Werkzeug runs them in one window. Workbook runs
|
||||
# only in the Linux desktop app, so the web and Android apps leave it out.
|
||||
APPS := pass auth calculator clock
|
||||
PORTABLE_BUNDLES := $(APPS:%=build/apps/%.zib) build/apps/entity.zib build/apps/apps.zib
|
||||
APP_BUNDLES := $(PORTABLE_BUNDLES) build/apps/workbook.zib
|
||||
PORTABLE_BUNDLES := $(APPS:%=build/apps/%.zx) build/apps/entity.zx build/apps/apps.zx
|
||||
APP_BUNDLES := $(PORTABLE_BUNDLES) build/apps/workbook.zx
|
||||
SHARED_SOURCES := $(wildcard shared/*.zi)
|
||||
APPS_UI_SOURCES = $(wildcard $(APPS_DIR)/src/*.zi $(APPS_DIR)/ui/*.zi $(APPS_DIR)/ui/locales/*.json)
|
||||
APP_MODULE_PATHS = --module-path shared --module-path kryon=$(KRYON_DIR)/src/backend --module-path kryon=$(KRYON_DIR)/src/ui --module-path $(KRYON_DIR)/src/ui --module-path $(MINGCUTE_DIR)/src --module-path $(ZIRAN_ROOT)/std
|
||||
@@ -59,7 +62,7 @@ apps: $(APP_BUNDLES)
|
||||
portable-apps: $(PORTABLE_BUNDLES)
|
||||
# Compile the shared screen with the host's compiler and UI library. The
|
||||
# reviewed payload must match both the build pin and the native host pin.
|
||||
build/apps/apps.zib: $(APPS_UI_SOURCES) $(LIBRARY_SOURCES) $(ZIRAN_RUNTIME_SOURCES) ziran.lock apps-controller.sha256 Makefile scripts/ziran.sh
|
||||
build/apps/apps.zx: $(APPS_UI_SOURCES) $(LIBRARY_SOURCES) $(ZIRAN_RUNTIME_SOURCES) ziran.lock apps-controller.sha256 Makefile scripts/ziran.sh
|
||||
mkdir -p $(@D)
|
||||
python3 '$(APPS_DIR)/scripts/generate-ui-locales.py' --check
|
||||
$(ZIRAN) bundle --root $(APPS_DIR)/ui --module-path $(APPS_DIR)/src $(APP_MODULE_PATHS) \
|
||||
@@ -67,23 +70,24 @@ build/apps/apps.zib: $(APPS_UI_SOURCES) $(LIBRARY_SOURCES) $(ZIRAN_RUNTIME_SOURC
|
||||
sha256sum $@ | cut -d ' ' -f 1 > $(@D)/apps.sha256
|
||||
test "$$(cat $(@D)/apps.sha256)" = "$$(cat apps-controller.sha256)"
|
||||
.SECONDEXPANSION:
|
||||
build/apps/%.zib: $$(wildcard apps/$$*/*.zi apps/$$*/assets/*) $(SHARED_SOURCES) $(LIBRARY_SOURCES) $(ZIRAN_RUNTIME_SOURCES) ziran.lock Makefile scripts/ziran.sh
|
||||
build/apps/%.zx: $$(wildcard apps/$$*/*.zi apps/$$*/assets/*) $(SHARED_SOURCES) $(LIBRARY_SOURCES) $(ZIRAN_RUNTIME_SOURCES) ziran.lock Makefile scripts/ziran.sh
|
||||
mkdir -p $(@D)
|
||||
$(ZIRAN) bundle --root . --module-path apps/$* $(APP_MODULE_PATHS) --define KRYON_HOSTED_UI --define WERK_APP \
|
||||
$(if $(wildcard apps/$*/assets),--asset-dir assets=apps/$*/assets) --entry $*:Main -o $@ apps/$*/$*.zi
|
||||
|
||||
build/apps/workbook.zib: $(wildcard $(WORKBOOK_DIR)/src/*.zi) $(WORKBOOK_DIR)/Makefile ziran.lock
|
||||
$(MAKE) -C $(WORKBOOK_DIR) ZIRAN=$(ZIRAN_ROOT)/build/bin/ziran bundle
|
||||
install -m 0600 $(WORKBOOK_DIR)/build/workbook.zib $@
|
||||
build/apps/workbook.zx: $(wildcard $(WORKBOOK_DIR)/src/*.zi) $(LIBRARY_SOURCES) $(ZIRAN_RUNTIME_SOURCES) ziran.lock Makefile
|
||||
mkdir -p $(@D)
|
||||
$(ZIRAN) bundle --root $(WORKBOOK_DIR) --module-path $(WORKBOOK_DIR)/src $(APP_MODULE_PATHS) \
|
||||
--module-path kryon=$(KRYON_DIR)/src/backend --define KRYON_HOSTED_UI --entry app:Main -o $@ $(WORKBOOK_DIR)/src/app.zi
|
||||
|
||||
build/apps/entity.zib: $(ENTITY_SOURCES) $(LIBRARY_SOURCES) $(ZIRAN_RUNTIME_SOURCES) ziran.lock Makefile
|
||||
build/apps/entity.zx: $(ENTITY_SOURCES) $(LIBRARY_SOURCES) $(ZIRAN_RUNTIME_SOURCES) ziran.lock Makefile
|
||||
mkdir -p $(@D)
|
||||
$(ZIRAN) bundle --root $(ENTITY_DIR) --module-path $(ENTITY_DIR)/src $(APP_MODULE_PATHS) --define KRYON_HOSTED_UI \
|
||||
--module-path qrcode=$(QRCODE_DIR)/src --asset-dir assets=$(ENTITY_DIR)/assets --entry entity:Main -o $@ $(ENTITY_DIR)/src/entity.zi
|
||||
|
||||
# The portable bundle runtime the host links, built from the locked Ziran.
|
||||
build/ziran/libziran.a: ziran.lock $(ZIRAN_RUNTIME_SOURCES)
|
||||
env -u DISPLAY -u WAYLAND_DISPLAY $(MAKE) -C $(ZIRAN_ROOT) BUILD_DIR=$(abspath build/ziran) $(abspath $@)
|
||||
env -u DISPLAY -u WAYLAND_DISPLAY -u MAKEFLAGS -u MFLAGS -u MAKEOVERRIDES $(MAKE) -C $(ZIRAN_ROOT) BUILD_DIR=$(abspath build/ziran) $(abspath $@)
|
||||
|
||||
build/generated/desktop/.complete: $(wildcard src/*.zi) $(wildcard $(WORKBOOK_DIR)/src/*.zi) $(SHARED_SOURCES) $(LIBRARY_SOURCES) $(ENTITY_SOURCES) ziran.toml ziran.lock
|
||||
rm -rf $(@D)
|
||||
@@ -133,7 +137,7 @@ gui-test: gui
|
||||
# The bundle runtime for the browser, built from the locked Ziran.
|
||||
WEB_AR ?= $(dir $(WEB_CC))emar
|
||||
build/web-runtime/libziran.a: ziran.lock
|
||||
env -u DISPLAY -u WAYLAND_DISPLAY $(MAKE) -C $(ZIRAN_ROOT) BOOTSTRAP=1 BUILD_DIR=$(abspath build/web-runtime) \
|
||||
env -u DISPLAY -u WAYLAND_DISPLAY -u MAKEFLAGS -u MFLAGS -u MAKEOVERRIDES $(MAKE) -C $(ZIRAN_ROOT) BOOTSTRAP=1 BUILD_DIR=$(abspath build/web-runtime) \
|
||||
CC=$(WEB_CC) AR=$(WEB_AR) OBJCOPY=true CFLAGS=-O2 $(abspath $@)
|
||||
build/generated/browser/.complete: $(wildcard src/*.zi) $(SHARED_SOURCES) $(LIBRARY_SOURCES) ziran.toml ziran.lock
|
||||
rm -rf $(@D)
|
||||
@@ -220,7 +224,6 @@ install-gui: gui
|
||||
install -m 0644 packaging/linux/werk-bundle.xml "$(DATA_DIR)/mime/packages/werk-bundle.xml"
|
||||
@if command -v update-mime-database >/dev/null; then update-mime-database "$(DATA_DIR)/mime"; fi
|
||||
@if command -v update-desktop-database >/dev/null; then update-desktop-database "$(DATA_DIR)/applications"; fi
|
||||
@if command -v gtk-update-icon-cache >/dev/null; then gtk-update-icon-cache -f -t "$(DATA_DIR)/icons/hicolor"; fi
|
||||
uninstall-cli:
|
||||
rm -f $(BIN_DIR)/pass
|
||||
uninstall-gui:
|
||||
|
||||
@@ -1,246 +1,47 @@
|
||||
<p align="center">
|
||||
<a href="https://f-droid.org/packages/xyz.waozi.pass/">
|
||||
<img src="assets/app/badge-f-droid.png" alt="Get it on F-Droid" height="56">
|
||||
</a>
|
||||
<img src="fastlane/metadata/android/en-US/images/featureGraphic.png" alt="Werkzeug" width="100%">
|
||||
</p>
|
||||
|
||||
# Werkzeug
|
||||
|
||||
Small private tools in one app. The home screen opens each one:
|
||||
Small, private tools for everyday life. Generate passwords, manage sign-in
|
||||
codes, calculate and keep time in one free, open-source app.
|
||||
|
||||
- **Pass**: a stateless password generator. The same site, login, master
|
||||
password and settings always give the same password, so there is no
|
||||
password database to keep. It is an independent implementation of the
|
||||
LessPass algorithm; compatibility does not imply endorsement by or
|
||||
affiliation with the LessPass project.
|
||||
- **Auth**: two-factor sign-in codes (TOTP, RFC 6238, with SHA-1, SHA-256 or
|
||||
SHA-512 and 6 to 8 digits). Add accounts by pasting `otpauth://` links, one
|
||||
or many such as Ente Auth's plain-text export, a Google Authenticator
|
||||
export link or an unencrypted Aegis export, or by entering the secret key.
|
||||
On the desktop, Import file reads an export or a picture of its QR code
|
||||
(it uses zenity, and GdkPixbuf and ZBar for pictures).
|
||||
Tap a code to copy it; it is cleared from the clipboard after 30 seconds.
|
||||
Edit renames an account, notes the websites where it signs in, such as
|
||||
`github.com`, or removes it.
|
||||
- **Calculator**: arithmetic with brackets, powers and percent, by keypad or
|
||||
keyboard, and a Scientific mode with trigonometry, logarithms, roots and
|
||||
factorials.
|
||||
- **Clock**: the local time and date, and a stopwatch that keeps running
|
||||
while the app is closed.
|
||||
[Try it online](https://werk.waozi.xyz/app/)
|
||||
· [Download the latest release](https://github.com/waozixyz/werk/releases/latest)
|
||||
· [What's new](CHANGELOG.md)
|
||||
|
||||
- **Workbook** (Linux): a spreadsheet editor with bottom sheet tabs and File/Edit menus. Its own `workbook.zib` bundle runs inside Werkzeug. File → Download Workbook.zib saves a copy you can share or open with `werk --bundle FILE.zib`.
|
||||
## Your everyday tools
|
||||
|
||||
The profile holds your name, a picture and the appearance every tool shares:
|
||||
system, light or dark, an accent color and Material or Classic widgets.
|
||||
- **Pass:** generate the same password from your site, login, master password and settings. Save profiles without keeping a password database.
|
||||
- **Auth:** keep two-factor sign-in codes together. Import existing accounts, rename them and copy a code when you need it.
|
||||
- **Calculator:** everyday arithmetic and scientific functions, with a keypad or keyboard.
|
||||
- **Clock:** see the local time and use a stopwatch that keeps running while the app is closed.
|
||||
- **Workbook on Linux:** edit spreadsheets with sheet tabs, familiar menus and portable workbook files.
|
||||
|
||||
Werkzeug is a harness for practical tools. Each built-in tool uses the shared
|
||||
Kryon app interface, so another compatible harness can run its bundle too.
|
||||
On the desktop, `werk --bundle /path/to/diary.zib` opens Inner Breeze's Diary
|
||||
through that interface, with its own private documents and optional photo
|
||||
picker. It needs no `inbe.zib`. These local Diary documents do not yet join
|
||||
Werkzeug's account sync. External bundles cannot replace a built-in tool or
|
||||
receive Pass's device secret or Auth's records.
|
||||
<p align="center">
|
||||
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/02-pass.png" alt="Pass password generation" width="30%">
|
||||
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/03-auth.png" alt="Auth sign-in codes" width="30%">
|
||||
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/04-calculator.png" alt="Scientific calculator" width="30%">
|
||||
</p>
|
||||
|
||||
## Privacy
|
||||
## Make it yours
|
||||
|
||||
Everything is computed on the device. Werkzeug makes no network requests
|
||||
unless you set up sync or explicitly request an account or device-link action.
|
||||
Each tool keeps its own files, readable only by your user:
|
||||
Choose light or dark appearance, an accent color and your profile picture.
|
||||
On Linux, open each tool directly from its own application-menu or Desktop
|
||||
shortcut, with its own icon.
|
||||
|
||||
| Platform | Data |
|
||||
|---|---|
|
||||
| Linux | `$XDG_DATA_HOME/werk` (or `~/.local/share/werk`) |
|
||||
| Android | the app's private storage |
|
||||
| Browser | IndexedDB on this site |
|
||||
## Your data and choices
|
||||
|
||||
Auth's accounts are synced records: `otpauth` links in the private
|
||||
`records/auth.txt`, protected by the file permissions of your account or the
|
||||
Android app sandbox.
|
||||
Password generation and local tools work on your device. Account sync and
|
||||
node connections are optional. Each tool keeps its own private files.
|
||||
|
||||
## Sync
|
||||
Werkzeug was formerly Pass. Android keeps the original `xyz.waozi.pass`
|
||||
package and signing certificate so existing Pass installations can update
|
||||
to Werkzeug while keeping their saved data.
|
||||
|
||||
Profile uses the shared Self bundle. Desktop Account management shows the
|
||||
public ID, alias, sync status and queued changes, and provides account creation,
|
||||
key-file import, backups, device linking and logout. Switching accounts asks
|
||||
whether to keep and merge local Auth records or replace them. A private rollback
|
||||
journal preserves the previous key and records if a switch is interrupted.
|
||||
[F-Droid update submission (draft)](https://gitlab.com/fdroid/fdroiddata/-/merge_requests/53909)
|
||||
· [Report a problem](https://github.com/waozixyz/werk/issues)
|
||||
· [Build, command-line tools and data details](docs/development.md)
|
||||
|
||||
The account can use a [Daochi](https://github.com/kryonlabs/daochi) node,
|
||||
`api.waozi.xyz` by default. Tools work locally without an account. Saved nodes
|
||||
and the preferred node live in Profile → Nodes; choosing a node preserves the
|
||||
account and its paused state. The sync switch pauses automatic synchronization
|
||||
and stays paused after restarting. Logout keeps local Auth records.
|
||||
|
||||
Desktop key backups retain Werkzeug's Auth vault key as protected recovery
|
||||
context. Use a passphrase to encrypt the backup. Importing a legacy account key
|
||||
for the already-connected identity preserves its existing vault key. The shared
|
||||
QR workflow also preserves that context and asks both devices to compare digits
|
||||
before connecting. Legacy clients cannot read the extended QR payload when
|
||||
Werkzeug vault context is included.
|
||||
|
||||
Desktop Self and participating native apps share public profile preferences only
|
||||
for the same verified account ID. Account keys and Auth records stay in the
|
||||
host's private store. Android retains its existing native Account screen and
|
||||
legacy device-link flow; browser account sync is unavailable.
|
||||
|
||||
The embedded web app (`/app/?mini`) opens on Home with every tool, and also
|
||||
provides Profile. Use `?mini&app=pass`, `auth`, `calculator` or `clock` to
|
||||
open a particular tool first. Browser sync is currently unavailable.
|
||||
|
||||
- Each record is sealed on the device with XChaCha20-Poly1305 under a random
|
||||
vault key that is never sent to the node unencrypted. The seal covers the
|
||||
account, the record and the time of the change, so the server can neither
|
||||
read nor alter a record or a removal.
|
||||
- The account key (ML-DSA-44) signs in and signs each sync together with
|
||||
the device's own Ed25519 key.
|
||||
- Desktop device linking uses the shared Self QR/code exchange with X25519
|
||||
and encrypted key transfer. Confirm the matching number on both devices.
|
||||
Android's existing 12-character connection code remains available in its
|
||||
native account screen.
|
||||
- The server can still withhold changes or serve an older copy to a device
|
||||
that has not seen a newer one. A lost device keeps the keys it had: stop
|
||||
syncing there if you can, and replace two-factor secrets you care about.
|
||||
|
||||
`scripts/sync_e2e_test.sh` runs two devices against a local Daochi node.
|
||||
|
||||
## The `werk sync` and `werk auth` commands
|
||||
|
||||
On Linux, the same data works without a window, for devices without a
|
||||
screen and for scripts:
|
||||
|
||||
```text
|
||||
werk sync status | create | show | join [CODE] | key [FILE] | now
|
||||
werk auth list
|
||||
werk auth code ID
|
||||
werk auth import [FILE]
|
||||
werk auth rename ID SERVICE ACCOUNT
|
||||
werk auth sites ID [WEBSITE ...]
|
||||
werk auth remove ID
|
||||
```
|
||||
|
||||
`werk sync show` prints a code for another device to enter; `werk sync join`
|
||||
reads one from its argument or standard input. `werk sync key` signs in with
|
||||
an account key from FILE or standard input; for a key with a passphrase, give
|
||||
FILE and the passphrase on standard input. `werk auth list` prints the
|
||||
accounts as JSON with their ids and websites, never their secrets.
|
||||
`werk auth code ID` prints the current code and the seconds it stays valid.
|
||||
`werk auth import` reads a file, or standard input: otpauth links, Google
|
||||
Authenticator export links, an unencrypted Aegis export, or a PNG or JPEG of
|
||||
an export's QR code when GdkPixbuf and ZBar (`libzbar0`) are installed.
|
||||
Changes sync right away when the device has an account. `werk --app auth`
|
||||
opens the window on one tool, as Harmony's Auth entry does.
|
||||
|
||||
## Tools are separate apps
|
||||
|
||||
Each tool lives in `apps/<tool>/` and is built into its own portable bundle,
|
||||
`build/apps/<tool>.zib`. All four are preinstalled. A tool reaches the host
|
||||
only through the calls in `shared/werk_app.zi` (its private files,
|
||||
clipboard, clock, key derivation and device-protected secret), and the host
|
||||
checks every call a bundle asks for before it runs. Tools never import each
|
||||
other.
|
||||
|
||||
## Build and test
|
||||
|
||||
Dependencies and the compiler are pinned in `ziran.lock`. Desktop builds need
|
||||
SDL2, Cairo, FreeType, Fontconfig, Pango, GTK 3 and X11 development packages.
|
||||
Workbook uses the installed Gnumeric library; file choosers need Zenity. Browser
|
||||
builds need Emscripten; Android builds need JDK 21 and the SDK/NDK versions in
|
||||
`droid/app/build.gradle`. Desktop tests use Xvfb, xdotool, xclip and
|
||||
ImageMagick on private displays.
|
||||
|
||||
```sh
|
||||
make gui # build/werk and the app bundles in build/apps
|
||||
make install-gui # Werkzeug and each tool in the app menu and on the desktop
|
||||
make test # Pass/CLI, Auth, Calculator and private account recovery fixtures
|
||||
make gui-smoke # light and dark home screens on a private Xvfb display
|
||||
make gui-test # every tool, clipboard and profile on a private display,
|
||||
# and werk auth without one
|
||||
make site # build/site: browser app and offline worker
|
||||
make web-smoke # private headless Chromium
|
||||
make android-debug # ARM32, ARM64 and universal APKs
|
||||
make android-fdroid # unsigned F-Droid candidate, same Android ID and version
|
||||
make android-emulator # the x86_64 APK for a private emulator
|
||||
```
|
||||
|
||||
Linux installs include separate Pass, Auth, Calculator, Clock and Workbook
|
||||
launchers, each with its own icon. They open the selected tool directly and
|
||||
share Werkzeug's existing private data. `make install-gui` also adds shortcuts
|
||||
to the desktop folder configured by `xdg-user-dir`; set `DESKTOP_DIR=` to skip
|
||||
those shortcuts. Debian packages include the same application-menu entries.
|
||||
|
||||
F-Droid metadata is maintained in `packaging/fdroid`. The `android-fdroid`
|
||||
target disables developer signing even when a release keystore is configured
|
||||
and writes `build/werk-VERSION-fdroid-unsigned.apk`. It adds no version or
|
||||
package suffix, preserving existing installations and reference-APK checks.
|
||||
The unsigned candidate is for builders, not installation. Werkzeug currently
|
||||
has no built-in updater: F-Droid or your chosen installer handles updates.
|
||||
Android requires the same signing certificate for an in-place update; the
|
||||
F-Droid recipe retains the developer-signature reproducibility requirement.
|
||||
|
||||
The [F-Droid TODO](packaging/fdroid/TODO.md) records completed checks, the
|
||||
remaining submission/reproducibility steps and the prepared merge-request text.
|
||||
|
||||
For development with the real project repositories, create an ignored
|
||||
`ziran.local.toml`:
|
||||
|
||||
```toml
|
||||
[overrides]
|
||||
kryon = "../../kryonlabs/kryon"
|
||||
ziran = "../../ziranlang/ziran"
|
||||
```
|
||||
|
||||
## The `pass` command
|
||||
|
||||
```text
|
||||
pass [OPTIONS] SITE LOGIN [MASTER_PASSWORD]
|
||||
pass [OPTIONS] PROFILE SITE
|
||||
```
|
||||
|
||||
`make cli` builds it and `make install-cli` installs it. The default password
|
||||
has 16 characters and includes lowercase letters, uppercase letters, digits
|
||||
and symbols. Length must be between 5 and 35, matching LessPass clients. The
|
||||
default counter is 1.
|
||||
|
||||
Passing a master password as an argument can expose it to process inspection
|
||||
and shell history. Omitting it is safer: `pass` first checks
|
||||
`LESSPASS_MASTER_PASSWORD`, then reads one line from standard input. Use
|
||||
`--prompt` to bypass the environment and read from standard input:
|
||||
|
||||
```sh
|
||||
pass --prompt example.com alice
|
||||
pass --length 24 --counter 2 example.com alice
|
||||
pass --no-symbols --exclude '0O1Il' example.com alice
|
||||
```
|
||||
|
||||
The Linux CLI also reads saved identities from
|
||||
`$XDG_CONFIG_HOME/pass/profiles.json` (or `~/.config/pass/profiles.json`).
|
||||
`pass w example.com` and `pass --profile w example.com` use the saved login
|
||||
and generation options. Existing OpenSSL-encrypted vaults are unlocked with
|
||||
a hidden `Vault passphrase:` prompt. A configured vault takes precedence over
|
||||
`LESSPASS_MASTER_PASSWORD`; `--prompt` bypasses it. Explicit flags override
|
||||
profile defaults. Profiles and vaults are read without changing them.
|
||||
|
||||
`--copy` or a profile's `copy` setting copies through `xclip` on X11;
|
||||
`--clear-after 90s` releases that clipboard selection after the given time
|
||||
without erasing a later copy from another application. Use `--no-copy` to
|
||||
print the generated password instead. Run `pass --help` for all flags.
|
||||
|
||||
## Source layout
|
||||
|
||||
```text
|
||||
apps/pass/ Pass: LessPass core, settings and profiles, screens, CLI
|
||||
apps/auth/ Auth: TOTP, otpauth links, exports, accounts and screens
|
||||
apps/calculator/ Calculator
|
||||
apps/clock/ Clock and stopwatch
|
||||
shared/ the app interface, protocol and SHA-256/PBKDF2
|
||||
src/werk.zi home screen, profile screen and the bar above a tool
|
||||
src/apps.zi loads, checks and runs the app bundles
|
||||
src/platform.zi files, clock, clipboard and secrets per platform
|
||||
src/desktop.zi, src/android_main.zi, src/browser.zi platform main loops
|
||||
src/command.zi werk sync and werk auth without a window
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
Copyright © 2026 Waozi. Distributed under the BSD 3-Clause License. See
|
||||
[`LICENSE`](LICENSE).
|
||||
BSD 3-Clause. See [LICENSE](LICENSE).
|
||||
@@ -1 +1 @@
|
||||
8c5806d7ff5a4fdaf6b98a7668acbf0aad236ece1d5e68ffe1f7b268a1afb077
|
||||
952db2717c6d8500aa9a4c29b78c3028a19821e11bf511f39471bf04cf02c6cd
|
||||
@@ -0,0 +1,207 @@
|
||||
# Werkzeug development and data
|
||||
|
||||
[Back to Werkzeug](../README.md).
|
||||
|
||||
## Privacy
|
||||
|
||||
Everything is computed on the device. Werkzeug makes no network requests
|
||||
unless you set up sync or explicitly request an account or device-link action.
|
||||
Each tool keeps its own files, readable only by your user:
|
||||
|
||||
| Platform | Data |
|
||||
|---|---|
|
||||
| Linux | `$XDG_DATA_HOME/werk` (or `~/.local/share/werk`) |
|
||||
| Android | the app's private storage |
|
||||
| Browser | IndexedDB on this site |
|
||||
|
||||
Auth's accounts are synced records: `otpauth` links in the private
|
||||
`records/auth.txt`, protected by the file permissions of your account or the
|
||||
Android app sandbox.
|
||||
|
||||
## Sync
|
||||
|
||||
Profile uses the shared Self bundle. Desktop Account management shows the
|
||||
public ID, alias, sync status and queued changes, and provides account creation,
|
||||
key-file import, backups, device linking and logout. Switching accounts asks
|
||||
whether to keep and merge local Auth records or replace them. A private rollback
|
||||
journal preserves the previous key and records if a switch is interrupted.
|
||||
|
||||
The account can use a [Daochi](https://github.com/kryonlabs/daochi) node,
|
||||
`api.waozi.xyz` by default. Tools work locally without an account. Saved nodes
|
||||
and the preferred node live in Profile → Nodes; choosing a node preserves the
|
||||
account and its paused state. The sync switch pauses automatic synchronization
|
||||
and stays paused after restarting. Logout keeps local Auth records.
|
||||
|
||||
Desktop key backups retain Werkzeug's Auth vault key as protected recovery
|
||||
context. Use a passphrase to encrypt the backup. Importing a legacy account key
|
||||
for the already-connected identity preserves its existing vault key. The shared
|
||||
QR workflow also preserves that context and asks both devices to compare digits
|
||||
before connecting. Legacy clients cannot read the extended QR payload when
|
||||
Werkzeug vault context is included.
|
||||
|
||||
Desktop Self and participating native apps share public profile preferences only
|
||||
for the same verified account ID. Account keys and Auth records stay in the
|
||||
host's private store. Android retains its existing native Account screen and
|
||||
legacy device-link flow; browser account sync is unavailable.
|
||||
|
||||
The embedded web app (`/app/?mini`) opens on Home with every tool, and also
|
||||
provides Profile. Use `?mini&app=pass`, `auth`, `calculator` or `clock` to
|
||||
open a particular tool first. Browser sync is currently unavailable.
|
||||
|
||||
- Each record is sealed on the device with XChaCha20-Poly1305 under a random
|
||||
vault key that is never sent to the node unencrypted. The seal covers the
|
||||
account, the record and the time of the change, so the server can neither
|
||||
read nor alter a record or a removal.
|
||||
- The account key (ML-DSA-44) signs in and signs each sync together with
|
||||
the device's own Ed25519 key.
|
||||
- Desktop device linking uses the shared Self QR/code exchange with X25519
|
||||
and encrypted key transfer. Confirm the matching number on both devices.
|
||||
Android's existing 12-character connection code remains available in its
|
||||
native account screen.
|
||||
- The server can still withhold changes or serve an older copy to a device
|
||||
that has not seen a newer one. A lost device keeps the keys it had: stop
|
||||
syncing there if you can, and replace two-factor secrets you care about.
|
||||
|
||||
`scripts/sync_e2e_test.sh` runs two devices against a local Daochi node.
|
||||
|
||||
## The `werk sync` and `werk auth` commands
|
||||
|
||||
On Linux, the same data works without a window, for devices without a
|
||||
screen and for scripts:
|
||||
|
||||
```text
|
||||
werk sync status | create | show | join [CODE] | key [FILE] | now
|
||||
werk auth list
|
||||
werk auth code ID
|
||||
werk auth import [FILE]
|
||||
werk auth rename ID SERVICE ACCOUNT
|
||||
werk auth sites ID [WEBSITE ...]
|
||||
werk auth remove ID
|
||||
```
|
||||
|
||||
`werk sync show` prints a code for another device to enter; `werk sync join`
|
||||
reads one from its argument or standard input. `werk sync key` signs in with
|
||||
an account key from FILE or standard input; for a key with a passphrase, give
|
||||
FILE and the passphrase on standard input. `werk auth list` prints the
|
||||
accounts as JSON with their ids and websites, never their secrets.
|
||||
`werk auth code ID` prints the current code and the seconds it stays valid.
|
||||
`werk auth import` reads a file, or standard input: otpauth links, Google
|
||||
Authenticator export links, an unencrypted Aegis export, or a PNG or JPEG of
|
||||
an export's QR code when GdkPixbuf and ZBar (`libzbar0`) are installed.
|
||||
Changes sync right away when the device has an account. `werk --app auth`
|
||||
opens the window on one tool, as Harmony's Auth entry does.
|
||||
|
||||
## Tools are separate apps
|
||||
|
||||
Each tool lives in `apps/<tool>/` and is built into its own portable bundle,
|
||||
`build/apps/<tool>.zx`. All four are preinstalled. A tool reaches the host
|
||||
only through the calls in `shared/werk_app.zi` (its private files,
|
||||
clipboard, clock, key derivation and device-protected secret), and the host
|
||||
checks every call a bundle asks for before it runs. Tools never import each
|
||||
other.
|
||||
|
||||
## Build and test
|
||||
|
||||
Dependencies and the compiler are pinned in `ziran.lock`. Desktop builds need
|
||||
SDL2, Cairo, FreeType, Fontconfig, Pango, GTK 3 and X11 development packages.
|
||||
Workbook uses the installed Gnumeric library; file choosers need Zenity. Browser
|
||||
builds need Emscripten; Android builds need JDK 21 and the SDK/NDK versions in
|
||||
`droid/app/build.gradle`. Desktop tests use Xvfb, xdotool, xclip and
|
||||
ImageMagick on private displays.
|
||||
|
||||
```sh
|
||||
make gui # build/werk and the app bundles in build/apps
|
||||
make install-gui # Werkzeug and each tool in the app menu and on the desktop
|
||||
make test # Pass/CLI, Auth, Calculator and private account recovery fixtures
|
||||
make gui-smoke # light and dark home screens on a private Xvfb display
|
||||
make gui-test # every tool, clipboard and profile on a private display,
|
||||
# and werk auth without one
|
||||
make site # build/site: browser app and offline worker
|
||||
make web-smoke # private headless Chromium
|
||||
make android-debug # ARM32, ARM64 and universal APKs
|
||||
make android-fdroid # unsigned F-Droid candidate, same Android ID and version
|
||||
make android-emulator # the x86_64 APK for a private emulator
|
||||
```
|
||||
|
||||
Linux installs include separate Pass, Auth, Calculator, Clock and Workbook
|
||||
launchers, each with its own icon. They open the selected tool directly and
|
||||
share Werkzeug's existing private data. `make install-gui` also adds shortcuts
|
||||
to the desktop folder configured by `xdg-user-dir`; set `DESKTOP_DIR=` to skip
|
||||
those shortcuts. Debian packages include the same application-menu entries.
|
||||
|
||||
F-Droid metadata is maintained in `packaging/fdroid`. The `android-fdroid`
|
||||
target disables developer signing even when a release keystore is configured
|
||||
and writes `build/werk-VERSION-fdroid-unsigned.apk`. It adds no version or
|
||||
package suffix, preserving existing installations and reference-APK checks.
|
||||
The unsigned candidate is for builders, not installation. Werkzeug currently
|
||||
has no built-in updater: F-Droid or your chosen installer handles updates.
|
||||
Android requires the same signing certificate for an in-place update; the
|
||||
F-Droid recipe retains the developer-signature reproducibility requirement.
|
||||
|
||||
The [F-Droid TODO](../packaging/fdroid/TODO.md) records completed checks, the
|
||||
remaining submission/reproducibility steps and the prepared merge-request text.
|
||||
|
||||
For development with the real project repositories, create an ignored
|
||||
`ziran.local.toml`:
|
||||
|
||||
```toml
|
||||
[overrides]
|
||||
kryon = "../../kryonlabs/kryon"
|
||||
ziran = "../../ziranlang/ziran"
|
||||
```
|
||||
|
||||
## The `pass` command
|
||||
|
||||
```text
|
||||
pass [OPTIONS] SITE LOGIN [MASTER_PASSWORD]
|
||||
pass [OPTIONS] PROFILE SITE
|
||||
```
|
||||
|
||||
`make cli` builds it and `make install-cli` installs it. The default password
|
||||
has 16 characters and includes lowercase letters, uppercase letters, digits
|
||||
and symbols. Length must be between 5 and 35, matching LessPass clients. The
|
||||
default counter is 1.
|
||||
|
||||
Passing a master password as an argument can expose it to process inspection
|
||||
and shell history. Omitting it is safer: `pass` first checks
|
||||
`LESSPASS_MASTER_PASSWORD`, then reads one line from standard input. Use
|
||||
`--prompt` to bypass the environment and read from standard input:
|
||||
|
||||
```sh
|
||||
pass --prompt example.com alice
|
||||
pass --length 24 --counter 2 example.com alice
|
||||
pass --no-symbols --exclude '0O1Il' example.com alice
|
||||
```
|
||||
|
||||
The Linux CLI also reads saved identities from
|
||||
`$XDG_CONFIG_HOME/pass/profiles.json` (or `~/.config/pass/profiles.json`).
|
||||
`pass w example.com` and `pass --profile w example.com` use the saved login
|
||||
and generation options. Existing OpenSSL-encrypted vaults are unlocked with
|
||||
a hidden `Vault passphrase:` prompt. A configured vault takes precedence over
|
||||
`LESSPASS_MASTER_PASSWORD`; `--prompt` bypasses it. Explicit flags override
|
||||
profile defaults. Profiles and vaults are read without changing them.
|
||||
|
||||
`--copy` or a profile's `copy` setting copies through `xclip` on X11;
|
||||
`--clear-after 90s` releases that clipboard selection after the given time
|
||||
without erasing a later copy from another application. Use `--no-copy` to
|
||||
print the generated password instead. Run `pass --help` for all flags.
|
||||
|
||||
## Source layout
|
||||
|
||||
```text
|
||||
apps/pass/ Pass: LessPass core, settings and profiles, screens, CLI
|
||||
apps/auth/ Auth: TOTP, otpauth links, exports, accounts and screens
|
||||
apps/calculator/ Calculator
|
||||
apps/clock/ Clock and stopwatch
|
||||
shared/ the app interface, protocol and SHA-256/PBKDF2
|
||||
src/werk.zi home screen, profile screen and the bar above a tool
|
||||
src/apps.zi loads, checks and runs the app bundles
|
||||
src/platform.zi files, clock, clipboard and secrets per platform
|
||||
src/desktop.zi, src/android_main.zi, src/browser.zi platform main loops
|
||||
src/command.zi werk sync and werk auth without a window
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
Copyright © 2026 Waozi. Distributed under the BSD 3-Clause License. See
|
||||
[`LICENSE`](../LICENSE).
|
||||
@@ -43,8 +43,8 @@ android {
|
||||
applicationId 'xyz.waozi.pass'
|
||||
minSdk 21
|
||||
targetSdk 36
|
||||
versionCode 16
|
||||
versionName "0.4.2"
|
||||
versionCode 18
|
||||
versionName "0.4.4"
|
||||
// Default to the two realistic phone targets; override with
|
||||
// -Pabi=x86_64 etc. for emulator builds.
|
||||
def abis = project.findProperty('abi') ?: 'armeabi-v7a,arm64-v8a'
|
||||
@@ -107,11 +107,11 @@ def makeApps = tasks.register('makeApps', Exec) {
|
||||
commandLine 'make', 'portable-apps'
|
||||
}
|
||||
android.sourceSets.main.assets.srcDir(layout.buildDirectory.dir('generated/appAssets'))
|
||||
def prepareImages = tasks.register('prepareImages', Copy) {
|
||||
def prepareImages = tasks.register('prepareImages', Sync) {
|
||||
dependsOn makeApps
|
||||
from('../../assets/app/icon.png')
|
||||
from("${System.getenv('KRYON_DIR')}/icons/pfp.png")
|
||||
from('../../build/apps') { include '*.zib'; exclude 'workbook.zib'; into 'apps' }
|
||||
from('../../build/apps') { include '*.zx'; exclude 'workbook.zx'; into 'apps' }
|
||||
into layout.buildDirectory.dir('generated/appAssets')
|
||||
}
|
||||
tasks.named('preBuild').configure { dependsOn prepareImages }
|
||||
@@ -76,5 +76,9 @@ target_link_libraries(main oqs)
|
||||
kryon_android_app(main)
|
||||
target_link_libraries(main "${BUNDLE_RUNTIME_DIR}/libziran.a")
|
||||
target_link_options(main PRIVATE -Wl,--wrap=pthread_attr_init)
|
||||
# Linker build IDs include debug-path differences even after stripping. The
|
||||
# installed code is identical; omit this note for reproducible signed APKs.
|
||||
# https://f-droid.org/docs/Reproducible_Builds/#ndk-build-id
|
||||
target_link_options(main PRIVATE -Wl,--build-id=none)
|
||||
# Werkzeug has no handwritten native sources; every app translation unit above is
|
||||
# generated from .zi for this ABI. raylib and the NDK own native_app_glue.
|
||||
@@ -0,0 +1,2 @@
|
||||
- Werkzeug uses its own Android application ID, `xyz.waozi.werk`.
|
||||
- Werkzeug installs alongside legacy Pass, preserving the older app and its data.
|
||||
@@ -0,0 +1,2 @@
|
||||
- Werkzeug updates the existing Pass Android app using its original application ID and signing certificate, keeping its saved data.
|
||||
- The app continues to appear as Werkzeug, with Pass, Auth, Calculator and Clock together.
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 99 KiB |
@@ -0,0 +1,4 @@
|
||||
/config/
|
||||
/repo/
|
||||
/tmp/
|
||||
/logs/
|
||||
@@ -1,23 +1,17 @@
|
||||
# Draft: xyz.waozi.pass: rename to Werkzeug and update to 0.4.0
|
||||
# Update Pass to Werkzeug
|
||||
|
||||
The app on F-Droid is now Werkzeug: Pass, Auth, Calculator and Clock in one
|
||||
app. The current recipe still selects Pass 0.2.9 with its old name, website
|
||||
and APK name. Update the existing package to the public Werkzeug 0.4.0
|
||||
release, its links, description, screenshots and versioned APK name.
|
||||
Preserve `xyz.waozi.pass` and the allowed signing certificate so existing
|
||||
installations update in place.
|
||||
This updates the existing `xyz.waozi.pass` F-Droid entry. The owner chose an in-place update: retain the original Android package and author signing certificate, show the app as Werkzeug, and preserve existing Pass data.
|
||||
|
||||
The build uses the exact Ziran toolchain and nine dependency revisions from
|
||||
the release lock, fetched as F-Droid source libraries before the build.
|
||||
Package mappings and native/image paths use those managed sources. The old
|
||||
0.2.9 build keeps its original reference APK filename.
|
||||
The separate-package new-app proposal !53912 is superseded by this update. Do not mark this merge request ready without owner approval.
|
||||
|
||||
Werkzeug 0.3.0 and 0.3.1 are not offered: their locks pin dependency commits
|
||||
that upstream history no longer contains, so they cannot be rebuilt.
|
||||
Werkzeug continues the same upstream project with Pass, Auth, Calculator and Clock. Its source is https://github.com/waozixyz/werk and its listing and screenshots are maintained in Fastlane.
|
||||
|
||||
A full F-Droid source rebuild and reproducibility comparison remain pending.
|
||||
Keep this request in draft until those checks pass.
|
||||
## Candidate and remaining work
|
||||
|
||||
- [Original merged submission](https://gitlab.com/fdroid/fdroiddata/-/merge_requests/46404)
|
||||
- [Existing successful reproducible build](https://monitor.f-droid.org/builds/log/xyz.waozi.pass/10)
|
||||
- [Werkzeug 0.4.0 release](https://github.com/waozixyz/werk/releases/tag/v0.4.0)
|
||||
- Version 0.4.4 (version code 18) is being prepared with the original `xyz.waozi.pass` package. Its release, exact source pin and reference APK still need verification before the recipe is updated.
|
||||
- Preserve the existing published Pass build entry and author signing certificate.
|
||||
- The prior comparison differed only in each native library's build-ID note. The fix disables that note as documented by F-Droid. Both ARM32 and ARM64 libraries rebuilt in different native build directories now match the local candidate APK byte for byte; comparison against the published signed APK in F-Droid remains pending.
|
||||
- Rerun the update check against the published compatible release tag.
|
||||
- Resolve the missing explicit licenses in Apps, Entity, Daochi Client and Crypto, and the source-library template exceptions before review.
|
||||
|
||||
This remains a Draft update, not an approved or published F-Droid release.
|
||||
+13
-47
@@ -1,51 +1,17 @@
|
||||
# Werkzeug F-Droid TODO
|
||||
# Werkzeug F-Droid update status
|
||||
|
||||
Updated 2026-10-19. The recipe now targets the public Werkzeug 0.4.0 release
|
||||
(Android versionCode 14) with new store text and screenshots. GitLab
|
||||
authentication is still blocked and no new merge request has been created.
|
||||
The owner's latest request is an update of the existing Pass app. Keep `xyz.waozi.pass`, the existing author signing certificate and private app data. The visible name remains Werkzeug. Preserve any separate `xyz.waozi.werk` installation as well.
|
||||
|
||||
## Prepared and verified
|
||||
- [x] Prepare the original Android application ID and matching artifact verifiers.
|
||||
- [x] Prepare 0.4.4 with version code 18 through `update_version.sh`.
|
||||
- [x] Build the compatible ARM and private-emulator candidates with matching ZX dependencies and current app bundles.
|
||||
- [x] Verify both ARM native libraries match byte for byte after independent builds in different directories.
|
||||
- [ ] Publish the compatible candidate through the normal release workflow and pin its exact source revision in the recipe.
|
||||
- [ ] Complete source-build and reproducibility verification against its reference APK.
|
||||
- [ ] Resolve missing explicit dependency licenses and remaining GitLab pipeline results.
|
||||
- [ ] Obtain owner approval before marking the update ready for review.
|
||||
- [ ] Verify catalog publication after maintainers merge and F-Droid publishes it.
|
||||
|
||||
- [x] Confirm the [original Pass submission](https://gitlab.com/fdroid/fdroiddata/-/merge_requests/46404)
|
||||
was merged and its [0.2.9 reproducible build](https://monitor.f-droid.org/builds/log/xyz.waozi.pass/10) succeeded.
|
||||
- [x] Rename the listing to Werkzeug and pin 0.4.0's toolchain and nine
|
||||
source dependencies, including Self and its QR code library.
|
||||
- [x] Drop 0.3.0 and 0.3.1: their locks pin dependency commits that the
|
||||
2026-10-19 history rewrite removed upstream, so they cannot be rebuilt.
|
||||
- [x] Replace the old Pass screenshots with Werkzeug's home screen and tools.
|
||||
- [x] Verify the public 0.4.0 universal APK: package `xyz.waozi.pass`,
|
||||
versionCode 14, label Werkzeug, both ARM ABIs and the allowed signing
|
||||
certificate. The recipe pins its tagged commit. `make android-fdroid`
|
||||
builds the unsigned F-Droid candidate from the same lock.
|
||||
[Update draft](https://gitlab.com/fdroid/fdroiddata/-/merge_requests/53909) · [Recipe](metadata/xyz.waozi.pass.yml) · [Merge-request text](MERGE_REQUEST.md)
|
||||
|
||||
## Resume the F-Droid submission
|
||||
|
||||
1. [ ] Restore GitLab sign-in. The existing ThinkPad spare-browser viewer
|
||||
is paused for manual sign-in; resume automation after the owner confirms.
|
||||
2. [ ] Refresh upstream metadata and search open merge requests for an
|
||||
existing Werkzeug update before creating another one.
|
||||
3. [ ] Submit the metadata and source-library definitions as a **draft**
|
||||
using [the prepared merge-request text](MERGE_REQUEST.md). Record its URL here.
|
||||
4. [ ] Run the full F-Droid source build and reproducibility comparison
|
||||
against the signed public 0.4.0 reference APK. Resolve any CI/build differences.
|
||||
5. [ ] Verify update compatibility: preserve `xyz.waozi.pass`, the existing
|
||||
allowed signing certificate, and the release's versionName/versionCode.
|
||||
Keep `-fdroid` in the output filename only.
|
||||
6. [ ] Once reproducibility and CI pass, request maintainer review. Track
|
||||
the merge and verify Werkzeug's actual catalog availability separately.
|
||||
|
||||
Merge request URL: pending submission.
|
||||
|
||||
## Later
|
||||
|
||||
- [ ] Unfinished Clock/alarm work waits in the git stash "clock features
|
||||
WIP 2". It is not part of 0.4.0; preserve it.
|
||||
|
||||
## Handoff files
|
||||
|
||||
- [Build metadata](metadata/xyz.waozi.pass.yml)
|
||||
- [Pinned source-library definitions](srclibs/)
|
||||
- [Draft merge-request text](MERGE_REQUEST.md)
|
||||
- Local unsigned candidate: `make android-fdroid`
|
||||
|
||||
The unsigned candidate is a build artifact, not an installable release.
|
||||
The local recipe is being prepared; its source pin still needs the verified compatible candidate. A Draft or a successful source build does not imply F-Droid catalog publication.
|
||||
@@ -25,53 +25,20 @@ Builds:
|
||||
- apt-get install -y gcc libc-dev
|
||||
gradle:
|
||||
- yes
|
||||
binary: https://github.com/waozixyz/werk/releases/download/v%v/pass-%v.apk
|
||||
binary: https://github.com/waozixyz/pass/releases/download/v%v/pass-%v.apk
|
||||
scandelete:
|
||||
- vendor/kryon/vendor
|
||||
ndk: 28.2.13676358
|
||||
|
||||
- versionName: 0.4.0
|
||||
versionCode: 14
|
||||
commit: 0d2c2b3a88e1080d3249848815b185757a1915c2
|
||||
subdir: droid/app
|
||||
sudo:
|
||||
- apt-get update
|
||||
- apt-get install -y build-essential libssl-dev
|
||||
gradle:
|
||||
- yes
|
||||
output: build/outputs/apk/release/app-universal-release-unsigned.apk
|
||||
srclibs:
|
||||
- Ziran@1ad0264d9f6ce3df29e9071ab16eae0e1e557049
|
||||
- Kryon@a78576db722b25216e0096870d313b7d2ace96b0
|
||||
- Monocypher@d1895c3799005122b2e68f47f442cc5ba709d866
|
||||
- Oqs@22d2ddbdc236796953c905a05a2cebf5ab1b4ff3
|
||||
- Mingcute@9cc6872f75447c3a24c16764f9829d0f58751cb0
|
||||
- raylib@fafa2cea97d0cb379d832086ba45a989fa6f9c8e
|
||||
- DaochiClient@42aa3ee773d8abdc6b3a10fbcb1b73c992f0f564
|
||||
- liboqs@fd44469daeffe6b28f031f54f9bb66cbae69a572
|
||||
- Self@1ce89cff5a807cca817aec5d1347e18d2f229b27
|
||||
- Qrcode@2944b2e668e735438d8ce24e47a39be3f5c36af5
|
||||
prebuild:
|
||||
- printf '[overrides]\nziran = "$$Ziran$$"\nkryon = "$$Kryon$$"\nmingcute =
|
||||
"$$Mingcute$$"\ndaochi_client = "$$DaochiClient$$"\noqs = "$$Oqs$$"\nliboqs
|
||||
= "$$liboqs$$"\nmonocypher = "$$Monocypher$$"\nraylib = "$$raylib$$"\nself
|
||||
= "$$Self$$"\nqrcode = "$$Qrcode$$"\n' > ../../ziran.local.toml
|
||||
- sed -i -e 's|$ENV{KRYON_DIR}|$$Kryon$$|g' -e 's|$ENV{ZIRAN_ROOT}|$$Ziran$$|g'
|
||||
-e 's|$ENV{RAYLIB_DIR}|$$raylib$$/src|g' -e 's|$ENV{LIBOQS_DIR}|$$liboqs$$|g'
|
||||
-e 's|$ENV{MONOCYPHER_DIR}|$$Monocypher$$|g' src/main/cpp/CMakeLists.txt
|
||||
- sed -i 's@from(.*KRYON_DIR.*@from("$$Kryon$$/icons/pfp.png")@' build.gradle
|
||||
build:
|
||||
- make -C $$Ziran$$ all
|
||||
- make -C ../.. apps ZIRAN=$$Ziran$$/build/bin/ziran
|
||||
ndk: 28.2.13676358
|
||||
gradleprops:
|
||||
- fDroidBuild=true
|
||||
- abi=armeabi-v7a,arm64-v8a
|
||||
- splitApks=true
|
||||
|
||||
AllowedAPKSigningKeys: 1ac82db5bc8f742b8161fdd7083cefc16b39524dce7d103a7eb7f1ee19589c2d
|
||||
|
||||
AutoUpdateMode: Version
|
||||
MaintainerNotes: Updates the existing Pass entry as Werkzeug using xyz.waozi.pass
|
||||
and its existing author signing certificate. The 0.4.4 / 18 candidate is being prepared;
|
||||
add its build entry only after the compatible source commit and reference APK are
|
||||
verified. Keep the merge request Draft pending owner approval and successful source/reproducibility
|
||||
builds.
|
||||
|
||||
AutoUpdateMode: None
|
||||
UpdateCheckMode: Tags
|
||||
CurrentVersion: 0.4.0
|
||||
CurrentVersionCode: 14
|
||||
CurrentVersion: 0.2.9
|
||||
CurrentVersionCode: 10
|
||||
@@ -0,0 +1,2 @@
|
||||
RepoType: git
|
||||
Repo: https://github.com/waozixyz/apps.git
|
||||
@@ -0,0 +1,2 @@
|
||||
RepoType: git
|
||||
Repo: https://github.com/ziranlang/crypto.git
|
||||
@@ -0,0 +1,2 @@
|
||||
RepoType: git
|
||||
Repo: https://github.com/waozixyz/entity.git
|
||||
@@ -0,0 +1,2 @@
|
||||
RepoType: git
|
||||
Repo: https://github.com/kryonlabs/kss.git
|
||||
@@ -0,0 +1,2 @@
|
||||
RepoType: git
|
||||
Repo: https://github.com/waozixyz/workbook.git
|
||||
@@ -2,6 +2,6 @@
|
||||
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
|
||||
<mime-type type="application/x-ziran-bundle">
|
||||
<comment>Ziran application bundle</comment>
|
||||
<glob pattern="*.zib"/>
|
||||
<glob pattern="*.zx"/>
|
||||
</mime-type>
|
||||
</mime-info>
|
||||
@@ -11,5 +11,5 @@
|
||||
<launchable type="desktop-id">xyz.waozi.werk.desktop</launchable>
|
||||
<url type="homepage">https://github.com/waozixyz/werk</url>
|
||||
<provides><binary>werk</binary></provides>
|
||||
<releases><release version="0.4.2" date="2026-10-23"/><release version="0.4.1" date="2026-10-23"/><release version="0.4.0" date="2026-10-15"/><release version="0.3.1" date="2026-10-13"/><release version="0.3.0" date="2026-10-13"/><release version="0.2.10" date="2026-10-05"/><release version="0.2.9" date="2026-09-05"/><release version="0.2.8" date="2026-08-26"/><release version="0.2.7" date="2026-08-24"/><release version="0.2.6" date="2026-08-24"/><release version="0.2.5" date="2026-08-24"/><release version="0.2.4" date="2026-08-22"/><release version="0.2.3" date="2026-08-21"/><release version="0.2.2" date="2026-08-20"/><release version="0.2.1" date="2026-08-19"/><release version="0.2.0" date="2026-08-18"/><release version="0.1.3" date="2026-08-17"/><release version="0.1.2" date="2026-08-17"/><release version="0.1.1" date="2026-08-17"/><release version="0.1.0" date="2026-08-17"/></releases>
|
||||
<releases><release version="0.4.4" date="2026-10-23"/><release version="0.4.3" date="2026-10-23"/><release version="0.4.2" date="2026-10-23"/><release version="0.4.1" date="2026-10-23"/><release version="0.4.0" date="2026-10-15"/><release version="0.3.1" date="2026-10-13"/><release version="0.3.0" date="2026-10-13"/><release version="0.2.10" date="2026-10-05"/><release version="0.2.9" date="2026-09-05"/><release version="0.2.8" date="2026-08-26"/><release version="0.2.7" date="2026-08-24"/><release version="0.2.6" date="2026-08-24"/><release version="0.2.5" date="2026-08-24"/><release version="0.2.4" date="2026-08-22"/><release version="0.2.3" date="2026-08-21"/><release version="0.2.2" date="2026-08-20"/><release version="0.2.1" date="2026-08-19"/><release version="0.2.0" date="2026-08-18"/><release version="0.1.3" date="2026-08-17"/><release version="0.1.2" date="2026-08-17"/><release version="0.1.1" date="2026-08-17"/><release version="0.1.0" date="2026-08-17"/></releases>
|
||||
</component>
|
||||
@@ -0,0 +1,35 @@
|
||||
# Google Play testing
|
||||
|
||||
The public app is **Werkzeug**, package `xyz.waozi.pass`. Preserve the existing
|
||||
release certificate. This package updates the existing Pass app
|
||||
(`xyz.waozi.pass`) in place and keeps its private data. A separate
|
||||
`xyz.waozi.werk` installation remains separate and untouched.
|
||||
|
||||
`make android-bundle` builds a release AAB for both ARM architectures, targeting
|
||||
Android 16/API 36. Supply the existing `keystore.*` Gradle properties to sign it;
|
||||
without them it is an unsigned build artifact. Never upload an unsigned bundle.
|
||||
The manual Play bundle workflow signs with the repository's existing Android
|
||||
release secrets and retains the candidate as an Actions artifact.
|
||||
|
||||
Use `listing.json` and the upstream Fastlane listing to create the app in Play
|
||||
Console. Start with **Internal testing**, which supports up to 100 testers. The
|
||||
owner must choose the tester email list or Google Group. Record the actual app
|
||||
and opt-in URLs after creation. No public production rollout is configured.
|
||||
|
||||
Review the exact bundle and testing release before making it available to
|
||||
testers. Internal testing can begin before the full production listing is
|
||||
complete, and internal-only releases are exempt from the Data safety section.
|
||||
Before closed/open testing or production, complete the store text, images,
|
||||
privacy policy, account-deletion requirements, target audience, ads declaration,
|
||||
content rating and Data safety answers. Accept Play terms only with owner
|
||||
authorization. Tools work locally without an account; optional account/sync
|
||||
connects to the chosen Daochi node. Do not declare that the app never connects
|
||||
or that the node receives no identifiers. Biometric unlock stays on the device.
|
||||
|
||||
If Play App Signing is enabled, preserve the existing signing identity for
|
||||
cross-store compatibility rather than silently generating a different app key.
|
||||
An upload key and an app-signing key have different roles.
|
||||
|
||||
References: [create an app](https://support.google.com/googleplay/android-developer/answer/9859152),
|
||||
[testing tracks](https://support.google.com/googleplay/android-developer/answer/9845334),
|
||||
[target API](https://support.google.com/googleplay/android-developer/answer/11926878).
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"packageName": "xyz.waozi.pass",
|
||||
"title": "Werkzeug",
|
||||
"defaultLanguage": "en-US",
|
||||
"applicationType": "app",
|
||||
"category": "TOOLS",
|
||||
"price": "free",
|
||||
"contactEmail": "[email protected]",
|
||||
"website": "https://werk.waozi.xyz",
|
||||
"privacyPolicy": "https://werk.waozi.xyz/privacy.html",
|
||||
"initialTrack": "internal",
|
||||
"storeMetadata": "fastlane/metadata/android",
|
||||
"status": "prepared; Play Console creation, declarations and upload pending"
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import subprocess
|
||||
import tempfile
|
||||
import xml.etree.ElementTree as ET
|
||||
import zipfile
|
||||
from android_apk_check import elf_section_names
|
||||
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument("bundle", type=Path)
|
||||
@@ -22,7 +23,7 @@ subprocess.run(["java", "-jar", str(tool), "validate", "--bundle=" + str(bundle)
|
||||
xml = subprocess.check_output(["java", "-jar", str(tool), "dump", "manifest", "--bundle=" + str(bundle)], text=True)
|
||||
manifest = ET.fromstring(xml)
|
||||
android = "{http://schemas.android.com/apk/res/android}"
|
||||
assert manifest.get("package") == "xyz.waozi.pass", "Preserve the installed app ID"
|
||||
assert manifest.get("package") == "xyz.waozi.pass", "Werkzeug updates the existing Pass package"
|
||||
assert manifest.get(android + "versionName") == args.version
|
||||
assert int(manifest.find("uses-sdk").get(android + "targetSdkVersion")) >= 36
|
||||
assert manifest.find("application").get(android + "debuggable", "false") == "false"
|
||||
@@ -36,8 +37,11 @@ if not args.unsigned:
|
||||
expected = "1ac82db5bc8f742b8161fdd7083cefc16b39524dce7d103a7eb7f1ee19589c2d"
|
||||
assert fingerprints and {x.replace(":", "").lower() for x in fingerprints} == {expected}, "Bundle signer differs from the existing release key"
|
||||
with zipfile.ZipFile(bundle) as archive:
|
||||
for app in ("pass", "auth", "calculator", "clock", "entity", "apps"):
|
||||
assert f"base/assets/apps/{app}.zib" in archive.namelist(), f"Missing {app}"
|
||||
expected_bundles = {f"base/assets/apps/{app}.zx" for app in ("pass", "auth", "calculator", "clock", "entity", "apps")}
|
||||
actual_bundles = {name for name in archive.namelist() if name.startswith("base/assets/apps/") and not name.endswith("/")}
|
||||
assert actual_bundles == expected_bundles, f"Stale or missing app bundles: {actual_bundles ^ expected_bundles}"
|
||||
for name in expected_bundles:
|
||||
assert archive.read(name)[:4] == b"ZX\0\0", f"Obsolete bundle format: {name}"
|
||||
for font in ("ui.ttf", "emoji.ttf"):
|
||||
assert "base/assets/fonts/" + font in archive.namelist()
|
||||
abis = {x.split("/")[2] for x in archive.namelist() if x.startswith("base/lib/") and x.endswith(".so")}
|
||||
@@ -49,6 +53,7 @@ with zipfile.ZipFile(bundle) as archive:
|
||||
if not name.startswith("base/lib/arm64-v8a/") or not name.endswith(".so"): continue
|
||||
library = Path(directory) / Path(name).name
|
||||
library.write_bytes(archive.read(name))
|
||||
assert ".note.gnu.build-id" not in set(elf_section_names(library.read_bytes())), "Native library contains a build-path-dependent build ID"
|
||||
headers = subprocess.check_output(["readelf", "-lW", str(library)], text=True)
|
||||
loads = [line.split() for line in headers.splitlines() if line.strip().startswith("LOAD ")]
|
||||
assert loads and all(int(parts[-1], 16) >= 16384 for parts in loads), "Native library needs 16 KB alignment"
|
||||
|
||||
@@ -21,6 +21,20 @@ def dex_classes(data):
|
||||
yield data[offset:data.index(0, offset)].decode("ascii")
|
||||
|
||||
|
||||
def elf_section_names(data):
|
||||
assert data[:4] == b"\x7fELF" and data[5] == 1, "Expected a little-endian ELF library"
|
||||
wide = data[4] == 2
|
||||
assert data[4] in (1, 2), "Unsupported ELF class"
|
||||
table = struct.unpack_from("<Q" if wide else "<I", data, 40 if wide else 32)[0]
|
||||
size, count, strings_index = struct.unpack_from("<HHH", data, 58 if wide else 46)
|
||||
strings_entry = table + strings_index * size
|
||||
offset, length = struct.unpack_from("<QQ" if wide else "<II", data, strings_entry + (24 if wide else 16))
|
||||
strings = data[offset:offset + length]
|
||||
for index in range(count):
|
||||
name = struct.unpack_from("<I", data, table + index * size)[0]
|
||||
yield strings[name:strings.index(0, name)].decode("ascii")
|
||||
|
||||
|
||||
def check_apk(path):
|
||||
with ZipFile(path) as archive:
|
||||
names = archive.namelist()
|
||||
@@ -30,10 +44,17 @@ def check_apk(path):
|
||||
assert all(re.fullmatch(r"Lxyz/waozi/pass/R(?:\$[^;]+)?;", item) for item in classes), f"{path}: packaged application bytecode: {classes}"
|
||||
for font in ["ui.ttf", "emoji.ttf"]:
|
||||
assert "assets/fonts/" + font in names, f"{path}: missing {font}"
|
||||
for app in ["pass", "auth", "calculator", "clock"]:
|
||||
assert f"assets/apps/{app}.zib" in names, f"{path}: missing the {app} app"
|
||||
bundles = {f"assets/apps/{app}.zx" for app in ["apps", "entity", "pass", "auth", "calculator", "clock"]}
|
||||
packaged = {name for name in names if name.startswith("assets/apps/") and not name.endswith("/")}
|
||||
assert packaged == bundles, f"{path}: stale or missing app bundles: {packaged ^ bundles}"
|
||||
for name in bundles:
|
||||
assert archive.read(name)[:4] == b"ZX\0\0", f"{path}: {name} has an obsolete bundle format"
|
||||
assert "assets/pfp.png" in names, f"{path}: missing profile pictures"
|
||||
assert any(name.endswith("/libmain.so") for name in names), f"{path}: no NativeActivity payload"
|
||||
native = [name for name in names if name.endswith("/libmain.so")]
|
||||
assert native, f"{path}: no NativeActivity payload"
|
||||
for name in native:
|
||||
assert ".note.gnu.build-id" not in set(elf_section_names(archive.read(name))), \
|
||||
f"{path}: {name} contains a build-path-dependent build ID"
|
||||
print(f"{path}: native Ziran app; only generated resource classes")
|
||||
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ for path, expected_abis in [(fdroid, {"armeabi-v7a", "arm64-v8a"}),
|
||||
package = re.search(r"package: name='([^']+)' versionCode='([^']+)' versionName='([^']+)'", badging)
|
||||
assert package, f"{path}: no package identity"
|
||||
current = package.groups()
|
||||
assert current[0] == "xyz.waozi.pass", "Updating must preserve Pass's Android ID"
|
||||
assert current[0] == "xyz.waozi.pass", "Werkzeug updates the existing Pass package"
|
||||
assert current[2] == (root / "VERSION").read_text().strip(), "Channel added a version suffix"
|
||||
if identity is None:
|
||||
identity = current
|
||||
|
||||
@@ -13,6 +13,8 @@ root = Path(__file__).resolve().parents[1]
|
||||
output = root / "build/android-input"
|
||||
output.mkdir(parents=True, exist_ok=True)
|
||||
serial = os.environ.get("WERK_ANDROID_EMULATOR")
|
||||
if not serial and not os.environ.get("CI"):
|
||||
raise SystemExit("Set WERK_ANDROID_EMULATOR to your own private test emulator")
|
||||
if not serial:
|
||||
devices = subprocess.check_output(["adb", "devices"], text=True).splitlines()
|
||||
serial = next((line.split()[0] for line in devices if line.startswith("emulator-") and line.split()[-1] == "device"), None)
|
||||
@@ -20,8 +22,8 @@ if not serial or not serial.startswith("emulator-"):
|
||||
raise SystemExit("Android input tests require a private emulator")
|
||||
package = "xyz.waozi.pass"
|
||||
|
||||
def adb(*arguments, check=True):
|
||||
return subprocess.run(["adb", "-s", serial, *arguments], check=check, capture_output=True)
|
||||
def adb(*arguments, check=True, input=None):
|
||||
return subprocess.run(["adb", "-s", serial, *arguments], check=check, capture_output=True, input=input, timeout=90)
|
||||
|
||||
def shell(*arguments, check=True):
|
||||
return adb("shell", *arguments, check=check).stdout.decode()
|
||||
@@ -29,19 +31,37 @@ def shell(*arguments, check=True):
|
||||
def shot(name):
|
||||
(output / f"{name}.png").write_bytes(adb("exec-out", "screencap", "-p").stdout)
|
||||
|
||||
def find_label(word):
|
||||
shot("label")
|
||||
data = subprocess.check_output(["tesseract", str(output / "label.png"), "stdout", "--psm", "11", "-c", "tessedit_create_tsv=1"],
|
||||
stderr=subprocess.DEVNULL, text=True)
|
||||
for item in csv.DictReader(io.StringIO(data), delimiter="\t"):
|
||||
if item["text"].strip().lower() == word.lower():
|
||||
return (int(item["left"]) + int(item["width"]) // 2,
|
||||
int(item["top"]) + int(item["height"]) // 2)
|
||||
raise AssertionError(f"Could not find {word!r} in the private emulator")
|
||||
def find_label(word, timeout=15):
|
||||
deadline = time.monotonic() + timeout
|
||||
while True:
|
||||
shot("label")
|
||||
data = subprocess.check_output(["tesseract", str(output / "label.png"), "stdout", "--psm", "11", "-c", "tessedit_create_tsv=1"],
|
||||
stderr=subprocess.DEVNULL, text=True)
|
||||
for item in csv.DictReader(io.StringIO(data), delimiter="\t"):
|
||||
if item["text"].strip().lower() == word.lower():
|
||||
return (int(item["left"]) + int(item["width"]) // 2,
|
||||
int(item["top"]) + int(item["height"]) // 2)
|
||||
if time.monotonic() >= deadline:
|
||||
raise AssertionError(f"Could not find {word!r} in the private emulator")
|
||||
time.sleep(0.3)
|
||||
|
||||
def tap_label(word):
|
||||
tap(*find_label(word))
|
||||
|
||||
def scroll_to_label(word, direction="down"):
|
||||
hide_keyboard()
|
||||
for attempt in range(7):
|
||||
try:
|
||||
return find_label(word, timeout=2)
|
||||
except AssertionError:
|
||||
if attempt == 6:
|
||||
raise
|
||||
upper = top + int(150 * zoom)
|
||||
lower = bottom - int(80 * zoom)
|
||||
start, end = (lower, upper) if direction == "down" else (upper, lower)
|
||||
shell("input", "swipe", str(width // 2), str(start), str(width // 2), str(end), "450")
|
||||
time.sleep(PAUSE)
|
||||
|
||||
def dismiss_other_apps_not_responding():
|
||||
"""A slow emulator can show an "isn't responding" dialog for another app,
|
||||
the system or Werkzeug over Werkzeug, as CI's did. Choose Wait, found
|
||||
@@ -81,6 +101,23 @@ def tap(x, y):
|
||||
def type_text(text):
|
||||
shell("input", "text", text.replace(" ", "%s")); time.sleep(PAUSE + 0.05)
|
||||
|
||||
def hide_keyboard():
|
||||
if "mInputShown=true" in shell("dumpsys", "input_method"):
|
||||
shell("input", "keyevent", "4")
|
||||
for _ in range(20):
|
||||
time.sleep(0.15)
|
||||
if "mInputShown=true" not in shell("dumpsys", "input_method"):
|
||||
return
|
||||
raise AssertionError("Soft keyboard did not close")
|
||||
|
||||
|
||||
def fill_field(label, text):
|
||||
hide_keyboard()
|
||||
_, y = find_label(label)
|
||||
tap(int(90 * zoom), y + int(40 * zoom))
|
||||
type_text(text)
|
||||
|
||||
|
||||
def system_bars(height):
|
||||
"""The app's first and last rows in pixels: Werkzeug keeps its content
|
||||
between the status bar and the navigation bar."""
|
||||
@@ -94,12 +131,15 @@ def system_bars(height):
|
||||
bottom = int(navigation.group(1)) if navigation and int(navigation.group(2)) == height else height
|
||||
return top, bottom
|
||||
|
||||
apk = root / "build/werk-android-emulator.apk"
|
||||
apk = Path(os.environ.get("WERK_ANDROID_APK", root / "build/werk-android-emulator.apk"))
|
||||
check_apk(apk)
|
||||
try:
|
||||
adb("install", "-r", str(apk))
|
||||
# This is the test emulator and only this package's fixture data is cleared.
|
||||
shell("pm", "clear", package)
|
||||
shell("run-as", package, "mkdir", "-p", "files/profile")
|
||||
adb("shell", f"run-as {package} sh -c 'umask 077; cat > files/profile/settings.txt'",
|
||||
input=b"name=Fixture Person\ntheme_mode=1\n")
|
||||
shell("am", "start", "-n", package + "/android.app.NativeActivity")
|
||||
time.sleep(2); alive(); dismiss_other_apps_not_responding(); shot("launch")
|
||||
size = shell("wm", "size").strip().split()[-1]
|
||||
@@ -108,23 +148,25 @@ try:
|
||||
densities = re.findall(r"density: (\d+)", shell("wm", "density"))
|
||||
zoom = int(densities[-1]) / 160
|
||||
top, bottom = system_bars(height)
|
||||
# Pass's tile on the home screen, then Pass below Werkzeug's 56-unit bar.
|
||||
tap(int(127 * zoom), top + int(132 * zoom)); time.sleep(0.5); alive(); shot("pass")
|
||||
# The shared Apps screen can change layout; select the visible tool.
|
||||
tap_label("Pass"); time.sleep(0.5); alive(); shot("pass")
|
||||
find_label("Site")
|
||||
bar = 56
|
||||
tap(int(90 * zoom), top + int((55 + bar) * zoom)); type_text("example.com")
|
||||
fill_field("Site", "example.com")
|
||||
assert "mInputShown=true" in shell("dumpsys", "input_method"), "Soft keyboard did not open"
|
||||
tap(int(90 * zoom), top + int((130 + bar) * zoom)); type_text("alice")
|
||||
tap(int(90 * zoom), top + int((205 + bar) * zoom)); type_text("test master")
|
||||
fill_field("Login", "alice")
|
||||
fill_field("Master", "test master")
|
||||
shot("keyboard")
|
||||
shell("input", "keyevent", "4"); time.sleep(0.4); alive()
|
||||
hide_keyboard(); alive()
|
||||
tap(width // 2, bottom - int(35 * zoom))
|
||||
tap(int(90 * zoom), top + int((55 + bar) * zoom)); type_text("Android test")
|
||||
fill_field("Profile", "Android test")
|
||||
shell("input", "keyevent", "4"); time.sleep(0.3)
|
||||
tap(int(100 * zoom), top + int((105 + bar) * zoom))
|
||||
expected = "Android test\texample.com\talice\t16\t1\t1\t1\t1\t1\t\n"
|
||||
saved = shell("run-as", package, "cat", "files/apps/pass/profiles.tsv")
|
||||
assert saved == expected, f"Profile input/persistence mismatch: {saved!r}"
|
||||
assert "test master" not in saved
|
||||
print("Android: keyboard input and first saved profile verified", flush=True)
|
||||
# Generate from the saved profile and copy it.
|
||||
tap(int(100 * zoom), top + int((210 + bar) * zoom))
|
||||
# A slow emulator may still be deriving the password.
|
||||
@@ -134,8 +176,8 @@ try:
|
||||
tap(width // 2, bottom - int(35 * zoom))
|
||||
tap(int(90 * zoom), top + int((55 + bar) * zoom))
|
||||
shell("input", "keyevent", "123") # Move to the end.
|
||||
for _ in "Android test":
|
||||
shell("input", "keyevent", "67"); time.sleep(0.1)
|
||||
shell("input", "keyevent", *["67" for _ in "Android test"])
|
||||
time.sleep(0.5)
|
||||
dismiss_other_apps_not_responding()
|
||||
# Type the reference password as the new name. Pasting the copy works
|
||||
# through the keyboard's clipboard suggestion, which Gboard offers only
|
||||
@@ -153,26 +195,24 @@ try:
|
||||
assert shell("run-as", package, "cat", "files/apps/pass/profiles.tsv") == expected
|
||||
assert shell("run-as", package, "stat", "-c", "%a", "files/apps/pass/profiles.tsv").strip() == "600"
|
||||
shot("persisted")
|
||||
# Profile's name is one of Werkzeug's own fields. Each letter must land
|
||||
# after the last, at the caret the keyboard reports.
|
||||
tap(int(28 * zoom), top + int(28 * zoom)); time.sleep(0.5)
|
||||
tap(width - int(60 * zoom), top + int(28 * zoom)); time.sleep(0.8); alive()
|
||||
# Entity's profile card: the picture, then Name.
|
||||
tap(width // 2, top + int(357 * zoom)); type_text("Ada Lovelace")
|
||||
shot("profile-name")
|
||||
shell("input", "keyevent", "4"); time.sleep(0.3)
|
||||
# Leaving Profile saves it.
|
||||
tap(int(28 * zoom), top + int(28 * zoom)); time.sleep(0.5); alive()
|
||||
print("Android: second profile, restart and private permissions verified", flush=True)
|
||||
# The shared Profile retains existing names and edits appearance.
|
||||
tap_label("Fixture"); time.sleep(0.8); alive()
|
||||
settings = shell("run-as", package, "cat", "files/profile/settings.txt")
|
||||
assert "name=Ada Lovelace\n" in settings, f"Profile name typed out of order: {settings!r}"
|
||||
tap(width - int(60 * zoom), top + int(28 * zoom)); time.sleep(0.8)
|
||||
# Entity's Nodes section: the empty "Node address" field, then Add.
|
||||
tap_label("Node")
|
||||
assert "name=Fixture Person\n" in settings, "Profile lost the retained name"
|
||||
tap(*scroll_to_label("Dark")); time.sleep(0.5)
|
||||
settings = shell("run-as", package, "cat", "files/profile/settings.txt")
|
||||
assert "theme_mode=2\n" in settings and "name=Fixture Person\n" in settings
|
||||
shot("profile-appearance")
|
||||
print("Android: retained profile name and appearance verified", flush=True)
|
||||
tap(*scroll_to_label("Light"))
|
||||
# Android exposes Nodes directly in Profile.
|
||||
hide_keyboard()
|
||||
tap(*scroll_to_label("Node", direction="up"))
|
||||
type_text("https://sync.example.invalid:8443/")
|
||||
shell("input", "keyevent", "4"); time.sleep(1.2)
|
||||
# OCR misses Add's white label on the accent. It ends the row above
|
||||
# Appearance, wherever the keyboard left the page scrolled.
|
||||
_, appearance = find_label("Appearance")
|
||||
hide_keyboard()
|
||||
# The accent button's white label is not reliable in screenshot OCR.
|
||||
_, appearance = scroll_to_label("Appearance")
|
||||
tap(width - int(81 * zoom), appearance - int(56 * zoom)); time.sleep(0.8)
|
||||
settings = shell("run-as", package, "cat", "files/profile/settings.txt")
|
||||
assert "node=https://sync.example.invalid:8443\n" in settings, "Custom node was not saved"
|
||||
|
||||
@@ -10,14 +10,14 @@ kryon=$("$ziran" pkg path kryon)
|
||||
mingcute=$("$ziran" pkg path mingcute)
|
||||
mkdir -p build/app-logic-test
|
||||
"$ziran" bundle --root . --module-path apps/auth --module-path shared --module-path "$ziran_root/std" \
|
||||
--entry totp_test:Run -o build/app-logic-test/totp.zib apps/auth/totp_test.zi
|
||||
test "$("$ziran" run build/app-logic-test/totp.zib)" = 0
|
||||
--entry totp_test:Run -o build/app-logic-test/totp.zx apps/auth/totp_test.zi
|
||||
test "$("$ziran" run build/app-logic-test/totp.zx)" = 0
|
||||
"$ziran" bundle --root . --module-path apps/auth --module-path shared --module-path "$ziran_root/std" \
|
||||
--entry exports_test:Run -o build/app-logic-test/exports.zib apps/auth/exports_test.zi
|
||||
test "$("$ziran" run build/app-logic-test/exports.zib)" = 0
|
||||
--entry exports_test:Run -o build/app-logic-test/exports.zx apps/auth/exports_test.zi
|
||||
test "$("$ziran" run build/app-logic-test/exports.zx)" = 0
|
||||
"$ziran" bundle --root . --module-path apps/calculator --module-path "$ziran_root/std" \
|
||||
--entry arithmetic_test:Run -o build/app-logic-test/arithmetic.zib apps/calculator/arithmetic_test.zi
|
||||
test "$("$ziran" run build/app-logic-test/arithmetic.zib)" = 0
|
||||
--entry arithmetic_test:Run -o build/app-logic-test/arithmetic.zx apps/calculator/arithmetic_test.zi
|
||||
test "$("$ziran" run build/app-logic-test/arithmetic.zx)" = 0
|
||||
set -- --root tests --module-path apps/calculator \
|
||||
--module-path "kryon=$kryon/src/backend" --module-path "kryon=$kryon/src/ui" \
|
||||
--module-path "$kryon/src/ui" --module-path "$mingcute/src" --module-path "$ziran_root/std" \
|
||||
@@ -25,8 +25,8 @@ set -- --root tests --module-path apps/calculator \
|
||||
"$ziran" bundle "$@" --define KRYON_HOSTED_UI \
|
||||
--bind app_context:AppKeyHost=calculator_input_test:AppKeyHost \
|
||||
--bind app_context:AppFieldInputHost=calculator_input_test:AppFieldInputHost \
|
||||
-o build/app-logic-test/input.zib tests/calculator_input_test.zi
|
||||
test "$("$ziran" run build/app-logic-test/input.zib)" = 42
|
||||
-o build/app-logic-test/input.zx tests/calculator_input_test.zi
|
||||
test "$("$ziran" run build/app-logic-test/input.zx)" = 42
|
||||
"$ziran" build "$@" --target=c -o build/app-logic-test/input-c tests/calculator_input_test.zi
|
||||
${CC:-cc} -std=c99 -O2 -ffunction-sections -fdata-sections -Wl,--gc-sections \
|
||||
-I"$ziran_root/include" -Ibuild/app-logic-test/input-c build/app-logic-test/input-c/*.c -lm \
|
||||
|
||||
@@ -5,6 +5,7 @@ import hashlib
|
||||
import io
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
from pathlib import Path
|
||||
import shutil
|
||||
import subprocess
|
||||
@@ -19,7 +20,7 @@ assets = Path(os.environ.get("WERK_TEST_ASSETS", root / "build"))
|
||||
shutil.rmtree(work, ignore_errors=True)
|
||||
work.mkdir(parents=True)
|
||||
expected = (root / "apps-controller.sha256").read_text().strip()
|
||||
assert hashlib.sha256((assets / "apps/apps.zib").read_bytes()).hexdigest() == expected
|
||||
assert hashlib.sha256((assets / "apps/apps.zx").read_bytes()).hexdigest() == expected
|
||||
environment = dict(os.environ, HOME=str(work / "home"), WERK_DATA=str(work / "data"),
|
||||
WERK_ASSETS=str(assets), ENTITY_DATA=str(work / "entity"),
|
||||
XDG_CONFIG_HOME=str(work / "config"), XDG_DATA_HOME=str(work / "share"),
|
||||
@@ -79,6 +80,18 @@ def type_text(value):
|
||||
time.sleep(.3)
|
||||
|
||||
|
||||
def expect_title(expected):
|
||||
deadline = time.monotonic() + 10
|
||||
while time.monotonic() < deadline:
|
||||
assert app.poll() is None, "Werkzeug exited during navigation"
|
||||
title = command("xdotool", "getwindowname", window).strip()
|
||||
if title == expected:
|
||||
return
|
||||
time.sleep(.1)
|
||||
capture("navigation-failure")
|
||||
raise AssertionError(f"Expected window title {expected!r}, got {title!r}")
|
||||
|
||||
|
||||
app = subprocess.Popen([str(binary)], env=environment)
|
||||
try:
|
||||
deadline = time.monotonic() + 30
|
||||
@@ -86,7 +99,7 @@ try:
|
||||
while time.monotonic() < deadline:
|
||||
assert app.poll() is None, "Werkzeug exited during startup"
|
||||
found = subprocess.run(["xdotool", "search", "--onlyvisible", "--pid", str(app.pid)],
|
||||
env=environment, capture_output=True, text=True)
|
||||
env=environment, capture_output=True, text=True, timeout=5)
|
||||
if found.returncode == 0:
|
||||
window = found.stdout.splitlines()[0]
|
||||
break
|
||||
@@ -97,17 +110,17 @@ try:
|
||||
deadline = time.monotonic() + 20
|
||||
while True:
|
||||
home = capture("home")
|
||||
# The native fallback does not display package sizes.
|
||||
if "kB" in home or "MB" in home:
|
||||
if all(name in home for name in ("Pass", "Auth", "Calculator", "Clock", "Workbook")):
|
||||
break
|
||||
assert app.poll() is None, "Werkzeug exited while loading Apps"
|
||||
assert time.monotonic() < deadline, "Shared Apps controller did not render: " + home
|
||||
assert not re.search(r"\d[\d.]*\s*(?:kB|MB)\b", home, re.I), home
|
||||
for name in ("Auth", "Calculator", "Clock", "Workbook", "Pass"):
|
||||
click_word(name)
|
||||
assert command("xdotool", "getwindowname", window).strip() == name
|
||||
expect_title(name)
|
||||
assert "stopped" not in capture(name.lower()).lower(), name + " failed to run"
|
||||
click(28, 28)
|
||||
assert command("xdotool", "getwindowname", window).strip() == "Werkzeug"
|
||||
expect_title("Werkzeug")
|
||||
for width, height in ((360, 640), (720, 520)):
|
||||
command("xdotool", "windowsize", "--sync", window, str(width), str(height))
|
||||
text = capture(f"home-{width}")
|
||||
@@ -119,6 +132,7 @@ try:
|
||||
assert json.loads(preferences.read_text())["list"] is True
|
||||
text = capture("list")
|
||||
assert all(name in text for name in ("Pass", "Auth", "Calculator", "Clock", "Workbook")), text
|
||||
assert not re.search(r"\d[\d.]*\s*(?:kB|MB)\b", text, re.I), text
|
||||
click(100, 92)
|
||||
type_text("clock")
|
||||
text = capture("search")
|
||||
@@ -154,7 +168,7 @@ try:
|
||||
deadline = time.monotonic() + 30
|
||||
while True:
|
||||
found = subprocess.run(["xdotool", "search", "--onlyvisible", "--pid", str(app.pid)],
|
||||
env=environment, capture_output=True, text=True)
|
||||
env=environment, capture_output=True, text=True, timeout=5)
|
||||
if found.returncode == 0:
|
||||
window = found.stdout.splitlines()[0]
|
||||
if "Timepiece" in capture("restarted"):
|
||||
|
||||
@@ -8,7 +8,7 @@ work="$root/build/gui-smoke"
|
||||
rm -rf "$work"
|
||||
mkdir -p "$work/home/.local/lib/werk/apps"
|
||||
for app in pass auth calculator clock; do
|
||||
printf 'obsolete bundle\n' > "$work/home/.local/lib/werk/apps/$app.zib"
|
||||
printf 'obsolete bundle\n' > "$work/home/.local/lib/werk/apps/$app.zx"
|
||||
done
|
||||
for mode in light dark; do
|
||||
mkdir -p "$work/$mode/data/profile" "$work/$mode/cache"
|
||||
|
||||
@@ -29,6 +29,13 @@ for source in sorted((root / "packaging/linux").glob("xyz.waozi.werk*.desktop"))
|
||||
if args.bin_dir:
|
||||
content = content.replace("Exec=werk ", "Exec=" + executable(args.bin_dir / "werk") + " ")
|
||||
content = content.replace("TryExec=werk", "TryExec=" + str(args.bin_dir / "werk"))
|
||||
# Local launchers resolve their installed icon directly, including
|
||||
# custom data directories and paths containing spaces.
|
||||
for line in content.splitlines():
|
||||
if line.startswith("Icon="):
|
||||
name = line.removeprefix("Icon=")
|
||||
icon = args.data_dir / "icons/hicolor/512x512/apps" / (name + ".png")
|
||||
content = content.replace(line, "Icon=" + str(icon.resolve()))
|
||||
for target in destinations:
|
||||
if args.uninstall:
|
||||
target.unlink(missing_ok=True)
|
||||
|
||||
@@ -44,7 +44,10 @@ for tool, name in (("", "Werkzeug"), ("pass", "Pass"), ("auth", "Auth"),
|
||||
config.read(entry)
|
||||
values = config["Desktop Entry"]
|
||||
assert values["Name"] == name
|
||||
assert (share / "icons/hicolor/512x512/apps" / (values["Icon"] + ".png")).is_file()
|
||||
icon = Path(values["Icon"])
|
||||
if not icon.is_absolute():
|
||||
icon = share / "icons/hicolor/512x512/apps" / (values["Icon"] + ".png")
|
||||
assert icon.is_file()
|
||||
argv = shlex.split(values["Exec"])
|
||||
if not tool:
|
||||
argv = argv[:1]
|
||||
|
||||
@@ -14,7 +14,7 @@ rm -rf "$appdir"
|
||||
mkdir -p "$appdir/usr/bin" "$appdir/usr/lib/werk/apps" "$appdir/usr/share/applications" \
|
||||
"$appdir/usr/share/mime/packages" "$appdir/usr/share/metainfo" "$appdir/usr/share/icons/hicolor/512x512/apps" "$(dirname "$out")"
|
||||
cp "$artifacts/werk" "$appdir/usr/bin/werk"
|
||||
cp "$artifacts"/apps/*.zib "$appdir/usr/lib/werk/apps/"
|
||||
cp "$artifacts"/apps/*.zx "$appdir/usr/lib/werk/apps/"
|
||||
cp "$artifacts/pfp.png" "$appdir/usr/lib/werk/pfp.png"
|
||||
python3 "$root/scripts/install-launchers.py" --data-dir "$appdir/usr/share"
|
||||
cp "$root/packaging/linux/werk-bundle.xml" "$appdir/usr/share/mime/packages/werk-bundle.xml"
|
||||
|
||||
@@ -13,7 +13,7 @@ rm -rf "$stage"
|
||||
mkdir -p "$stage/DEBIAN" "$stage/usr/bin" "$stage/usr/lib/werk/apps" "$stage/usr/share/applications" \
|
||||
"$stage/usr/share/mime/packages" "$stage/usr/share/metainfo" "$stage/usr/share/icons/hicolor/512x512/apps" "$stage/usr/share/doc/werk" "$out"
|
||||
cp "$artifacts/werk" "$stage/usr/bin/werk"
|
||||
cp "$artifacts"/apps/*.zib "$stage/usr/lib/werk/apps/"
|
||||
cp "$artifacts"/apps/*.zx "$stage/usr/lib/werk/apps/"
|
||||
cp "$artifacts/pfp.png" "$stage/usr/lib/werk/pfp.png"
|
||||
python3 "$root/scripts/install-launchers.py" --data-dir "$stage/usr/share"
|
||||
cp "$root/packaging/linux/werk-bundle.xml" "$stage/usr/share/mime/packages/werk-bundle.xml"
|
||||
|
||||
@@ -18,6 +18,6 @@ for name in ReadStoreHost WriteStoreHost ClipboardCopyHost SecureAvailableHost S
|
||||
binds="$binds --bind app_context:$name=pass_state_host:$name"
|
||||
done
|
||||
"$ziran" bundle $args --entry pass_state_test:PassStateAnswer $binds \
|
||||
-o build/pass-state-test/portable.zib tests/pass_state_test.zi tests/pass_state_host.zi
|
||||
test "$("$ziran" run build/pass-state-test/portable.zib)" = 42
|
||||
-o build/pass-state-test/portable.zx tests/pass_state_test.zi tests/pass_state_host.zi
|
||||
test "$("$ziran" run build/pass-state-test/portable.zx)" = 42
|
||||
echo 'Pass state: native and portable tests pass'
|
||||
@@ -14,7 +14,7 @@ environment["YUE_DESKTOP_RECOVERY"] = "0"
|
||||
environment["WERK_TEST_PRIVATE_DISPLAY"] = "1"
|
||||
environment["SDL_RENDER_DRIVER"] = "software"
|
||||
read_fd, write_fd = os.pipe()
|
||||
server = subprocess.Popen(["Xvfb", "-displayfd", str(write_fd), "-screen", "0", "1280x1024x24", "-nolisten", "tcp"],
|
||||
server = subprocess.Popen(["Xvfb", "-noreset", "-displayfd", str(write_fd), "-screen", "0", "1280x1024x24", "-nolisten", "tcp"],
|
||||
pass_fds=(write_fd,), env=environment)
|
||||
os.close(write_fd)
|
||||
try:
|
||||
|
||||
@@ -71,8 +71,17 @@ def start():
|
||||
if found.returncode == 0:
|
||||
window = found.stdout.splitlines()[0]
|
||||
command("xdotool", "windowfocus", "--sync", window)
|
||||
time.sleep(0.5)
|
||||
return
|
||||
ready = time.monotonic() + 20
|
||||
while time.monotonic() < ready:
|
||||
assert app.poll() is None, "Werkzeug exited while loading its tools"
|
||||
capture("startup")
|
||||
with Image.open(output / "startup.png") as source:
|
||||
labels = source.convert("L").point(lambda value: 0 if value < 140 else 255)
|
||||
labels.resize((source.width * 3, source.height * 3)).save(output / "startup-labels.png")
|
||||
text = command("tesseract", str(output / "startup-labels.png"), "stdout", "--psm", "11")
|
||||
if all(name in text for name in ("Pass", "Auth", "Calculator", "Clock")):
|
||||
return
|
||||
raise AssertionError("Werkzeug did not finish drawing its home screen")
|
||||
time.sleep(0.1)
|
||||
raise AssertionError("Werkzeug did not show its window")
|
||||
|
||||
@@ -417,8 +426,8 @@ try:
|
||||
start()
|
||||
assert "paused=1\n" in account_file.read_text()
|
||||
click(390, 28)
|
||||
# The connected account's public-ID button opens management.
|
||||
click(210, 310)
|
||||
# Use the visible account-management action after a restart.
|
||||
click_scrolled("Manage", exact_case=True)
|
||||
capture("sync-paused-restarted")
|
||||
previous_account = account_file.read_text()
|
||||
scroll_down()
|
||||
|
||||
@@ -115,13 +115,13 @@ try:
|
||||
type_text('5'); key('Return'); expect('5')
|
||||
key('ctrl+z'); expect('')
|
||||
key('ctrl+y'); expect('5')
|
||||
bundle = work/'downloaded.zib'
|
||||
bundle = work/'downloaded.zx'
|
||||
selector.write_text(str(bundle)+'\n')
|
||||
menu('Download')
|
||||
for _ in range(50):
|
||||
if bundle.exists(): break
|
||||
time.sleep(.1)
|
||||
assert bundle.read_bytes() == (root/'build/apps/workbook.zib').read_bytes(), 'Downloaded bytes differ'
|
||||
assert bundle.read_bytes() == (root/'build/apps/workbook.zx').read_bytes(), 'Downloaded bytes differ'
|
||||
selector.write_text(str(fixture)+'\n')
|
||||
menu('Open')
|
||||
expect('11'); expect('=A1*3',col=1)
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
# Run the Ziran toolchain commit pinned by ziran.lock. Package commands fetch
|
||||
# their own locked sources into the user's Ziran cache.
|
||||
set -eu
|
||||
# An application's installation paths are not compiler build options. In
|
||||
# particular a staged BIN_DIR containing spaces must not become Ziran's
|
||||
# binary directory through GNU Make's recursive command-line environment.
|
||||
unset MAKEFLAGS MFLAGS MAKEOVERRIDES
|
||||
|
||||
root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
|
||||
cd "$root"
|
||||
|
||||
@@ -10,9 +10,9 @@ mkdir -p build/core-test
|
||||
"$ziran" build --target=c --root tests $paths -o build/core-test/c tests/core_main.zi
|
||||
${CC:-cc} -std=c99 -O2 -I"$ziran_root/include" -Ibuild/core-test/c build/core-test/c/*.c -o build/core-test/native
|
||||
build/core-test/native
|
||||
"$ziran" bundle $paths --root . --entry pass_core_test:PortableAnswer -o build/core-test/core.zib apps/pass/pass_core_test.zi
|
||||
test "$("$ziran" run build/core-test/core.zib)" = 42
|
||||
"$ziran" bundle $paths --root . --entry pass_core_test:PortableAnswer -o build/core-test/core.zx apps/pass/pass_core_test.zi
|
||||
test "$("$ziran" run build/core-test/core.zx)" = 42
|
||||
"$ziran" ir --root apps/pass $paths -o build/core-test/ir apps/pass/pass_core_test.zi
|
||||
"$ziran" bundle --root build/core-test/ir --entry pass_core_test:PortableAnswer -o build/core-test/saved.zib build/core-test/ir/pass_core_test.zir
|
||||
test "$("$ziran" run build/core-test/saved.zib)" = 42
|
||||
"$ziran" bundle --root build/core-test/ir --entry pass_core_test:PortableAnswer -o build/core-test/saved.zx build/core-test/ir/pass_core_test.zir
|
||||
test "$("$ziran" run build/core-test/saved.zx)" = 42
|
||||
echo 'Pass core: native, source bundle, and saved IR tests pass'
|
||||
+7
-7
@@ -574,7 +574,7 @@ LoadApps :: () {
|
||||
file: [64]u8
|
||||
CopyField(file[:], ids[index])
|
||||
used := ids[index].count
|
||||
suffix := ".zib"
|
||||
suffix := ".zx"
|
||||
position: s64 = 0
|
||||
while position < suffix.count {
|
||||
file[used + position] = suffix[position]
|
||||
@@ -586,11 +586,11 @@ LoadApps :: () {
|
||||
}
|
||||
#if #defined(PLATFORM_DESKTOP) && !#defined(PLATFORM_WEB) && !#defined(ANDROID_BUILD) {
|
||||
workbook_path: [PATH_LIMIT]u8
|
||||
unused LoadApp("workbook", PathJoin(workbook_path[:], root, "workbook.zib"))
|
||||
unused LoadApp("workbook", PathJoin(workbook_path[:], root, "workbook.zx"))
|
||||
}
|
||||
entity_path: [PATH_LIMIT]u8
|
||||
entity_index = app_count
|
||||
if !LoadApp("entity", PathJoin(entity_path[:], root, "entity.zib")) { entity_index = -1 }
|
||||
if !LoadApp("entity", PathJoin(entity_path[:], root, "entity.zx")) { entity_index = -1 }
|
||||
}
|
||||
|
||||
EntityAppIndex :: () -> s32 { return entity_index }
|
||||
@@ -776,11 +776,11 @@ AppWidgetCall :: (context: *void, module: *u8, function: *u8,
|
||||
name: [256]u8
|
||||
CopyField(name[:], TextUntilNul(app.id[:]))
|
||||
used := TextUntilNul(name[:]).count
|
||||
suffix := ".zib"
|
||||
for index: 0..3 { name[used + index] = suffix[index] }
|
||||
name[used + 4] = 0
|
||||
suffix := ".zx"
|
||||
for index: 0..suffix.count - 1 { name[used + index] = suffix[index] }
|
||||
name[used + suffix.count] = 0
|
||||
path: [4096]u8
|
||||
props := Picker.FilePickerProps.{.title = "Download app bundle", .filter = "App bundle | *.zib", .save = true, .suggested_name = TextUntilNul(name[:])}
|
||||
props := Picker.FilePickerProps.{.title = "Download app bundle", .filter = "App bundle | *.zx", .save = true, .suggested_name = TextUntilNul(name[:])}
|
||||
selected := Picker.PickFile(props, path[:])
|
||||
if selected == 0 { return "cancelled" }
|
||||
if selected != 1 { return "error" }
|
||||
|
||||
+3
-3
@@ -15,7 +15,7 @@ Launcher :: #import "apps/launcher";
|
||||
Controller :: #import "apps/controller";
|
||||
Rules :: #import "apps/protocol";
|
||||
|
||||
AppsControllerSha256 :: "8c5806d7ff5a4fdaf6b98a7668acbf0aad236ece1d5e68ffe1f7b268a1afb077";
|
||||
AppsControllerSha256 :: "952db2717c6d8500aa9a4c29b78c3028a19821e11bf511f39471bf04cf02c6cd";
|
||||
|
||||
HomePreference :: struct {
|
||||
title: [256]u8
|
||||
@@ -209,7 +209,7 @@ HomeAssetAllowed :: (path: string) -> bool { return path == "" }
|
||||
HomeCards :: (context: *void, indices: []s32, bounds: Rectangle,
|
||||
input: TextFieldInput, section_break: s32, columns: s32) -> bool {
|
||||
bytes: Vec(u8)
|
||||
BuilderPrint(*bytes, "\"title\":\"Werkzeug\",\"locale\":\"en\",\"presentation\":{\"mode\":\"%\",\"columns\":%",
|
||||
BuilderPrint(*bytes, "\"title\":\"Werkzeug\",\"locale\":\"en\",\"presentation\":{\"mode\":\"%\",\"hide_sizes\":true,\"columns\":%",
|
||||
ifx home.view.grid then "icon" else "list", columns)
|
||||
if section_break >= 0 { BuilderPrint(*bytes, ",\"section_break\":%", section_break) }
|
||||
BuilderPrint(*bytes, "},\"children\":[")
|
||||
@@ -258,7 +258,7 @@ SharedHome :: (session: Session, bounds: Rectangle, dark: bool, selected: s32,
|
||||
if home.unavailable { return false }
|
||||
if !home.controller.ready {
|
||||
path: [PATH_LIMIT]u8
|
||||
bytes, found := ReadBundle(PathJoin(path[:], BundledAppsRoot(), "apps.zib"))
|
||||
bytes, found := ReadBundle(PathJoin(path[:], BundledAppsRoot(), "apps.zx"))
|
||||
if !found { home.unavailable = true; return false }
|
||||
home.bytes = bytes
|
||||
if !Controller.AppControllerOpen(*home.controller, home.bytes, AppsControllerSha256,
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
Version :: "0.4.2";
|
||||
Version :: "0.4.4";
|
||||
+12
-5
@@ -60,6 +60,7 @@ secret_snapshot: [17664]u8;
|
||||
forget_pending: bool;
|
||||
choosing_picture: bool;
|
||||
profile_scroll: s32;
|
||||
profile_content_height: s32 = 760;
|
||||
// Where Profile's focused field was drawn, so Profile can scroll it into
|
||||
// view when it gains focus or the keyboard changes the visible height.
|
||||
focused_top: float32;
|
||||
@@ -332,10 +333,13 @@ ProfileScreen :: (session: Session, area: Rectangle, input: TextFieldInput, key:
|
||||
width := area.width - 32.0
|
||||
scroll := Scroll(session, ScrollProps.{.key = cast(u64)40,
|
||||
.bounds = Rectangle.{area.x + 16.0, area.y, width, area.height},
|
||||
.content_height = 760, .scroll_offset = profile_scroll})
|
||||
.content_height = profile_content_height, .scroll_offset = profile_scroll})
|
||||
profile_scroll = scroll.scroll_offset
|
||||
if scroll.opened {
|
||||
SyncSection(session, scroll.content.x, scroll.content.y + 16.0, scroll.content.width - 12.0, input)
|
||||
bottom := SyncSection(session, scroll.content.x, scroll.content.y + 16.0, scroll.content.width - 12.0, input)
|
||||
height := cast(s32)(bottom - scroll.content.y + 16.0)
|
||||
if height < 0 { height = 0 }
|
||||
profile_content_height = height
|
||||
unused End(session)
|
||||
}
|
||||
keyboard_wanted = code_field.focused || account_key_field.focused || passphrase_field.focused
|
||||
@@ -357,6 +361,7 @@ ProfileScreen :: (session: Session, area: Rectangle, input: TextFieldInput, key:
|
||||
unused CopyCString(ProfileNode(), node_text[:])
|
||||
entity_account = true
|
||||
profile_scroll = 0
|
||||
profile_content_height = 760
|
||||
}
|
||||
}
|
||||
|
||||
@@ -531,11 +536,12 @@ SaveNode :: () -> bool {
|
||||
|
||||
// The account that syncs Auth: create one, connect to one, or connect
|
||||
// another device to it.
|
||||
SyncSection :: (session: Session, x: float32, y: float32, width: float32, input: TextFieldInput) {
|
||||
SyncSection :: (session: Session, x: float32, y: float32, width: float32, input: TextFieldInput) -> float32 {
|
||||
Heading(session, cast(u64)46, "Account", x, y, width)
|
||||
y += 32.0
|
||||
#if #defined(PLATFORM_WEB) {
|
||||
Note(session, cast(u64)47, "Sync Auth between your devices in the desktop and Android apps.", x, y, width)
|
||||
return y + 48.0
|
||||
} else {
|
||||
half := (width - 8.0) / 2.0
|
||||
phase := LinkPhaseNow()
|
||||
@@ -549,7 +555,7 @@ SyncSection :: (session: Session, x: float32, y: float32, width: float32, input:
|
||||
if Action(session, 72, "Cancel", Rectangle.{x, y + 28.0, width, 40.0}, false) {
|
||||
LinkCancel()
|
||||
}
|
||||
return
|
||||
return y + 76.0
|
||||
}
|
||||
if Action(session, 70, "Create account", Rectangle.{x, y, width, 40.0}, false) {
|
||||
if !SaveNode() || !CreateAccount() {
|
||||
@@ -603,7 +609,7 @@ SyncSection :: (session: Session, x: float32, y: float32, width: float32, input:
|
||||
Label(session, cast(u64)86, TextUntilNul(account_key_status[:]), Rectangle.{x, y, width, 20.0}, 14)
|
||||
}
|
||||
}
|
||||
return
|
||||
return y + 48.0
|
||||
}
|
||||
Label(session, cast(u64)80, AccountServer(), Rectangle.{x, y, width, 24.0}, 14)
|
||||
y += 32.0
|
||||
@@ -666,6 +672,7 @@ SyncSection :: (session: Session, x: float32, y: float32, width: float32, input:
|
||||
forget_pending = true
|
||||
}
|
||||
}
|
||||
return y + 48.0
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -72,7 +72,7 @@
|
||||
<p>Native app with master-password storage protected by device authentication. Android 5.0 and newer; the Internet is used only for optional Auth sync.</p>
|
||||
<nav class="download-pills" aria-label="Android downloads">
|
||||
<a class="is-primary" href="/downloads/werk-android.apk">Direct APK</a>
|
||||
<a href="https://f-droid.org/packages/xyz.waozi.pass/">F-Droid listing ↗</a>
|
||||
<a href="https://gitlab.com/fdroid/fdroiddata/-/merge_requests/53912">F-Droid submission ↗</a>
|
||||
</nav>
|
||||
<p class="distribution-note">The F-Droid listing is currently unavailable. Use the direct APK above.</p>
|
||||
</div>
|
||||
|
||||
+21
-21
@@ -19,7 +19,7 @@
|
||||
},
|
||||
{
|
||||
"commit": "6a5f6189ca51e45a59c9ef77c4ec4112393225e0",
|
||||
"dependencies": {"kryon": "pc9c8f901448f635c", "kss": "p1b13dda539ed2a39", "mingcute": "pe1027b9d16704793"},
|
||||
"dependencies": {"kryon": "p430ae3c4377f052f", "kss": "p1b13dda539ed2a39", "mingcute": "pe1027b9d16704793"},
|
||||
"id": "p0e0131936e76f979",
|
||||
"name": "workbook",
|
||||
"ref": "master",
|
||||
@@ -27,12 +27,20 @@
|
||||
},
|
||||
{
|
||||
"commit": "1cb9df183089a77c8a16448a556186f30b261a98",
|
||||
"dependencies": {"kryon": "pc9c8f901448f635c"},
|
||||
"dependencies": {"kryon": "p430ae3c4377f052f"},
|
||||
"id": "p1b13dda539ed2a39",
|
||||
"name": "Kss",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/kryonlabs/kss.git"
|
||||
},
|
||||
{
|
||||
"commit": "1d2d987699cbb1a864b688a8b7ff480baa6ccf4d",
|
||||
"dependencies": {"raylib": "p5a77c9c35110e925"},
|
||||
"id": "p430ae3c4377f052f",
|
||||
"name": "kryon",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/kryonlabs/kryon.git"
|
||||
},
|
||||
{
|
||||
"commit": "e1f480f382d9443c4412133b55948374c77a5c21",
|
||||
"dependencies": {},
|
||||
@@ -68,22 +76,22 @@
|
||||
"source": true,
|
||||
"url": "https://github.com/LoupVaillant/Monocypher.git"
|
||||
},
|
||||
{
|
||||
"commit": "33f888e50ebefdbee532731fe2aad9ea6f5ab964",
|
||||
"dependencies": {"crypto": "pf039d7a776333200", "kryon": "p430ae3c4377f052f"},
|
||||
"id": "pae8cbf8fa0578bfc",
|
||||
"name": "Apps",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/waozixyz/apps.git"
|
||||
},
|
||||
{
|
||||
"commit": "f7449b379540f6f6f53c64c980cb5d4d4abcf399",
|
||||
"dependencies": {"daochi_client": "p0cff069893bdc938", "kryon": "pc9c8f901448f635c", "monocypher": "p809b4d31a48625a3", "qrcode": "p0dfa70137405b096"},
|
||||
"dependencies": {"daochi_client": "p0cff069893bdc938", "kryon": "p430ae3c4377f052f", "monocypher": "p809b4d31a48625a3", "qrcode": "p0dfa70137405b096"},
|
||||
"id": "pb7942f184eef21db",
|
||||
"name": "Entity",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/waozixyz/entity.git"
|
||||
},
|
||||
{
|
||||
"commit": "b1d4faa4de66ff799c8907ba131061be979bcc7a",
|
||||
"dependencies": {"raylib": "p5a77c9c35110e925"},
|
||||
"id": "pc9c8f901448f635c",
|
||||
"name": "kryon",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/kryonlabs/kryon.git"
|
||||
},
|
||||
{
|
||||
"commit": "9cc6872f75447c3a24c16764f9829d0f58751cb0",
|
||||
"dependencies": {},
|
||||
@@ -99,22 +107,14 @@
|
||||
"name": "crypto",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/ziranlang/crypto.git"
|
||||
},
|
||||
{
|
||||
"commit": "d016377ab37ba4fb754a799569e15a4c0d195b90",
|
||||
"dependencies": {"crypto": "pf039d7a776333200", "kryon": "pc9c8f901448f635c"},
|
||||
"id": "pf87aa276a2b568b4",
|
||||
"name": "Apps",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/waozixyz/apps.git"
|
||||
}
|
||||
],
|
||||
"root": {
|
||||
"dependencies": {"apps": "pf87aa276a2b568b4", "daochi_client": "p0cff069893bdc938", "entity": "pb7942f184eef21db", "kryon": "pc9c8f901448f635c", "liboqs": "p4b0a50b49959e674", "mingcute": "pe1027b9d16704793", "monocypher": "p809b4d31a48625a3", "oqs": "p7098ac9cd92f7e5f", "workbook": "p0e0131936e76f979"},
|
||||
"dependencies": {"apps": "pae8cbf8fa0578bfc", "daochi_client": "p0cff069893bdc938", "entity": "pb7942f184eef21db", "kryon": "p430ae3c4377f052f", "liboqs": "p4b0a50b49959e674", "mingcute": "pe1027b9d16704793", "monocypher": "p809b4d31a48625a3", "oqs": "p7098ac9cd92f7e5f", "workbook": "p0e0131936e76f979"},
|
||||
"name": "Werkzeug"
|
||||
},
|
||||
"toolchain": {
|
||||
"commit": "ec43f576478d4a0028d560be560585749a92f3ed",
|
||||
"commit": "e79092d2f6c3d95c773cfc1a202832dbf06cd799",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/ziranlang/ziran.git"
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user