2026-11-01 18:35:23 +01:00
|
|
|
// SPDX-License-Identifier: LGPL-3.0-only
|
|
|
|
|
// SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts®
|
2026-10-06 15:39:17 +02:00
|
|
|
|
|
|
|
|
import std;
|
|
|
|
|
import Crafter.Build;
|
fix: close what the security review before the first release found
A review of the tree and its history before they are published found no
key and no bank data in them. It did find these, each closed here.
The password dialog could be emptied (daemon). Shown(), which makes a
payee's name fit for polkit's dialog, let an & through. GNOME's older
agent (polkit-gnome) and MATE's put the message into Pango markup
unescaped, where a bare & fails to parse and leaves the dialog without
a message: paying "Tom & Jerry", or an order an app names so at
checkout, asked for the password and showed no amount and no payee.
Line and paragraph separators passed too. Shown() now shows & as +,
leaves out what draws nothing or places text (control and format
characters, the separators, what Unicode ignores by default, private
use) and makes any run of spaces one space. An address is held to it
instead of made fit: an e-mail address the dialog could not show
unchanged is refused before anyone is asked, since "a&b@..." shown as
"a+b@..." is somebody else's address.
A refused caller could look (daemon). A call that names an account, a
card, a request, a draft or a connector had it looked up, at the bank
where that takes it, before polkit was asked. So a caller polkit
refused was told whether it was there ("no account is called ..."),
and had the bank asked. Such a call now asks for View first
(HandleLookup), a call that only sees looks its account up after its
yes, and the connectors are read, which refreshes the accounts at the
bank, on the first yes instead of on the first call.
An app at checkout was told too much (checkout). The refusal of an
order's reference with another amount named the amount on record, and
a refusal by the bank carried the call it answered, whose path has the
user's and the account's ids at bunq. Neither does now.
A key typed by hand could be read off the screen (app). The line under
a key field showed how the key begins and its last four characters,
which is every character of it as it is typed. It shows how the key
begins and how long it is.
Every change asks for the password (packaging, app). Change, the
action for what changes something and pays nobody, passed without a
password in an active session, so any program of the user's could
cancel a scheduled payment, ask for money in their name or freeze a
card. It asks now (auth_self), a draft saved and a card frozen
included: only View passes as shipped, and loosening is an
administrator's rule, of which the README has an example. The app says
of every change where it is confirmed (AsksPassword is gone), and the
request form sends on its button as the pay form does: its review
sheet would be a second confirmation of what the dialog confirms.
What is built is what was tested (build). Crafter.Network, Crafter.DB
and Crafter.LintRules are named at the commits the tests ran against.
Crafter.Thread still follows its branch, which Crafter.Network's own
project file names, and so does Crafter.Network in the app's debug
build, where Crafter.Debug names it too and crafter-build refuses a
module built twice. lib/json.hpp was nlohmann/json's develop branch at
95e9a593 less its last newline, and called 3.12.0: it is that file
byte for byte now, and called what it is.
The published contract changes with this, before any release (design
rule 10): an e-mail address the dialog cannot show as it is is
refused, a call that looks something up needs View as well as its own
action, the checkout's errors say less, and the policy asks for the
password for Change. The XML, the policy and ShouldServeEveryUser,
which now holds the policy to its defaults, change together.
Reproduced and verified on the fake bus and the fake bunq. The new
checks of ShouldServeEveryUser fail on the worker of before (50 of
them: the & shown, the lookups answered, the bank asked) and pass now.
crafter-build test (17 tests), lint for the library, the app and the
fake system, and tests/coverage.sh (every line, function and region)
pass. Looked at on the made-up system, 360x760 dp at scale 2, dark, on
KDE Wayland: the key form with a key typed, the request form with its
wait and its result, a card frozen, and About. No picture in the
README shows a screen that changed.
Not tried: bunq's sandbox, a real polkit agent, the Flatpak builds.
The README's example rule ran against a stand-in for polkit's rule
engine only.
Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>
2026-11-19 16:09:48 +01:00
|
|
|
// Every dependency is named at a commit: a build runs each one's own project.cpp and links its code into the program
|
|
|
|
|
// that holds every user's bank keys, so what is built is what was built and tested here, not what a branch has come to
|
|
|
|
|
// since. Moving one forward is a change to this file, made with the tests run again. See also networkCommit below.
|
|
|
|
|
#pragma crafter dependency "https://forgejo.catcrafts.net/Catcrafts/Crafter.LintRules.git" commit "7d932892017800b4e1f1a15fe7aa49b3daee9ceb"
|
2026-11-01 18:35:23 +01:00
|
|
|
import Crafter.LintRules;
|
feat(app): add the Nostro app, a window for phones and desktops
Linux phones have no banking apps, and a command line is no answer on a
phone. The app does everything the nostro command does and, like it, only
talks to nostrod: it holds no key and no token.
- Nostro.Ui, a toolkit whose screens are functions that fill a frame, ported
from imsd-messages ca5cd72d; Nostro.App, the app's state, forms and screens;
Nostro.Ui.Shell, which puts them on a Wayland window with Crafter.Graphics;
nostro-app; and Nostro.DebugCommands for the --debug-api build.
- Client: every method also in an asynchronous form for an sd-event loop,
with DaemonMissing and OutcomeUnknown.
- nostrod's Flatpak is net.catcrafts.Nostrod now and the app takes
net.catcrafts.Nostro; install.sh moves the state. The app's Flatpak, both
Flatpaks cross-built for aarch64, and the licence texts they carry.
- nostro-fake-system, a made-up bus and bank with a real nostrod on them, to
look at the app against. The README's screenshots are taken on it.
- The nostro command: an API key's environment is the key's own to say, so
--sandbox is for bunq-oauth alone, and a virtual card is listed as VIRTUAL.
The published contract changes in three places, before any release (design
rule 10):
- Transactions' query takes `stored`: answered from what nostrod has stored,
without asking the bank. The app searches with it; before, every search was
a call to bunq.
- AddBunq's `environment` no longer chooses over what the key says of itself:
a key of the other environment is refused.
- SetCardStatus refuses to freeze or unfreeze a virtual card. bunq reports one
as DEACTIVATED however well it pays, and leaves it as it is when asked,
without an error.
The app is GPL-3.0-only, the library stays LGPL-3.0-only, and no code moved
from one to the other (design rule 13). Transaction's schema is unchanged.
Verified: the 17 tests pass with every line, function and region of what they
link run, and the five lint runs are clean. Every screen was looked at on the
made-up system, at a phone's and a desktop's sizes in the light and the dark
look, on Plasma under Wayland. What is said of bunq's cards comes from its
sandbox, with throwaway users, and from one real virtual card. Known to have
been used against production: connecting, and reading accounts, payments and
cards. Not known to have been tried: a payment from the app against bunq,
OAuth against bunq, and anything on a phone.
Building the app takes --graphics=, a Crafter.Graphics checkout on its branch
claude/nostro-app, until that branch is merged and pinned here.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-19 12:27:14 +01:00
|
|
|
// What puts Crafter.Debug into the app under --debug-api, and into no other build.
|
|
|
|
|
#pragma crafter dependency "https://forgejo.catcrafts.net/Catcrafts/Crafter.Debug.git" commit "98e92c1976f32c6f9beb6ea38a0522a3bbdabed7" project "tooling/project.cpp"
|
|
|
|
|
import Crafter.Debug.Build;
|
2026-10-06 15:39:17 +02:00
|
|
|
namespace fs = std::filesystem;
|
|
|
|
|
using namespace Crafter;
|
|
|
|
|
|
2026-11-01 18:35:23 +01:00
|
|
|
// Nostro.Checkout: what a shop app links to have nostrod pay an order, as a library of its own that needs no bank code,
|
|
|
|
|
// OpenSSL, Crafter.Network or Crafter.DB, only libsystemd. `--product=checkout` builds it alone; nostrod takes its names
|
|
|
|
|
// from it.
|
|
|
|
|
static Configuration CheckoutLibrary(std::span<const std::string_view> args, const std::vector<std::string>& compileFlags) {
|
|
|
|
|
Configuration checkout;
|
|
|
|
|
checkout.path = "./";
|
|
|
|
|
checkout.name = "nostro-checkout";
|
|
|
|
|
checkout.outputName = "nostro-checkout";
|
|
|
|
|
checkout.type = ConfigurationType::LibraryStatic;
|
|
|
|
|
checkout.linkFlags.push_back("-lsystemd");
|
|
|
|
|
ApplyStandardArgs(checkout, args);
|
|
|
|
|
checkout.compileFlags.insert(checkout.compileFlags.end(), compileFlags.begin(), compileFlags.end());
|
|
|
|
|
std::array<fs::path, 1> interfaces = {"interfaces/Nostro.Checkout"};
|
|
|
|
|
std::array<fs::path, 1> implementations = {"implementations/Nostro.Checkout"};
|
|
|
|
|
checkout.GetInterfacesAndImplementations(interfaces, implementations);
|
|
|
|
|
LintRules::AddLiteRules(checkout);
|
|
|
|
|
return checkout;
|
|
|
|
|
}
|
|
|
|
|
|
feat(app): add the Nostro app, a window for phones and desktops
Linux phones have no banking apps, and a command line is no answer on a
phone. The app does everything the nostro command does and, like it, only
talks to nostrod: it holds no key and no token.
- Nostro.Ui, a toolkit whose screens are functions that fill a frame, ported
from imsd-messages ca5cd72d; Nostro.App, the app's state, forms and screens;
Nostro.Ui.Shell, which puts them on a Wayland window with Crafter.Graphics;
nostro-app; and Nostro.DebugCommands for the --debug-api build.
- Client: every method also in an asynchronous form for an sd-event loop,
with DaemonMissing and OutcomeUnknown.
- nostrod's Flatpak is net.catcrafts.Nostrod now and the app takes
net.catcrafts.Nostro; install.sh moves the state. The app's Flatpak, both
Flatpaks cross-built for aarch64, and the licence texts they carry.
- nostro-fake-system, a made-up bus and bank with a real nostrod on them, to
look at the app against. The README's screenshots are taken on it.
- The nostro command: an API key's environment is the key's own to say, so
--sandbox is for bunq-oauth alone, and a virtual card is listed as VIRTUAL.
The published contract changes in three places, before any release (design
rule 10):
- Transactions' query takes `stored`: answered from what nostrod has stored,
without asking the bank. The app searches with it; before, every search was
a call to bunq.
- AddBunq's `environment` no longer chooses over what the key says of itself:
a key of the other environment is refused.
- SetCardStatus refuses to freeze or unfreeze a virtual card. bunq reports one
as DEACTIVATED however well it pays, and leaves it as it is when asked,
without an error.
The app is GPL-3.0-only, the library stays LGPL-3.0-only, and no code moved
from one to the other (design rule 13). Transaction's schema is unchanged.
Verified: the 17 tests pass with every line, function and region of what they
link run, and the five lint runs are clean. Every screen was looked at on the
made-up system, at a phone's and a desktop's sizes in the light and the dark
look, on Plasma under Wayland. What is said of bunq's cards comes from its
sandbox, with throwaway users, and from one real virtual card. Known to have
been used against production: connecting, and reading accounts, payments and
cards. Not known to have been tried: a payment from the app against bunq,
OAuth against bunq, and anything on a phone.
Building the app takes --graphics=, a Crafter.Graphics checkout on its branch
claude/nostro-app, until that branch is merged and pinned here.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-19 12:27:14 +01:00
|
|
|
// Nostro.Ui: the toolkit the app's screens are built with. It imports std alone, so its tests need no window, no bank
|
|
|
|
|
// and no bus, and it is built only for what depends on it: those tests, and the app.
|
|
|
|
|
static Configuration UiLibrary(std::span<const std::string_view> args, const std::vector<std::string>& compileFlags) {
|
|
|
|
|
Configuration ui;
|
|
|
|
|
ui.path = "./";
|
|
|
|
|
ui.name = "nostro-ui";
|
|
|
|
|
ui.outputName = "nostro-ui";
|
|
|
|
|
ui.type = ConfigurationType::LibraryStatic;
|
|
|
|
|
ApplyStandardArgs(ui, args);
|
|
|
|
|
ui.compileFlags.insert(ui.compileFlags.end(), compileFlags.begin(), compileFlags.end());
|
|
|
|
|
std::array<fs::path, 11> interfaces = {
|
|
|
|
|
"interfaces/Nostro.Ui",
|
|
|
|
|
"interfaces/Nostro.Ui-Geometry",
|
|
|
|
|
"interfaces/Nostro.Ui-Text",
|
|
|
|
|
"interfaces/Nostro.Ui-Edit",
|
|
|
|
|
"interfaces/Nostro.Ui-Gesture",
|
|
|
|
|
"interfaces/Nostro.Ui-Draw",
|
|
|
|
|
"interfaces/Nostro.Ui-Theme",
|
|
|
|
|
"interfaces/Nostro.Ui-Input",
|
|
|
|
|
"interfaces/Nostro.Ui-Context",
|
|
|
|
|
"interfaces/Nostro.Ui-Layout",
|
|
|
|
|
"interfaces/Nostro.Ui-Widgets",
|
|
|
|
|
};
|
|
|
|
|
std::array<fs::path, 7> implementations = {
|
|
|
|
|
"implementations/Nostro.Ui-Text",
|
|
|
|
|
"implementations/Nostro.Ui-Edit",
|
|
|
|
|
"implementations/Nostro.Ui-Gesture",
|
|
|
|
|
"implementations/Nostro.Ui-Draw",
|
|
|
|
|
"implementations/Nostro.Ui-Theme",
|
|
|
|
|
"implementations/Nostro.Ui-Context",
|
|
|
|
|
"implementations/Nostro.Ui-Widgets",
|
|
|
|
|
};
|
|
|
|
|
ui.GetInterfacesAndImplementations(interfaces, implementations);
|
|
|
|
|
LintRules::AddLiteRules(ui);
|
|
|
|
|
return ui;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Nostro.App: the app without its window: what it knows, what is filled in, and its screens, built with the toolkit
|
|
|
|
|
// over the library's client. Like the toolkit it is built only for what depends on it: its tests, and the app.
|
|
|
|
|
static Configuration AppLibrary(std::span<const std::string_view> args, const std::vector<std::string>& compileFlags, Configuration* library, Configuration* ui) {
|
|
|
|
|
Configuration app;
|
|
|
|
|
app.path = "./";
|
|
|
|
|
app.name = "nostro-app-core";
|
|
|
|
|
app.outputName = "nostro-app-core";
|
|
|
|
|
app.type = ConfigurationType::LibraryStatic;
|
|
|
|
|
app.dependencies = {library, ui};
|
|
|
|
|
ApplyStandardArgs(app, args);
|
|
|
|
|
app.compileFlags.insert(app.compileFlags.end(), compileFlags.begin(), compileFlags.end());
|
|
|
|
|
std::array<fs::path, 6> interfaces = {
|
|
|
|
|
"interfaces/Nostro.App",
|
|
|
|
|
"interfaces/Nostro.App-Banks",
|
|
|
|
|
"interfaces/Nostro.App-Format",
|
|
|
|
|
"interfaces/Nostro.App-Forms",
|
|
|
|
|
"interfaces/Nostro.App-Errors",
|
|
|
|
|
"interfaces/Nostro.App-App",
|
|
|
|
|
};
|
|
|
|
|
std::array<fs::path, 7> implementations = {
|
|
|
|
|
"implementations/Nostro.App-Banks",
|
|
|
|
|
"implementations/Nostro.App-Format",
|
|
|
|
|
"implementations/Nostro.App-Forms",
|
|
|
|
|
"implementations/Nostro.App-Errors",
|
|
|
|
|
"implementations/Nostro.App-App",
|
|
|
|
|
"implementations/Nostro.App-Screens",
|
|
|
|
|
"implementations/Nostro.App-Bunq",
|
|
|
|
|
};
|
|
|
|
|
app.GetInterfacesAndImplementations(interfaces, implementations);
|
|
|
|
|
LintRules::AddLiteRules(app);
|
|
|
|
|
return app;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Nostro.Ui.Shell: what puts the toolkit's screens on a display, on Crafter.Graphics and one sd-event loop. The one part
|
|
|
|
|
// of the app that needs a compositor and a graphics device, so only the app is built with it and no test is.
|
|
|
|
|
static Configuration ShellLibrary(std::span<const std::string_view> args, Configuration* ui, Configuration* graphics) {
|
|
|
|
|
Configuration shell;
|
|
|
|
|
shell.path = "./";
|
|
|
|
|
shell.name = "nostro-ui-shell";
|
|
|
|
|
shell.outputName = "nostro-ui-shell";
|
|
|
|
|
shell.type = ConfigurationType::LibraryStatic;
|
|
|
|
|
shell.linkFlags.push_back("-lsystemd");
|
|
|
|
|
shell.dependencies = {ui, graphics};
|
|
|
|
|
ApplyStandardArgs(shell, args);
|
|
|
|
|
std::array<fs::path, 5> interfaces = {
|
|
|
|
|
"interfaces/Nostro.Ui.Shell",
|
|
|
|
|
"interfaces/Nostro.Ui.Shell-Loop",
|
|
|
|
|
"interfaces/Nostro.Ui.Shell-Canvas",
|
|
|
|
|
"interfaces/Nostro.Ui.Shell-Window",
|
|
|
|
|
"interfaces/Nostro.Ui.Shell-Portal",
|
|
|
|
|
};
|
|
|
|
|
std::array<fs::path, 4> implementations = {
|
|
|
|
|
"implementations/Nostro.Ui.Shell-Loop",
|
|
|
|
|
"implementations/Nostro.Ui.Shell-Canvas",
|
|
|
|
|
"implementations/Nostro.Ui.Shell-Window",
|
|
|
|
|
"implementations/Nostro.Ui.Shell-Portal",
|
|
|
|
|
};
|
|
|
|
|
shell.GetInterfacesAndImplementations(interfaces, implementations);
|
|
|
|
|
LintRules::AddLiteRules(shell);
|
|
|
|
|
return shell;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// nostro-fake-system: the tests' fake bus and fake bunq with nostrod on them, as a program to run the app against.
|
|
|
|
|
static Configuration FakeSystem(std::span<const std::string_view> args, const std::vector<Define>& defines, const std::vector<Configuration*>& dependencies) {
|
|
|
|
|
Configuration fake;
|
|
|
|
|
fake.path = "./";
|
|
|
|
|
fake.name = "nostro-fake-system";
|
|
|
|
|
fake.outputName = "nostro-fake-system";
|
|
|
|
|
fake.defines = defines;
|
|
|
|
|
ApplyStandardArgs(fake, args);
|
|
|
|
|
fake.dependencies = dependencies;
|
|
|
|
|
std::array<fs::path, 0> interfaces = {};
|
|
|
|
|
std::array<fs::path, 1> implementations = {"tests/FakeSystem/main"};
|
|
|
|
|
fake.GetInterfacesAndImplementations(interfaces, implementations);
|
|
|
|
|
LintRules::AddLiteRules(fake);
|
|
|
|
|
return fake;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// `crafter-build … --product=app --debug-api run fake [the fake system's options] [-- the app's options]`: the app on
|
|
|
|
|
// the made-up system, both as the build before left them. `-r` passes a program no arguments, and the app has a few.
|
|
|
|
|
static std::int32_t RunOnFakeSystem(ScriptContext& ctx) {
|
|
|
|
|
const auto harness = std::ranges::find(ctx.project.dependencies, std::string_view("nostro-fake-system"), [](const Configuration* dependency) { return std::string_view(dependency->name); });
|
|
|
|
|
if(harness == ctx.project.dependencies.end()) {
|
|
|
|
|
throw std::runtime_error("the fake system is built with the app under --debug-api: name both before `run`");
|
|
|
|
|
}
|
|
|
|
|
const auto separator = std::ranges::find(ctx.args, std::string_view("--"));
|
|
|
|
|
std::string command = ShellQuote(((*harness)->BinDir() / (*harness)->outputName).string());
|
|
|
|
|
command += std::format(" --dir {}", ShellQuote((ctx.projectDir / "build" / "fake-system").string()));
|
|
|
|
|
for(const std::string& arg : std::ranges::subrange(ctx.args.begin(), separator)) {
|
|
|
|
|
command += std::format(" {}", ShellQuote(arg));
|
|
|
|
|
}
|
|
|
|
|
command += std::format(" --run {}", ShellQuote((ctx.project.ProgramDir() / ctx.project.outputName).string()));
|
|
|
|
|
if(separator != ctx.args.end()) {
|
|
|
|
|
for(const std::string& arg : std::ranges::subrange(separator + 1, ctx.args.end())) {
|
|
|
|
|
command += std::format(" {}", ShellQuote(arg));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return ctx.Run(command);
|
|
|
|
|
}
|
|
|
|
|
|
2026-10-06 15:39:17 +02:00
|
|
|
extern "C" Configuration CrafterBuildProject(std::span<const std::string_view> args) {
|
|
|
|
|
constexpr std::string_view bankArgName = "--banks=";
|
|
|
|
|
|
|
|
|
|
bool lib = false;
|
2026-11-01 18:35:23 +01:00
|
|
|
bool dbusRequested = false;
|
2026-10-06 15:39:17 +02:00
|
|
|
bool bunqEnabled = false;
|
2026-11-01 18:35:23 +01:00
|
|
|
bool coverage = false;
|
|
|
|
|
std::string profileRuntime;
|
|
|
|
|
constexpr std::string_view profileRuntimeArgName = "--profile-runtime=";
|
feat(app): add the Nostro app, a window for phones and desktops
Linux phones have no banking apps, and a command line is no answer on a
phone. The app does everything the nostro command does and, like it, only
talks to nostrod: it holds no key and no token.
- Nostro.Ui, a toolkit whose screens are functions that fill a frame, ported
from imsd-messages ca5cd72d; Nostro.App, the app's state, forms and screens;
Nostro.Ui.Shell, which puts them on a Wayland window with Crafter.Graphics;
nostro-app; and Nostro.DebugCommands for the --debug-api build.
- Client: every method also in an asynchronous form for an sd-event loop,
with DaemonMissing and OutcomeUnknown.
- nostrod's Flatpak is net.catcrafts.Nostrod now and the app takes
net.catcrafts.Nostro; install.sh moves the state. The app's Flatpak, both
Flatpaks cross-built for aarch64, and the licence texts they carry.
- nostro-fake-system, a made-up bus and bank with a real nostrod on them, to
look at the app against. The README's screenshots are taken on it.
- The nostro command: an API key's environment is the key's own to say, so
--sandbox is for bunq-oauth alone, and a virtual card is listed as VIRTUAL.
The published contract changes in three places, before any release (design
rule 10):
- Transactions' query takes `stored`: answered from what nostrod has stored,
without asking the bank. The app searches with it; before, every search was
a call to bunq.
- AddBunq's `environment` no longer chooses over what the key says of itself:
a key of the other environment is refused.
- SetCardStatus refuses to freeze or unfreeze a virtual card. bunq reports one
as DEACTIVATED however well it pays, and leaves it as it is when asked,
without an error.
The app is GPL-3.0-only, the library stays LGPL-3.0-only, and no code moved
from one to the other (design rule 13). Transaction's schema is unchanged.
Verified: the 17 tests pass with every line, function and region of what they
link run, and the five lint runs are clean. Every screen was looked at on the
made-up system, at a phone's and a desktop's sizes in the light and the dark
look, on Plasma under Wayland. What is said of bunq's cards comes from its
sandbox, with throwaway users, and from one real virtual card. Known to have
been used against production: connecting, and reading accounts, payments and
cards. Not known to have been tried: a payment from the app against bunq,
OAuth against bunq, and anything on a phone.
Building the app takes --graphics=, a Crafter.Graphics checkout on its branch
claude/nostro-app, until that branch is merged and pinned here.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-19 12:27:14 +01:00
|
|
|
// What a build makes: the CLI by default, "daemon" for nostrod, "app" for the window, "checkout" for the checkout
|
|
|
|
|
// client library, or "fake-system" for a made-up system to look at the app against.
|
2026-11-01 18:35:23 +01:00
|
|
|
std::string product;
|
|
|
|
|
constexpr std::string_view productArgName = "--product=";
|
feat(app): add the Nostro app, a window for phones and desktops
Linux phones have no banking apps, and a command line is no answer on a
phone. The app does everything the nostro command does and, like it, only
talks to nostrod: it holds no key and no token.
- Nostro.Ui, a toolkit whose screens are functions that fill a frame, ported
from imsd-messages ca5cd72d; Nostro.App, the app's state, forms and screens;
Nostro.Ui.Shell, which puts them on a Wayland window with Crafter.Graphics;
nostro-app; and Nostro.DebugCommands for the --debug-api build.
- Client: every method also in an asynchronous form for an sd-event loop,
with DaemonMissing and OutcomeUnknown.
- nostrod's Flatpak is net.catcrafts.Nostrod now and the app takes
net.catcrafts.Nostro; install.sh moves the state. The app's Flatpak, both
Flatpaks cross-built for aarch64, and the licence texts they carry.
- nostro-fake-system, a made-up bus and bank with a real nostrod on them, to
look at the app against. The README's screenshots are taken on it.
- The nostro command: an API key's environment is the key's own to say, so
--sandbox is for bunq-oauth alone, and a virtual card is listed as VIRTUAL.
The published contract changes in three places, before any release (design
rule 10):
- Transactions' query takes `stored`: answered from what nostrod has stored,
without asking the bank. The app searches with it; before, every search was
a call to bunq.
- AddBunq's `environment` no longer chooses over what the key says of itself:
a key of the other environment is refused.
- SetCardStatus refuses to freeze or unfreeze a virtual card. bunq reports one
as DEACTIVATED however well it pays, and leaves it as it is when asked,
without an error.
The app is GPL-3.0-only, the library stays LGPL-3.0-only, and no code moved
from one to the other (design rule 13). Transaction's schema is unchanged.
Verified: the 17 tests pass with every line, function and region of what they
link run, and the five lint runs are clean. Every screen was looked at on the
made-up system, at a phone's and a desktop's sizes in the light and the dark
look, on Plasma under Wayland. What is said of bunq's cards comes from its
sandbox, with throwaway users, and from one real virtual card. Known to have
been used against production: connecting, and reading accounts, payments and
cards. Not known to have been tried: a payment from the app against bunq,
OAuth against bunq, and anything on a phone.
Building the app takes --graphics=, a Crafter.Graphics checkout on its branch
claude/nostro-app, until that branch is merged and pinned here.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-19 12:27:14 +01:00
|
|
|
// The app with Crafter.Debug in it, for an agent to drive: nostro's own flag, which no dependency is handed.
|
|
|
|
|
bool debugApiRequested = false;
|
|
|
|
|
constexpr std::string_view debugApiArgName = "--debug-api";
|
2026-10-06 15:39:17 +02:00
|
|
|
|
|
|
|
|
std::vector<std::string> depArgs;
|
|
|
|
|
|
|
|
|
|
Configuration libcfg;
|
|
|
|
|
|
|
|
|
|
for(std::string_view arg : args) {
|
|
|
|
|
if(arg == "--lib") {
|
|
|
|
|
lib = true;
|
2026-11-01 18:35:23 +01:00
|
|
|
} else if(arg == "--dbus") {
|
|
|
|
|
dbusRequested = true;
|
|
|
|
|
} else if(arg.starts_with(productArgName)) {
|
|
|
|
|
product = arg.substr(productArgName.size());
|
feat(app): add the Nostro app, a window for phones and desktops
Linux phones have no banking apps, and a command line is no answer on a
phone. The app does everything the nostro command does and, like it, only
talks to nostrod: it holds no key and no token.
- Nostro.Ui, a toolkit whose screens are functions that fill a frame, ported
from imsd-messages ca5cd72d; Nostro.App, the app's state, forms and screens;
Nostro.Ui.Shell, which puts them on a Wayland window with Crafter.Graphics;
nostro-app; and Nostro.DebugCommands for the --debug-api build.
- Client: every method also in an asynchronous form for an sd-event loop,
with DaemonMissing and OutcomeUnknown.
- nostrod's Flatpak is net.catcrafts.Nostrod now and the app takes
net.catcrafts.Nostro; install.sh moves the state. The app's Flatpak, both
Flatpaks cross-built for aarch64, and the licence texts they carry.
- nostro-fake-system, a made-up bus and bank with a real nostrod on them, to
look at the app against. The README's screenshots are taken on it.
- The nostro command: an API key's environment is the key's own to say, so
--sandbox is for bunq-oauth alone, and a virtual card is listed as VIRTUAL.
The published contract changes in three places, before any release (design
rule 10):
- Transactions' query takes `stored`: answered from what nostrod has stored,
without asking the bank. The app searches with it; before, every search was
a call to bunq.
- AddBunq's `environment` no longer chooses over what the key says of itself:
a key of the other environment is refused.
- SetCardStatus refuses to freeze or unfreeze a virtual card. bunq reports one
as DEACTIVATED however well it pays, and leaves it as it is when asked,
without an error.
The app is GPL-3.0-only, the library stays LGPL-3.0-only, and no code moved
from one to the other (design rule 13). Transaction's schema is unchanged.
Verified: the 17 tests pass with every line, function and region of what they
link run, and the five lint runs are clean. Every screen was looked at on the
made-up system, at a phone's and a desktop's sizes in the light and the dark
look, on Plasma under Wayland. What is said of bunq's cards comes from its
sandbox, with throwaway users, and from one real virtual card. Known to have
been used against production: connecting, and reading accounts, payments and
cards. Not known to have been tried: a payment from the app against bunq,
OAuth against bunq, and anything on a phone.
Building the app takes --graphics=, a Crafter.Graphics checkout on its branch
claude/nostro-app, until that branch is merged and pinned here.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-19 12:27:14 +01:00
|
|
|
} else if(arg == debugApiArgName) {
|
|
|
|
|
debugApiRequested = true;
|
2026-11-01 18:35:23 +01:00
|
|
|
} else if(arg == "--coverage") {
|
|
|
|
|
coverage = true;
|
|
|
|
|
} else if(arg.starts_with(profileRuntimeArgName)) {
|
|
|
|
|
profileRuntime = arg.substr(profileRuntimeArgName.size());
|
2026-10-06 15:39:17 +02:00
|
|
|
} else if(arg.starts_with(bankArgName)) {
|
|
|
|
|
for(std::ranges::subrange<std::string_view::iterator> part : std::views::split(arg.substr(bankArgName.size()), ',')) {
|
|
|
|
|
std::string_view name(part.begin(), part.end());
|
|
|
|
|
if(name == "bunq") {
|
|
|
|
|
bunqEnabled = true;
|
|
|
|
|
libcfg.defines.push_back({"NOSTRO_BUNQ_ENABLED"});
|
|
|
|
|
} else {
|
|
|
|
|
throw std::runtime_error(std::format("unknown connector '{}' in {}", name, bankArgName));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
depArgs.emplace_back(arg);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-11-01 18:35:23 +01:00
|
|
|
// --coverage builds the library, the CLI and the tests with clang's source-based coverage, and every process writes
|
|
|
|
|
// its counts where LLVM_PROFILE_FILE says. The flags go to clang's front end so the driver does not link a profile
|
|
|
|
|
// runtime by itself: --profile-runtime= names compiler-rt's libclang_rt.profile archive for a toolchain without one.
|
|
|
|
|
std::vector<std::string> coverageCompileFlags;
|
|
|
|
|
std::vector<std::string> coverageLinkFlags;
|
|
|
|
|
if(coverage) {
|
|
|
|
|
coverageCompileFlags = {"-Xclang", "-fprofile-instrument=clang", "-Xclang", "-fcoverage-mapping"};
|
|
|
|
|
if(profileRuntime.empty()) {
|
|
|
|
|
coverageLinkFlags = {"-fprofile-instr-generate"};
|
|
|
|
|
} else {
|
|
|
|
|
coverageLinkFlags = {profileRuntime, "-Wl,-u,__llvm_profile_runtime"};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
libcfg.compileFlags.insert(libcfg.compileFlags.end(), coverageCompileFlags.begin(), coverageCompileFlags.end());
|
|
|
|
|
|
|
|
|
|
if(product == "checkout") {
|
|
|
|
|
return CheckoutLibrary(args, coverageCompileFlags);
|
|
|
|
|
}
|
feat(app): add the Nostro app, a window for phones and desktops
Linux phones have no banking apps, and a command line is no answer on a
phone. The app does everything the nostro command does and, like it, only
talks to nostrod: it holds no key and no token.
- Nostro.Ui, a toolkit whose screens are functions that fill a frame, ported
from imsd-messages ca5cd72d; Nostro.App, the app's state, forms and screens;
Nostro.Ui.Shell, which puts them on a Wayland window with Crafter.Graphics;
nostro-app; and Nostro.DebugCommands for the --debug-api build.
- Client: every method also in an asynchronous form for an sd-event loop,
with DaemonMissing and OutcomeUnknown.
- nostrod's Flatpak is net.catcrafts.Nostrod now and the app takes
net.catcrafts.Nostro; install.sh moves the state. The app's Flatpak, both
Flatpaks cross-built for aarch64, and the licence texts they carry.
- nostro-fake-system, a made-up bus and bank with a real nostrod on them, to
look at the app against. The README's screenshots are taken on it.
- The nostro command: an API key's environment is the key's own to say, so
--sandbox is for bunq-oauth alone, and a virtual card is listed as VIRTUAL.
The published contract changes in three places, before any release (design
rule 10):
- Transactions' query takes `stored`: answered from what nostrod has stored,
without asking the bank. The app searches with it; before, every search was
a call to bunq.
- AddBunq's `environment` no longer chooses over what the key says of itself:
a key of the other environment is refused.
- SetCardStatus refuses to freeze or unfreeze a virtual card. bunq reports one
as DEACTIVATED however well it pays, and leaves it as it is when asked,
without an error.
The app is GPL-3.0-only, the library stays LGPL-3.0-only, and no code moved
from one to the other (design rule 13). Transaction's schema is unchanged.
Verified: the 17 tests pass with every line, function and region of what they
link run, and the five lint runs are clean. Every screen was looked at on the
made-up system, at a phone's and a desktop's sizes in the light and the dark
look, on Plasma under Wayland. What is said of bunq's cards comes from its
sandbox, with throwaway users, and from one real virtual card. Known to have
been used against production: connecting, and reading accounts, payments and
cards. Not known to have been tried: a payment from the app against bunq,
OAuth against bunq, and anything on a phone.
Building the app takes --graphics=, a Crafter.Graphics checkout on its branch
claude/nostro-app, until that branch is merged and pinned here.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-19 12:27:14 +01:00
|
|
|
if(!product.empty() && product != "daemon" && product != "app" && product != "fake-system") {
|
2026-11-01 18:35:23 +01:00
|
|
|
throw std::runtime_error(std::format("unknown product '{}' in {}", product, productArgName));
|
|
|
|
|
}
|
2026-10-06 15:39:17 +02:00
|
|
|
if(!bunqEnabled) {
|
|
|
|
|
throw std::runtime_error("must enable atleast one bank");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// The crypto partition is only needed by banks that sign their requests.
|
|
|
|
|
const bool opensslEnabled = bunqEnabled;
|
|
|
|
|
if(opensslEnabled) {
|
|
|
|
|
libcfg.defines.push_back({"NOSTRO_OPENSSL_ENABLED"});
|
|
|
|
|
}
|
|
|
|
|
|
2026-11-01 18:35:23 +01:00
|
|
|
// nostrod and the CLI talk over D-Bus (sd-bus, from libsystemd). A consumer building the library alone gets that part
|
|
|
|
|
// only when it asks with --dbus, so the library does not make every consumer depend on libsystemd. The wire carries
|
|
|
|
|
// bunq's listing types, so it needs bunq.
|
|
|
|
|
const bool dbusEnabled = (!lib || dbusRequested) && bunqEnabled;
|
|
|
|
|
if(dbusEnabled) {
|
|
|
|
|
libcfg.defines.push_back({"NOSTRO_DBUS_ENABLED"});
|
|
|
|
|
}
|
|
|
|
|
Configuration* checkout = new Configuration(CheckoutLibrary(args, coverageCompileFlags));
|
feat(app): add the Nostro app, a window for phones and desktops
Linux phones have no banking apps, and a command line is no answer on a
phone. The app does everything the nostro command does and, like it, only
talks to nostrod: it holds no key and no token.
- Nostro.Ui, a toolkit whose screens are functions that fill a frame, ported
from imsd-messages ca5cd72d; Nostro.App, the app's state, forms and screens;
Nostro.Ui.Shell, which puts them on a Wayland window with Crafter.Graphics;
nostro-app; and Nostro.DebugCommands for the --debug-api build.
- Client: every method also in an asynchronous form for an sd-event loop,
with DaemonMissing and OutcomeUnknown.
- nostrod's Flatpak is net.catcrafts.Nostrod now and the app takes
net.catcrafts.Nostro; install.sh moves the state. The app's Flatpak, both
Flatpaks cross-built for aarch64, and the licence texts they carry.
- nostro-fake-system, a made-up bus and bank with a real nostrod on them, to
look at the app against. The README's screenshots are taken on it.
- The nostro command: an API key's environment is the key's own to say, so
--sandbox is for bunq-oauth alone, and a virtual card is listed as VIRTUAL.
The published contract changes in three places, before any release (design
rule 10):
- Transactions' query takes `stored`: answered from what nostrod has stored,
without asking the bank. The app searches with it; before, every search was
a call to bunq.
- AddBunq's `environment` no longer chooses over what the key says of itself:
a key of the other environment is refused.
- SetCardStatus refuses to freeze or unfreeze a virtual card. bunq reports one
as DEACTIVATED however well it pays, and leaves it as it is when asked,
without an error.
The app is GPL-3.0-only, the library stays LGPL-3.0-only, and no code moved
from one to the other (design rule 13). Transaction's schema is unchanged.
Verified: the 17 tests pass with every line, function and region of what they
link run, and the five lint runs are clean. Every screen was looked at on the
made-up system, at a phone's and a desktop's sizes in the light and the dark
look, on Plasma under Wayland. What is said of bunq's cards comes from its
sandbox, with throwaway users, and from one real virtual card. Known to have
been used against production: connecting, and reading accounts, payments and
cards. Not known to have been tried: a payment from the app against bunq,
OAuth against bunq, and anything on a phone.
Building the app takes --graphics=, a Crafter.Graphics checkout on its branch
claude/nostro-app, until that branch is merged and pinned here.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-19 12:27:14 +01:00
|
|
|
Configuration* ui = new Configuration(UiLibrary(args, coverageCompileFlags));
|
2026-11-01 18:35:23 +01:00
|
|
|
|
|
|
|
|
// nostro uses Crafter.Network's HTTP/1.1 client alone: --no-quic leaves out msquic, its CMake build, and the runpath
|
feat(app): add the Nostro app, a window for phones and desktops
Linux phones have no banking apps, and a command line is no answer on a
phone. The app does everything the nostro command does and, like it, only
talks to nostrod: it holds no key and no token.
- Nostro.Ui, a toolkit whose screens are functions that fill a frame, ported
from imsd-messages ca5cd72d; Nostro.App, the app's state, forms and screens;
Nostro.Ui.Shell, which puts them on a Wayland window with Crafter.Graphics;
nostro-app; and Nostro.DebugCommands for the --debug-api build.
- Client: every method also in an asynchronous form for an sd-event loop,
with DaemonMissing and OutcomeUnknown.
- nostrod's Flatpak is net.catcrafts.Nostrod now and the app takes
net.catcrafts.Nostro; install.sh moves the state. The app's Flatpak, both
Flatpaks cross-built for aarch64, and the licence texts they carry.
- nostro-fake-system, a made-up bus and bank with a real nostrod on them, to
look at the app against. The README's screenshots are taken on it.
- The nostro command: an API key's environment is the key's own to say, so
--sandbox is for bunq-oauth alone, and a virtual card is listed as VIRTUAL.
The published contract changes in three places, before any release (design
rule 10):
- Transactions' query takes `stored`: answered from what nostrod has stored,
without asking the bank. The app searches with it; before, every search was
a call to bunq.
- AddBunq's `environment` no longer chooses over what the key says of itself:
a key of the other environment is refused.
- SetCardStatus refuses to freeze or unfreeze a virtual card. bunq reports one
as DEACTIVATED however well it pays, and leaves it as it is when asked,
without an error.
The app is GPL-3.0-only, the library stays LGPL-3.0-only, and no code moved
from one to the other (design rule 13). Transaction's schema is unchanged.
Verified: the 17 tests pass with every line, function and region of what they
link run, and the five lint runs are clean. Every screen was looked at on the
made-up system, at a phone's and a desktop's sizes in the light and the dark
look, on Plasma under Wayland. What is said of bunq's cards comes from its
sandbox, with throwaway users, and from one real virtual card. Known to have
been used against production: connecting, and reading accounts, payments and
cards. Not known to have been tried: a payment from the app against bunq,
OAuth against bunq, and anything on a phone.
Building the app takes --graphics=, a Crafter.Graphics checkout on its branch
claude/nostro-app, until that branch is merged and pinned here.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-19 12:27:14 +01:00
|
|
|
// into the building user's cache that a binary linked against it carries. Crafter.Debug talks QUIC, and takes
|
|
|
|
|
// Crafter.Network with the args it is handed: a dependency two paths share gets one list of them, so the app's
|
|
|
|
|
// debug build has QUIC in.
|
|
|
|
|
const bool debugApi = debugApiRequested && product == "app";
|
2026-11-01 18:35:23 +01:00
|
|
|
std::vector<std::string> networkArgs = depArgs;
|
feat(app): add the Nostro app, a window for phones and desktops
Linux phones have no banking apps, and a command line is no answer on a
phone. The app does everything the nostro command does and, like it, only
talks to nostrod: it holds no key and no token.
- Nostro.Ui, a toolkit whose screens are functions that fill a frame, ported
from imsd-messages ca5cd72d; Nostro.App, the app's state, forms and screens;
Nostro.Ui.Shell, which puts them on a Wayland window with Crafter.Graphics;
nostro-app; and Nostro.DebugCommands for the --debug-api build.
- Client: every method also in an asynchronous form for an sd-event loop,
with DaemonMissing and OutcomeUnknown.
- nostrod's Flatpak is net.catcrafts.Nostrod now and the app takes
net.catcrafts.Nostro; install.sh moves the state. The app's Flatpak, both
Flatpaks cross-built for aarch64, and the licence texts they carry.
- nostro-fake-system, a made-up bus and bank with a real nostrod on them, to
look at the app against. The README's screenshots are taken on it.
- The nostro command: an API key's environment is the key's own to say, so
--sandbox is for bunq-oauth alone, and a virtual card is listed as VIRTUAL.
The published contract changes in three places, before any release (design
rule 10):
- Transactions' query takes `stored`: answered from what nostrod has stored,
without asking the bank. The app searches with it; before, every search was
a call to bunq.
- AddBunq's `environment` no longer chooses over what the key says of itself:
a key of the other environment is refused.
- SetCardStatus refuses to freeze or unfreeze a virtual card. bunq reports one
as DEACTIVATED however well it pays, and leaves it as it is when asked,
without an error.
The app is GPL-3.0-only, the library stays LGPL-3.0-only, and no code moved
from one to the other (design rule 13). Transaction's schema is unchanged.
Verified: the 17 tests pass with every line, function and region of what they
link run, and the five lint runs are clean. Every screen was looked at on the
made-up system, at a phone's and a desktop's sizes in the light and the dark
look, on Plasma under Wayland. What is said of bunq's cards comes from its
sandbox, with throwaway users, and from one real virtual card. Known to have
been used against production: connecting, and reading accounts, payments and
cards. Not known to have been tried: a payment from the app against bunq,
OAuth against bunq, and anything on a phone.
Building the app takes --graphics=, a Crafter.Graphics checkout on its branch
claude/nostro-app, until that branch is merged and pinned here.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-19 12:27:14 +01:00
|
|
|
if(!debugApi) {
|
|
|
|
|
networkArgs.emplace_back("--no-quic");
|
|
|
|
|
}
|
fix: close what the security review before the first release found
A review of the tree and its history before they are published found no
key and no bank data in them. It did find these, each closed here.
The password dialog could be emptied (daemon). Shown(), which makes a
payee's name fit for polkit's dialog, let an & through. GNOME's older
agent (polkit-gnome) and MATE's put the message into Pango markup
unescaped, where a bare & fails to parse and leaves the dialog without
a message: paying "Tom & Jerry", or an order an app names so at
checkout, asked for the password and showed no amount and no payee.
Line and paragraph separators passed too. Shown() now shows & as +,
leaves out what draws nothing or places text (control and format
characters, the separators, what Unicode ignores by default, private
use) and makes any run of spaces one space. An address is held to it
instead of made fit: an e-mail address the dialog could not show
unchanged is refused before anyone is asked, since "a&b@..." shown as
"a+b@..." is somebody else's address.
A refused caller could look (daemon). A call that names an account, a
card, a request, a draft or a connector had it looked up, at the bank
where that takes it, before polkit was asked. So a caller polkit
refused was told whether it was there ("no account is called ..."),
and had the bank asked. Such a call now asks for View first
(HandleLookup), a call that only sees looks its account up after its
yes, and the connectors are read, which refreshes the accounts at the
bank, on the first yes instead of on the first call.
An app at checkout was told too much (checkout). The refusal of an
order's reference with another amount named the amount on record, and
a refusal by the bank carried the call it answered, whose path has the
user's and the account's ids at bunq. Neither does now.
A key typed by hand could be read off the screen (app). The line under
a key field showed how the key begins and its last four characters,
which is every character of it as it is typed. It shows how the key
begins and how long it is.
Every change asks for the password (packaging, app). Change, the
action for what changes something and pays nobody, passed without a
password in an active session, so any program of the user's could
cancel a scheduled payment, ask for money in their name or freeze a
card. It asks now (auth_self), a draft saved and a card frozen
included: only View passes as shipped, and loosening is an
administrator's rule, of which the README has an example. The app says
of every change where it is confirmed (AsksPassword is gone), and the
request form sends on its button as the pay form does: its review
sheet would be a second confirmation of what the dialog confirms.
What is built is what was tested (build). Crafter.Network, Crafter.DB
and Crafter.LintRules are named at the commits the tests ran against.
Crafter.Thread still follows its branch, which Crafter.Network's own
project file names, and so does Crafter.Network in the app's debug
build, where Crafter.Debug names it too and crafter-build refuses a
module built twice. lib/json.hpp was nlohmann/json's develop branch at
95e9a593 less its last newline, and called 3.12.0: it is that file
byte for byte now, and called what it is.
The published contract changes with this, before any release (design
rule 10): an e-mail address the dialog cannot show as it is is
refused, a call that looks something up needs View as well as its own
action, the checkout's errors say less, and the policy asks for the
password for Change. The XML, the policy and ShouldServeEveryUser,
which now holds the policy to its defaults, change together.
Reproduced and verified on the fake bus and the fake bunq. The new
checks of ShouldServeEveryUser fail on the worker of before (50 of
them: the & shown, the lookups answered, the bank asked) and pass now.
crafter-build test (17 tests), lint for the library, the app and the
fake system, and tests/coverage.sh (every line, function and region)
pass. Looked at on the made-up system, 360x760 dp at scale 2, dark, on
KDE Wayland: the key form with a key typed, the request form with its
wait and its result, a card frozen, and About. No picture in the
README shows a screen that changed.
Not tried: bunq's sandbox, a real polkit agent, the Flatpak builds.
The README's example rule ran against a stand-in for polkit's rule
engine only.
Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>
2026-11-19 16:09:48 +01:00
|
|
|
// The commits nostro is built and tested against (see the pragmas at the top). The app's debug build is the one
|
|
|
|
|
// that follows Crafter.Network's branch: Crafter.Debug names it without a commit, and crafter-build refuses a
|
|
|
|
|
// program that would hold two builds of one module ("module Crafter.Network is built twice"). That build is for
|
|
|
|
|
// the made-up system and the sandbox, and is not packaged. Crafter.Thread comes with Crafter.Network, whose own
|
|
|
|
|
// project file names it without a commit.
|
|
|
|
|
constexpr std::string_view networkCommit = "79a2f126292755142f22f7d109f38d52067f5449";
|
|
|
|
|
constexpr std::string_view dbCommit = "38c9076e1df71d9beebc95deded65d827b802f3d";
|
2026-10-06 15:39:17 +02:00
|
|
|
Configuration* network = GitProject({
|
fix: close what the security review before the first release found
A review of the tree and its history before they are published found no
key and no bank data in them. It did find these, each closed here.
The password dialog could be emptied (daemon). Shown(), which makes a
payee's name fit for polkit's dialog, let an & through. GNOME's older
agent (polkit-gnome) and MATE's put the message into Pango markup
unescaped, where a bare & fails to parse and leaves the dialog without
a message: paying "Tom & Jerry", or an order an app names so at
checkout, asked for the password and showed no amount and no payee.
Line and paragraph separators passed too. Shown() now shows & as +,
leaves out what draws nothing or places text (control and format
characters, the separators, what Unicode ignores by default, private
use) and makes any run of spaces one space. An address is held to it
instead of made fit: an e-mail address the dialog could not show
unchanged is refused before anyone is asked, since "a&b@..." shown as
"a+b@..." is somebody else's address.
A refused caller could look (daemon). A call that names an account, a
card, a request, a draft or a connector had it looked up, at the bank
where that takes it, before polkit was asked. So a caller polkit
refused was told whether it was there ("no account is called ..."),
and had the bank asked. Such a call now asks for View first
(HandleLookup), a call that only sees looks its account up after its
yes, and the connectors are read, which refreshes the accounts at the
bank, on the first yes instead of on the first call.
An app at checkout was told too much (checkout). The refusal of an
order's reference with another amount named the amount on record, and
a refusal by the bank carried the call it answered, whose path has the
user's and the account's ids at bunq. Neither does now.
A key typed by hand could be read off the screen (app). The line under
a key field showed how the key begins and its last four characters,
which is every character of it as it is typed. It shows how the key
begins and how long it is.
Every change asks for the password (packaging, app). Change, the
action for what changes something and pays nobody, passed without a
password in an active session, so any program of the user's could
cancel a scheduled payment, ask for money in their name or freeze a
card. It asks now (auth_self), a draft saved and a card frozen
included: only View passes as shipped, and loosening is an
administrator's rule, of which the README has an example. The app says
of every change where it is confirmed (AsksPassword is gone), and the
request form sends on its button as the pay form does: its review
sheet would be a second confirmation of what the dialog confirms.
What is built is what was tested (build). Crafter.Network, Crafter.DB
and Crafter.LintRules are named at the commits the tests ran against.
Crafter.Thread still follows its branch, which Crafter.Network's own
project file names, and so does Crafter.Network in the app's debug
build, where Crafter.Debug names it too and crafter-build refuses a
module built twice. lib/json.hpp was nlohmann/json's develop branch at
95e9a593 less its last newline, and called 3.12.0: it is that file
byte for byte now, and called what it is.
The published contract changes with this, before any release (design
rule 10): an e-mail address the dialog cannot show as it is is
refused, a call that looks something up needs View as well as its own
action, the checkout's errors say less, and the policy asks for the
password for Change. The XML, the policy and ShouldServeEveryUser,
which now holds the policy to its defaults, change together.
Reproduced and verified on the fake bus and the fake bunq. The new
checks of ShouldServeEveryUser fail on the worker of before (50 of
them: the & shown, the lookups answered, the bank asked) and pass now.
crafter-build test (17 tests), lint for the library, the app and the
fake system, and tests/coverage.sh (every line, function and region)
pass. Looked at on the made-up system, 360x760 dp at scale 2, dark, on
KDE Wayland: the key form with a key typed, the request form with its
wait and its result, a card frozen, and About. No picture in the
README shows a screen that changed.
Not tried: bunq's sandbox, a real polkit agent, the Flatpak builds.
The README's example rule ran against a stand-in for polkit's rule
engine only.
Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>
2026-11-19 16:09:48 +01:00
|
|
|
.source = { .url = "https://forgejo.catcrafts.net/Catcrafts/Crafter.Network.git", .commit = debugApi ? std::string() : std::string(networkCommit) },
|
2026-11-01 18:35:23 +01:00
|
|
|
.args = networkArgs,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Configuration* db = GitProject({
|
fix: close what the security review before the first release found
A review of the tree and its history before they are published found no
key and no bank data in them. It did find these, each closed here.
The password dialog could be emptied (daemon). Shown(), which makes a
payee's name fit for polkit's dialog, let an & through. GNOME's older
agent (polkit-gnome) and MATE's put the message into Pango markup
unescaped, where a bare & fails to parse and leaves the dialog without
a message: paying "Tom & Jerry", or an order an app names so at
checkout, asked for the password and showed no amount and no payee.
Line and paragraph separators passed too. Shown() now shows & as +,
leaves out what draws nothing or places text (control and format
characters, the separators, what Unicode ignores by default, private
use) and makes any run of spaces one space. An address is held to it
instead of made fit: an e-mail address the dialog could not show
unchanged is refused before anyone is asked, since "a&b@..." shown as
"a+b@..." is somebody else's address.
A refused caller could look (daemon). A call that names an account, a
card, a request, a draft or a connector had it looked up, at the bank
where that takes it, before polkit was asked. So a caller polkit
refused was told whether it was there ("no account is called ..."),
and had the bank asked. Such a call now asks for View first
(HandleLookup), a call that only sees looks its account up after its
yes, and the connectors are read, which refreshes the accounts at the
bank, on the first yes instead of on the first call.
An app at checkout was told too much (checkout). The refusal of an
order's reference with another amount named the amount on record, and
a refusal by the bank carried the call it answered, whose path has the
user's and the account's ids at bunq. Neither does now.
A key typed by hand could be read off the screen (app). The line under
a key field showed how the key begins and its last four characters,
which is every character of it as it is typed. It shows how the key
begins and how long it is.
Every change asks for the password (packaging, app). Change, the
action for what changes something and pays nobody, passed without a
password in an active session, so any program of the user's could
cancel a scheduled payment, ask for money in their name or freeze a
card. It asks now (auth_self), a draft saved and a card frozen
included: only View passes as shipped, and loosening is an
administrator's rule, of which the README has an example. The app says
of every change where it is confirmed (AsksPassword is gone), and the
request form sends on its button as the pay form does: its review
sheet would be a second confirmation of what the dialog confirms.
What is built is what was tested (build). Crafter.Network, Crafter.DB
and Crafter.LintRules are named at the commits the tests ran against.
Crafter.Thread still follows its branch, which Crafter.Network's own
project file names, and so does Crafter.Network in the app's debug
build, where Crafter.Debug names it too and crafter-build refuses a
module built twice. lib/json.hpp was nlohmann/json's develop branch at
95e9a593 less its last newline, and called 3.12.0: it is that file
byte for byte now, and called what it is.
The published contract changes with this, before any release (design
rule 10): an e-mail address the dialog cannot show as it is is
refused, a call that looks something up needs View as well as its own
action, the checkout's errors say less, and the policy asks for the
password for Change. The XML, the policy and ShouldServeEveryUser,
which now holds the policy to its defaults, change together.
Reproduced and verified on the fake bus and the fake bunq. The new
checks of ShouldServeEveryUser fail on the worker of before (50 of
them: the & shown, the lookups answered, the bank asked) and pass now.
crafter-build test (17 tests), lint for the library, the app and the
fake system, and tests/coverage.sh (every line, function and region)
pass. Looked at on the made-up system, 360x760 dp at scale 2, dark, on
KDE Wayland: the key form with a key typed, the request form with its
wait and its result, a card frozen, and About. No picture in the
README shows a screen that changed.
Not tried: bunq's sandbox, a real polkit agent, the Flatpak builds.
The README's example rule ran against a stand-in for polkit's rule
engine only.
Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>
2026-11-19 16:09:48 +01:00
|
|
|
.source = { .url = "https://forgejo.catcrafts.net/Catcrafts/Crafter.DB.git", .commit = std::string(dbCommit) },
|
2026-10-06 15:39:17 +02:00
|
|
|
.args = depArgs,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
libcfg.path = "./";
|
|
|
|
|
libcfg.name = "nostro";
|
|
|
|
|
libcfg.outputName = "nostro";
|
|
|
|
|
libcfg.type = ConfigurationType::LibraryStatic;
|
2026-11-01 18:35:23 +01:00
|
|
|
libcfg.dependencies = {network, db};
|
|
|
|
|
if(dbusEnabled) {
|
|
|
|
|
libcfg.dependencies.push_back(checkout);
|
|
|
|
|
}
|
2026-10-06 15:39:17 +02:00
|
|
|
|
|
|
|
|
if(opensslEnabled) {
|
|
|
|
|
libcfg.linkFlags.push_back("-lssl");
|
|
|
|
|
libcfg.linkFlags.push_back("-lcrypto");
|
|
|
|
|
}
|
2026-11-01 18:35:23 +01:00
|
|
|
if(dbusEnabled) {
|
|
|
|
|
libcfg.linkFlags.push_back("-lsystemd");
|
|
|
|
|
}
|
2026-10-06 15:39:17 +02:00
|
|
|
|
|
|
|
|
ApplyStandardArgs(libcfg, args);
|
|
|
|
|
|
|
|
|
|
std::vector<fs::path> libInterfaces = {
|
|
|
|
|
"interfaces/Nostro",
|
|
|
|
|
"interfaces/Nostro-Connector",
|
|
|
|
|
"interfaces/Nostro-Transaction",
|
|
|
|
|
"interfaces/Nostro-Account",
|
|
|
|
|
"interfaces/Nostro-Banks",
|
|
|
|
|
"interfaces/Nostro-Bunq",
|
|
|
|
|
"interfaces/Nostro-Crypto",
|
|
|
|
|
"interfaces/Nostro-Currency",
|
2026-10-31 20:50:57 +01:00
|
|
|
"interfaces/Nostro-File",
|
|
|
|
|
"interfaces/Nostro-Utils",
|
2026-11-01 18:35:23 +01:00
|
|
|
"interfaces/Nostro-Bus",
|
|
|
|
|
"interfaces/Nostro-Client",
|
|
|
|
|
"interfaces/Nostro-Daemon",
|
2026-10-06 15:39:17 +02:00
|
|
|
};
|
|
|
|
|
std::vector<fs::path> libImplementations = {
|
2026-10-31 20:50:57 +01:00
|
|
|
"implementations/Nostro-Account",
|
|
|
|
|
"implementations/Nostro-File",
|
2026-10-06 15:39:17 +02:00
|
|
|
"implementations/Nostro-Connector"
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
if(bunqEnabled) {
|
|
|
|
|
libImplementations.push_back("implementations/Nostro-Bunq");
|
2026-11-01 18:35:23 +01:00
|
|
|
libImplementations.push_back("implementations/Nostro-Bunq-Payments");
|
2026-10-06 15:39:17 +02:00
|
|
|
}
|
|
|
|
|
if(opensslEnabled) {
|
|
|
|
|
libImplementations.push_back("implementations/Nostro-Crypto");
|
|
|
|
|
}
|
2026-11-01 18:35:23 +01:00
|
|
|
if(dbusEnabled) {
|
|
|
|
|
libImplementations.push_back("implementations/Nostro-Bus");
|
|
|
|
|
libImplementations.push_back("implementations/Nostro-Client");
|
|
|
|
|
libImplementations.push_back("implementations/Nostro-Daemon");
|
|
|
|
|
libImplementations.push_back("implementations/Nostro-Daemon-Worker");
|
|
|
|
|
}
|
2026-10-06 15:39:17 +02:00
|
|
|
|
|
|
|
|
libcfg.GetInterfacesAndImplementations(libInterfaces, libImplementations);
|
2026-11-01 18:35:23 +01:00
|
|
|
LintRules::AddLiteRules(libcfg);
|
2026-10-06 15:39:17 +02:00
|
|
|
|
|
|
|
|
if(lib) {
|
|
|
|
|
return libcfg;
|
|
|
|
|
}
|
|
|
|
|
|
2026-11-01 18:35:23 +01:00
|
|
|
// Both executables switch on the same bank and D-Bus flags as the library, and share the one library: two
|
|
|
|
|
// configurations exporting the same module in one build are an error.
|
|
|
|
|
const auto defines = libcfg.defines;
|
|
|
|
|
Configuration* library = new Configuration(std::move(libcfg));
|
feat(app): add the Nostro app, a window for phones and desktops
Linux phones have no banking apps, and a command line is no answer on a
phone. The app does everything the nostro command does and, like it, only
talks to nostrod: it holds no key and no token.
- Nostro.Ui, a toolkit whose screens are functions that fill a frame, ported
from imsd-messages ca5cd72d; Nostro.App, the app's state, forms and screens;
Nostro.Ui.Shell, which puts them on a Wayland window with Crafter.Graphics;
nostro-app; and Nostro.DebugCommands for the --debug-api build.
- Client: every method also in an asynchronous form for an sd-event loop,
with DaemonMissing and OutcomeUnknown.
- nostrod's Flatpak is net.catcrafts.Nostrod now and the app takes
net.catcrafts.Nostro; install.sh moves the state. The app's Flatpak, both
Flatpaks cross-built for aarch64, and the licence texts they carry.
- nostro-fake-system, a made-up bus and bank with a real nostrod on them, to
look at the app against. The README's screenshots are taken on it.
- The nostro command: an API key's environment is the key's own to say, so
--sandbox is for bunq-oauth alone, and a virtual card is listed as VIRTUAL.
The published contract changes in three places, before any release (design
rule 10):
- Transactions' query takes `stored`: answered from what nostrod has stored,
without asking the bank. The app searches with it; before, every search was
a call to bunq.
- AddBunq's `environment` no longer chooses over what the key says of itself:
a key of the other environment is refused.
- SetCardStatus refuses to freeze or unfreeze a virtual card. bunq reports one
as DEACTIVATED however well it pays, and leaves it as it is when asked,
without an error.
The app is GPL-3.0-only, the library stays LGPL-3.0-only, and no code moved
from one to the other (design rule 13). Transaction's schema is unchanged.
Verified: the 17 tests pass with every line, function and region of what they
link run, and the five lint runs are clean. Every screen was looked at on the
made-up system, at a phone's and a desktop's sizes in the light and the dark
look, on Plasma under Wayland. What is said of bunq's cards comes from its
sandbox, with throwaway users, and from one real virtual card. Known to have
been used against production: connecting, and reading accounts, payments and
cards. Not known to have been tried: a payment from the app against bunq,
OAuth against bunq, and anything on a phone.
Building the app takes --graphics=, a Crafter.Graphics checkout on its branch
claude/nostro-app, until that branch is merged and pinned here.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-19 12:27:14 +01:00
|
|
|
Configuration* appCore = new Configuration(AppLibrary(args, coverageCompileFlags, library, ui));
|
2026-11-01 18:35:23 +01:00
|
|
|
|
|
|
|
|
// nostrod: the daemon that holds the connectors and answers the CLI over the system bus.
|
|
|
|
|
if(product == "daemon") {
|
|
|
|
|
Configuration daemon;
|
|
|
|
|
daemon.path = "./";
|
|
|
|
|
daemon.name = "nostrod";
|
|
|
|
|
daemon.outputName = "nostrod";
|
|
|
|
|
daemon.defines = defines;
|
|
|
|
|
ApplyStandardArgs(daemon, args);
|
|
|
|
|
daemon.compileFlags.insert(daemon.compileFlags.end(), coverageCompileFlags.begin(), coverageCompileFlags.end());
|
|
|
|
|
daemon.linkFlags.insert(daemon.linkFlags.end(), coverageLinkFlags.begin(), coverageLinkFlags.end());
|
|
|
|
|
daemon.dependencies = { library };
|
|
|
|
|
std::array<fs::path, 0> daemonInterfaces = {};
|
|
|
|
|
std::array<fs::path, 1> daemonImplementations = {"implementations/nostrod"};
|
|
|
|
|
daemon.GetInterfacesAndImplementations(daemonInterfaces, daemonImplementations);
|
|
|
|
|
LintRules::AddLiteRules(daemon);
|
|
|
|
|
return daemon;
|
|
|
|
|
}
|
|
|
|
|
|
feat(app): add the Nostro app, a window for phones and desktops
Linux phones have no banking apps, and a command line is no answer on a
phone. The app does everything the nostro command does and, like it, only
talks to nostrod: it holds no key and no token.
- Nostro.Ui, a toolkit whose screens are functions that fill a frame, ported
from imsd-messages ca5cd72d; Nostro.App, the app's state, forms and screens;
Nostro.Ui.Shell, which puts them on a Wayland window with Crafter.Graphics;
nostro-app; and Nostro.DebugCommands for the --debug-api build.
- Client: every method also in an asynchronous form for an sd-event loop,
with DaemonMissing and OutcomeUnknown.
- nostrod's Flatpak is net.catcrafts.Nostrod now and the app takes
net.catcrafts.Nostro; install.sh moves the state. The app's Flatpak, both
Flatpaks cross-built for aarch64, and the licence texts they carry.
- nostro-fake-system, a made-up bus and bank with a real nostrod on them, to
look at the app against. The README's screenshots are taken on it.
- The nostro command: an API key's environment is the key's own to say, so
--sandbox is for bunq-oauth alone, and a virtual card is listed as VIRTUAL.
The published contract changes in three places, before any release (design
rule 10):
- Transactions' query takes `stored`: answered from what nostrod has stored,
without asking the bank. The app searches with it; before, every search was
a call to bunq.
- AddBunq's `environment` no longer chooses over what the key says of itself:
a key of the other environment is refused.
- SetCardStatus refuses to freeze or unfreeze a virtual card. bunq reports one
as DEACTIVATED however well it pays, and leaves it as it is when asked,
without an error.
The app is GPL-3.0-only, the library stays LGPL-3.0-only, and no code moved
from one to the other (design rule 13). Transaction's schema is unchanged.
Verified: the 17 tests pass with every line, function and region of what they
link run, and the five lint runs are clean. Every screen was looked at on the
made-up system, at a phone's and a desktop's sizes in the light and the dark
look, on Plasma under Wayland. What is said of bunq's cards comes from its
sandbox, with throwaway users, and from one real virtual card. Known to have
been used against production: connecting, and reading accounts, payments and
cards. Not known to have been tried: a payment from the app against bunq,
OAuth against bunq, and anything on a phone.
Building the app takes --graphics=, a Crafter.Graphics checkout on its branch
claude/nostro-app, until that branch is merged and pinned here.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-19 12:27:14 +01:00
|
|
|
if(product == "fake-system") {
|
|
|
|
|
return FakeSystem(args, defines, { library, network, db, checkout });
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// nostro-app: the window. Its fonts go beside it, where the window library's shaders are put too.
|
|
|
|
|
if(product == "app") {
|
build(shell): name Crafter.Graphics at a commit of its master, and answer a compositor's resize with a frame
The app was built against a checkout of Crafter.Graphics given with
--graphics=, because the text-input purposes it asks the input method for
were uncommitted work in one checkout. They are on Crafter.Graphics' master
since a9ce1a0, so project.cpp names the library as a GitProject at that
commit, as it names Crafter.Network and Crafter.DB. --graphics= is gone, and
with it $NOSTRO_GRAPHICS in build-aarch64.sh and the workflow's step that
cloned the branch claude/nostro-app, which the forge never had: neither job
of the workflow could have built the app.
That master also has 89111e0, which the window was not written against. A
size the compositor configures is no longer taken in the configure's
listener. The listener keeps it and fires onFrameOwed, and the next Render()
makes the swapchain again, fires onResize from inside itself, and answers
the configure with that frame's buffer. The window draws on demand, so:
- Shell::Window asks for a frame from onFrameOwed. Without it nothing draws
the frame that answers the configure, and the window keeps its old size
until something else changes on it.
- Canvas::Reconcile no longer turns the compositor's sizes into
Resize(pixels). The library takes the size asked for last, whoever asked,
so that call took the configured size's place, and with it came back the
surface a dp larger than configured that 89111e0 had ended
(Crafter.Graphics #201). It now sizes the window only where the library
does not: the app's own size (--size, SetSize, --scale); the size that
comes with a new window (#166), handed over in deferredLogicalWidth, where
the library's listener keeps every later one; and a scale the display
changes to by itself (#165), through RebuildSwapchain. The last two reach
into the library's own state, and go once the library does them.
The text-input API on master is the one the app was written against:
nothing changed there.
Looked at on 2026-11-20 on the made-up system, on a desktop (KWin at a
scale of 1.85), with WAYLAND_DEBUG=1 on the app:
- The accounts at 420x760: the start, and resize:600,800 from --poke, the
app's own size. Each size reaches the surface once, with the first buffer
drawn for it.
- The same window given 760x532 by the compositor (a KWin script that sets
its frameGeometry): the configure is kept, a frame is asked for, and
set_destination(760, 532), the acknowledgement and the first buffer of
1406x985 go out together. A temporary probe had that frame's draw list
reach 1406x985: it is laid out for the new size.
- 421x761, whose pixels at 1.85 are no whole number: it opens as 422x762,
since the app's own size goes through Resize in pixels. The notes say so.
- --scale 2 --size 360x760, the cards and the pay form filled in from
--poke, with resize:400,700: the compositor's sizes are passed over.
- The --debug-api build driven with crafter-debug: Window_Resize, Ui_Tap,
ui.texts and a screenshot.
The two paths that are a phone's, a size in the first configure and a scale
named after the first frames, were tried only with the values put in by
hand in a temporary probe. Nothing was looked at on a phone, and what the
input method is told was not read off the wire: the test window never had
the keyboard.
17 tests pass and the four lint passes report nothing. The app, its
--debug-api build, the fake system, the x86_64 Flatpak bundle and both
aarch64 Flatpaks (build-aarch64.sh) build.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 06:00:54 +01:00
|
|
|
// The window library, at the commit the window was last looked at against, like networkCommit above: no test
|
|
|
|
|
// opens a window, so moving this one forward is checked by looking (AGENTS.template.md, "Looking at the app").
|
|
|
|
|
// Its own project file names Crafter.Event, Crafter.Math, Crafter.Asset and the Khronos headers without a
|
|
|
|
|
// commit, so those still follow their branches.
|
|
|
|
|
constexpr std::string_view graphicsCommit = "a9ce1a02e8a9dbc01ef766483fd9bcb4d9470d6c";
|
|
|
|
|
Configuration* graphics = GitProject({
|
|
|
|
|
.source = { .url = "https://forgejo.catcrafts.net/Catcrafts/Crafter.Graphics.git", .commit = std::string(graphicsCommit) },
|
|
|
|
|
.args = depArgs,
|
|
|
|
|
});
|
feat(app): add the Nostro app, a window for phones and desktops
Linux phones have no banking apps, and a command line is no answer on a
phone. The app does everything the nostro command does and, like it, only
talks to nostrod: it holds no key and no token.
- Nostro.Ui, a toolkit whose screens are functions that fill a frame, ported
from imsd-messages ca5cd72d; Nostro.App, the app's state, forms and screens;
Nostro.Ui.Shell, which puts them on a Wayland window with Crafter.Graphics;
nostro-app; and Nostro.DebugCommands for the --debug-api build.
- Client: every method also in an asynchronous form for an sd-event loop,
with DaemonMissing and OutcomeUnknown.
- nostrod's Flatpak is net.catcrafts.Nostrod now and the app takes
net.catcrafts.Nostro; install.sh moves the state. The app's Flatpak, both
Flatpaks cross-built for aarch64, and the licence texts they carry.
- nostro-fake-system, a made-up bus and bank with a real nostrod on them, to
look at the app against. The README's screenshots are taken on it.
- The nostro command: an API key's environment is the key's own to say, so
--sandbox is for bunq-oauth alone, and a virtual card is listed as VIRTUAL.
The published contract changes in three places, before any release (design
rule 10):
- Transactions' query takes `stored`: answered from what nostrod has stored,
without asking the bank. The app searches with it; before, every search was
a call to bunq.
- AddBunq's `environment` no longer chooses over what the key says of itself:
a key of the other environment is refused.
- SetCardStatus refuses to freeze or unfreeze a virtual card. bunq reports one
as DEACTIVATED however well it pays, and leaves it as it is when asked,
without an error.
The app is GPL-3.0-only, the library stays LGPL-3.0-only, and no code moved
from one to the other (design rule 13). Transaction's schema is unchanged.
Verified: the 17 tests pass with every line, function and region of what they
link run, and the five lint runs are clean. Every screen was looked at on the
made-up system, at a phone's and a desktop's sizes in the light and the dark
look, on Plasma under Wayland. What is said of bunq's cards comes from its
sandbox, with throwaway users, and from one real virtual card. Known to have
been used against production: connecting, and reading accounts, payments and
cards. Not known to have been tried: a payment from the app against bunq,
OAuth against bunq, and anything on a phone.
Building the app takes --graphics=, a Crafter.Graphics checkout on its branch
claude/nostro-app, until that branch is merged and pinned here.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-19 12:27:14 +01:00
|
|
|
Configuration* shell = new Configuration(ShellLibrary(args, ui, graphics));
|
|
|
|
|
Configuration app;
|
|
|
|
|
app.path = "./";
|
|
|
|
|
app.name = "nostro-app";
|
|
|
|
|
app.outputName = "nostro-app";
|
|
|
|
|
app.defines = defines;
|
|
|
|
|
// What the app says its version is: the metainfo's release is the same.
|
2026-11-21 06:10:36 +01:00
|
|
|
app.defines.push_back({"NOSTRO_VERSION", "0.0.0"});
|
feat(app): add the Nostro app, a window for phones and desktops
Linux phones have no banking apps, and a command line is no answer on a
phone. The app does everything the nostro command does and, like it, only
talks to nostrod: it holds no key and no token.
- Nostro.Ui, a toolkit whose screens are functions that fill a frame, ported
from imsd-messages ca5cd72d; Nostro.App, the app's state, forms and screens;
Nostro.Ui.Shell, which puts them on a Wayland window with Crafter.Graphics;
nostro-app; and Nostro.DebugCommands for the --debug-api build.
- Client: every method also in an asynchronous form for an sd-event loop,
with DaemonMissing and OutcomeUnknown.
- nostrod's Flatpak is net.catcrafts.Nostrod now and the app takes
net.catcrafts.Nostro; install.sh moves the state. The app's Flatpak, both
Flatpaks cross-built for aarch64, and the licence texts they carry.
- nostro-fake-system, a made-up bus and bank with a real nostrod on them, to
look at the app against. The README's screenshots are taken on it.
- The nostro command: an API key's environment is the key's own to say, so
--sandbox is for bunq-oauth alone, and a virtual card is listed as VIRTUAL.
The published contract changes in three places, before any release (design
rule 10):
- Transactions' query takes `stored`: answered from what nostrod has stored,
without asking the bank. The app searches with it; before, every search was
a call to bunq.
- AddBunq's `environment` no longer chooses over what the key says of itself:
a key of the other environment is refused.
- SetCardStatus refuses to freeze or unfreeze a virtual card. bunq reports one
as DEACTIVATED however well it pays, and leaves it as it is when asked,
without an error.
The app is GPL-3.0-only, the library stays LGPL-3.0-only, and no code moved
from one to the other (design rule 13). Transaction's schema is unchanged.
Verified: the 17 tests pass with every line, function and region of what they
link run, and the five lint runs are clean. Every screen was looked at on the
made-up system, at a phone's and a desktop's sizes in the light and the dark
look, on Plasma under Wayland. What is said of bunq's cards comes from its
sandbox, with throwaway users, and from one real virtual card. Known to have
been used against production: connecting, and reading accounts, payments and
cards. Not known to have been tried: a payment from the app against bunq,
OAuth against bunq, and anything on a phone.
Building the app takes --graphics=, a Crafter.Graphics checkout on its branch
claude/nostro-app, until that branch is merged and pinned here.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-19 12:27:14 +01:00
|
|
|
ApplyStandardArgs(app, args);
|
|
|
|
|
app.dependencies = { library, ui, appCore, shell };
|
|
|
|
|
app.files.push_back("assets/NotoSans-Regular.ttf");
|
|
|
|
|
app.files.push_back("assets/NotoSans-Medium.ttf");
|
|
|
|
|
// What the app is as a Flatpak (--packaging=flatpak, with `install` or `bundle`): the compositor, the graphics
|
|
|
|
|
// device, and nostrod on the system bus. No network and no files: it talks to no bank itself and keeps
|
|
|
|
|
// nothing. The desktop's portals, for the look and for opening a browser, need no permission.
|
|
|
|
|
app.flatpak.appId = "net.catcrafts.Nostro";
|
|
|
|
|
app.flatpak.permissions = {"--socket=wayland", "--device=dri", "--system-talk-name=net.catcrafts.Nostro1"};
|
|
|
|
|
app.flatpak.desktopFile = "packaging/flatpak/net.catcrafts.Nostro.desktop";
|
|
|
|
|
app.flatpak.metainfo = "packaging/flatpak/net.catcrafts.Nostro.metainfo.xml";
|
|
|
|
|
app.flatpak.icons = {"packaging/flatpak/net.catcrafts.Nostro.svg"};
|
|
|
|
|
// The licences of what it carries; packaging/licenses/NOTICE says what each text covers.
|
|
|
|
|
app.flatpak.share = {
|
|
|
|
|
{"LICENSE", "licenses/net.catcrafts.Nostro/LICENSE"},
|
|
|
|
|
{"LICENSE.GPL", "licenses/net.catcrafts.Nostro/LICENSE.GPL"},
|
|
|
|
|
{"assets/OFL.txt", "licenses/net.catcrafts.Nostro/OFL.txt"},
|
|
|
|
|
{"packaging/licenses", "licenses/net.catcrafts.Nostro"},
|
|
|
|
|
};
|
|
|
|
|
std::vector<fs::path> appInterfaces;
|
|
|
|
|
std::vector<fs::path> appImplementations = {"implementations/nostro-app"};
|
|
|
|
|
// With --debug-api: Crafter.Debug, what an agent drives the app with, and the made-up system to drive it on,
|
|
|
|
|
// built in the same pass. Any process of the user's can drive and read such a build: it is no build to ship.
|
|
|
|
|
if(Debug::Use(app, { .enabled = debugApi, .flag = std::string(debugApiArgName), .define = "NOSTRO_DEBUG_API", .args = depArgs })) {
|
|
|
|
|
appInterfaces.emplace_back("interfaces/Nostro.DebugCommands");
|
|
|
|
|
appImplementations.emplace_back("implementations/Nostro.DebugCommands");
|
|
|
|
|
app.dependencies.push_back(new Configuration(FakeSystem(args, defines, { library, network, db, checkout })));
|
|
|
|
|
app.scripts.push_back({"fake", RunOnFakeSystem});
|
|
|
|
|
}
|
|
|
|
|
app.GetInterfacesAndImplementations(appInterfaces, appImplementations);
|
|
|
|
|
LintRules::AddLiteRules(app);
|
|
|
|
|
return app;
|
|
|
|
|
}
|
|
|
|
|
|
2026-10-06 15:39:17 +02:00
|
|
|
Configuration execfg;
|
|
|
|
|
execfg.path = "./";
|
|
|
|
|
execfg.name = "nostro";
|
|
|
|
|
execfg.outputName = "nostro";
|
2026-11-01 18:35:23 +01:00
|
|
|
execfg.defines = defines;
|
2026-10-06 15:39:17 +02:00
|
|
|
ApplyStandardArgs(execfg, args);
|
|
|
|
|
|
|
|
|
|
std::array<fs::path, 0> exeInterfaces = {
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
std::array<fs::path, 1> exeImplementations = {
|
|
|
|
|
"implementations/main"
|
|
|
|
|
};
|
|
|
|
|
|
2026-11-01 18:35:23 +01:00
|
|
|
execfg.compileFlags.insert(execfg.compileFlags.end(), coverageCompileFlags.begin(), coverageCompileFlags.end());
|
|
|
|
|
execfg.linkFlags.insert(execfg.linkFlags.end(), coverageLinkFlags.begin(), coverageLinkFlags.end());
|
|
|
|
|
|
|
|
|
|
execfg.dependencies = { library };
|
2026-10-06 15:39:17 +02:00
|
|
|
execfg.GetInterfacesAndImplementations(exeInterfaces, exeImplementations);
|
|
|
|
|
|
feat(app): add the Nostro app, a window for phones and desktops
Linux phones have no banking apps, and a command line is no answer on a
phone. The app does everything the nostro command does and, like it, only
talks to nostrod: it holds no key and no token.
- Nostro.Ui, a toolkit whose screens are functions that fill a frame, ported
from imsd-messages ca5cd72d; Nostro.App, the app's state, forms and screens;
Nostro.Ui.Shell, which puts them on a Wayland window with Crafter.Graphics;
nostro-app; and Nostro.DebugCommands for the --debug-api build.
- Client: every method also in an asynchronous form for an sd-event loop,
with DaemonMissing and OutcomeUnknown.
- nostrod's Flatpak is net.catcrafts.Nostrod now and the app takes
net.catcrafts.Nostro; install.sh moves the state. The app's Flatpak, both
Flatpaks cross-built for aarch64, and the licence texts they carry.
- nostro-fake-system, a made-up bus and bank with a real nostrod on them, to
look at the app against. The README's screenshots are taken on it.
- The nostro command: an API key's environment is the key's own to say, so
--sandbox is for bunq-oauth alone, and a virtual card is listed as VIRTUAL.
The published contract changes in three places, before any release (design
rule 10):
- Transactions' query takes `stored`: answered from what nostrod has stored,
without asking the bank. The app searches with it; before, every search was
a call to bunq.
- AddBunq's `environment` no longer chooses over what the key says of itself:
a key of the other environment is refused.
- SetCardStatus refuses to freeze or unfreeze a virtual card. bunq reports one
as DEACTIVATED however well it pays, and leaves it as it is when asked,
without an error.
The app is GPL-3.0-only, the library stays LGPL-3.0-only, and no code moved
from one to the other (design rule 13). Transaction's schema is unchanged.
Verified: the 17 tests pass with every line, function and region of what they
link run, and the five lint runs are clean. Every screen was looked at on the
made-up system, at a phone's and a desktop's sizes in the light and the dark
look, on Plasma under Wayland. What is said of bunq's cards comes from its
sandbox, with throwaway users, and from one real virtual card. Known to have
been used against production: connecting, and reading accounts, payments and
cards. Not known to have been tried: a payment from the app against bunq,
OAuth against bunq, and anything on a phone.
Building the app takes --graphics=, a Crafter.Graphics checkout on its branch
claude/nostro-app, until that branch is merged and pinned here.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-19 12:27:14 +01:00
|
|
|
// `crafter-build test --banks=bunq`: each test is tests/<Name>/main.cpp, linked against what it tests. The ones that
|
2026-11-01 18:35:23 +01:00
|
|
|
// talk to bunq talk to a fake of it on 127.0.0.1 (tests/Support/FakeBunq.inc), never to bunq itself.
|
feat(app): add the Nostro app, a window for phones and desktops
Linux phones have no banking apps, and a command line is no answer on a
phone. The app does everything the nostro command does and, like it, only
talks to nostrod: it holds no key and no token.
- Nostro.Ui, a toolkit whose screens are functions that fill a frame, ported
from imsd-messages ca5cd72d; Nostro.App, the app's state, forms and screens;
Nostro.Ui.Shell, which puts them on a Wayland window with Crafter.Graphics;
nostro-app; and Nostro.DebugCommands for the --debug-api build.
- Client: every method also in an asynchronous form for an sd-event loop,
with DaemonMissing and OutcomeUnknown.
- nostrod's Flatpak is net.catcrafts.Nostrod now and the app takes
net.catcrafts.Nostro; install.sh moves the state. The app's Flatpak, both
Flatpaks cross-built for aarch64, and the licence texts they carry.
- nostro-fake-system, a made-up bus and bank with a real nostrod on them, to
look at the app against. The README's screenshots are taken on it.
- The nostro command: an API key's environment is the key's own to say, so
--sandbox is for bunq-oauth alone, and a virtual card is listed as VIRTUAL.
The published contract changes in three places, before any release (design
rule 10):
- Transactions' query takes `stored`: answered from what nostrod has stored,
without asking the bank. The app searches with it; before, every search was
a call to bunq.
- AddBunq's `environment` no longer chooses over what the key says of itself:
a key of the other environment is refused.
- SetCardStatus refuses to freeze or unfreeze a virtual card. bunq reports one
as DEACTIVATED however well it pays, and leaves it as it is when asked,
without an error.
The app is GPL-3.0-only, the library stays LGPL-3.0-only, and no code moved
from one to the other (design rule 13). Transaction's schema is unchanged.
Verified: the 17 tests pass with every line, function and region of what they
link run, and the five lint runs are clean. Every screen was looked at on the
made-up system, at a phone's and a desktop's sizes in the light and the dark
look, on Plasma under Wayland. What is said of bunq's cards comes from its
sandbox, with throwaway users, and from one real virtual card. Known to have
been used against production: connecting, and reading accounts, payments and
cards. Not known to have been tried: a payment from the app against bunq,
OAuth against bunq, and anything on a phone.
Building the app takes --graphics=, a Crafter.Graphics checkout on its branch
claude/nostro-app, until that branch is merged and pinned here.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-19 12:27:14 +01:00
|
|
|
const auto addTests = [&execfg, &coverageCompileFlags, &coverageLinkFlags](std::span<const std::string_view> names, const std::vector<Configuration*>& dependencies) {
|
|
|
|
|
for(const std::string_view name : names) {
|
|
|
|
|
TestBuilder test = execfg.AddTest(name).Dependencies(dependencies).Timeout(std::chrono::seconds(180));
|
|
|
|
|
for(const std::string& flag : coverageCompileFlags) {
|
|
|
|
|
test.CompileFlag(flag);
|
|
|
|
|
}
|
|
|
|
|
for(const std::string& flag : coverageLinkFlags) {
|
|
|
|
|
test.LinkFlag(flag);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
constexpr std::array<std::string_view, 10> libraryTests = {
|
2026-11-01 18:35:23 +01:00
|
|
|
"ShouldHandleMoneyAndText",
|
|
|
|
|
"ShouldSignAndVerify",
|
|
|
|
|
"ShouldStoreTransactions",
|
|
|
|
|
"ShouldKeepFilesPrivate",
|
|
|
|
|
"ShouldSaveConnectors",
|
|
|
|
|
"ShouldTalkToBunq",
|
|
|
|
|
"ShouldMoveMoney",
|
|
|
|
|
"ShouldRunCommands",
|
|
|
|
|
"ShouldServeEveryUser",
|
feat(app): add the Nostro app, a window for phones and desktops
Linux phones have no banking apps, and a command line is no answer on a
phone. The app does everything the nostro command does and, like it, only
talks to nostrod: it holds no key and no token.
- Nostro.Ui, a toolkit whose screens are functions that fill a frame, ported
from imsd-messages ca5cd72d; Nostro.App, the app's state, forms and screens;
Nostro.Ui.Shell, which puts them on a Wayland window with Crafter.Graphics;
nostro-app; and Nostro.DebugCommands for the --debug-api build.
- Client: every method also in an asynchronous form for an sd-event loop,
with DaemonMissing and OutcomeUnknown.
- nostrod's Flatpak is net.catcrafts.Nostrod now and the app takes
net.catcrafts.Nostro; install.sh moves the state. The app's Flatpak, both
Flatpaks cross-built for aarch64, and the licence texts they carry.
- nostro-fake-system, a made-up bus and bank with a real nostrod on them, to
look at the app against. The README's screenshots are taken on it.
- The nostro command: an API key's environment is the key's own to say, so
--sandbox is for bunq-oauth alone, and a virtual card is listed as VIRTUAL.
The published contract changes in three places, before any release (design
rule 10):
- Transactions' query takes `stored`: answered from what nostrod has stored,
without asking the bank. The app searches with it; before, every search was
a call to bunq.
- AddBunq's `environment` no longer chooses over what the key says of itself:
a key of the other environment is refused.
- SetCardStatus refuses to freeze or unfreeze a virtual card. bunq reports one
as DEACTIVATED however well it pays, and leaves it as it is when asked,
without an error.
The app is GPL-3.0-only, the library stays LGPL-3.0-only, and no code moved
from one to the other (design rule 13). Transaction's schema is unchanged.
Verified: the 17 tests pass with every line, function and region of what they
link run, and the five lint runs are clean. Every screen was looked at on the
made-up system, at a phone's and a desktop's sizes in the light and the dark
look, on Plasma under Wayland. What is said of bunq's cards comes from its
sandbox, with throwaway users, and from one real virtual card. Known to have
been used against production: connecting, and reading accounts, payments and
cards. Not known to have been tried: a payment from the app against bunq,
OAuth against bunq, and anything on a phone.
Building the app takes --graphics=, a Crafter.Graphics checkout on its branch
claude/nostro-app, until that branch is merged and pinned here.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-19 12:27:14 +01:00
|
|
|
"ShouldAnswerAsynchronously",
|
2026-11-01 18:35:23 +01:00
|
|
|
};
|
feat(app): add the Nostro app, a window for phones and desktops
Linux phones have no banking apps, and a command line is no answer on a
phone. The app does everything the nostro command does and, like it, only
talks to nostrod: it holds no key and no token.
- Nostro.Ui, a toolkit whose screens are functions that fill a frame, ported
from imsd-messages ca5cd72d; Nostro.App, the app's state, forms and screens;
Nostro.Ui.Shell, which puts them on a Wayland window with Crafter.Graphics;
nostro-app; and Nostro.DebugCommands for the --debug-api build.
- Client: every method also in an asynchronous form for an sd-event loop,
with DaemonMissing and OutcomeUnknown.
- nostrod's Flatpak is net.catcrafts.Nostrod now and the app takes
net.catcrafts.Nostro; install.sh moves the state. The app's Flatpak, both
Flatpaks cross-built for aarch64, and the licence texts they carry.
- nostro-fake-system, a made-up bus and bank with a real nostrod on them, to
look at the app against. The README's screenshots are taken on it.
- The nostro command: an API key's environment is the key's own to say, so
--sandbox is for bunq-oauth alone, and a virtual card is listed as VIRTUAL.
The published contract changes in three places, before any release (design
rule 10):
- Transactions' query takes `stored`: answered from what nostrod has stored,
without asking the bank. The app searches with it; before, every search was
a call to bunq.
- AddBunq's `environment` no longer chooses over what the key says of itself:
a key of the other environment is refused.
- SetCardStatus refuses to freeze or unfreeze a virtual card. bunq reports one
as DEACTIVATED however well it pays, and leaves it as it is when asked,
without an error.
The app is GPL-3.0-only, the library stays LGPL-3.0-only, and no code moved
from one to the other (design rule 13). Transaction's schema is unchanged.
Verified: the 17 tests pass with every line, function and region of what they
link run, and the five lint runs are clean. Every screen was looked at on the
made-up system, at a phone's and a desktop's sizes in the light and the dark
look, on Plasma under Wayland. What is said of bunq's cards comes from its
sandbox, with throwaway users, and from one real virtual card. Known to have
been used against production: connecting, and reading accounts, payments and
cards. Not known to have been tried: a payment from the app against bunq,
OAuth against bunq, and anything on a phone.
Building the app takes --graphics=, a Crafter.Graphics checkout on its branch
claude/nostro-app, until that branch is merged and pinned here.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-19 12:27:14 +01:00
|
|
|
addTests(libraryTests, { library, network, db, checkout });
|
|
|
|
|
// The toolkit's, which need the toolkit alone.
|
|
|
|
|
constexpr std::array<std::string_view, 5> uiTests = {
|
|
|
|
|
"ShouldWrapText",
|
|
|
|
|
"ShouldEditText",
|
|
|
|
|
"ShouldRecognizeGestures",
|
|
|
|
|
"ShouldBuildFrames",
|
|
|
|
|
"ShouldLayOutWidgets",
|
|
|
|
|
};
|
|
|
|
|
addTests(uiTests, { ui });
|
|
|
|
|
// The app's, which drive it against a real nostrod on the fake bus.
|
|
|
|
|
constexpr std::array<std::string_view, 2> appTests = {
|
|
|
|
|
"ShouldValidateForms",
|
|
|
|
|
"ShouldDriveTheApp",
|
|
|
|
|
};
|
|
|
|
|
addTests(appTests, { appCore, ui, library, network, db, checkout });
|
2026-11-01 18:35:23 +01:00
|
|
|
|
|
|
|
|
LintRules::AddLiteRules(execfg);
|
|
|
|
|
|
2026-10-06 15:39:17 +02:00
|
|
|
return execfg;
|
|
|
|
|
}
|