Clean prepaid SoT, identity mailbox, public access planes, leaf policy, fleet spawn
Some checks are pending
offline / test (push) Waiting to run

Persist account-balance books; edge caches prepaid from books. Add zappier-identity, verae-nats-accounts, verae-jobs-events, verae-access-staff, zapier-decisions. Edge binds loopback; lan-134 stays off; HTTP services prefer local spawn.
This commit is contained in:
George Lambert 2026-09-11 17:15:16 -04:00
parent 345aeeead9
commit ddf772454b
153 changed files with 2236 additions and 116 deletions

View file

@ -28,7 +28,20 @@ function mockBind(email: string): VeraeBind {
* Register or look up the customer on api.veraetime.net.
* MOCK_VERAE (default) or missing VERAE_API_BASE_URL stable id, no network.
*/
export async function bindVeraeUser(email: string): Promise<VeraeBind> {
export async function bindVeraeUser(email: string, customerId?: string): Promise<VeraeBind> {
const identity = (process.env.IDENTITY_URL || '').replace(/\/$/, '');
if (identity) {
try {
const r = await fetch(`${identity}/bind`, {
method: 'POST',
headers: { 'content-type': 'application/json' },
body: JSON.stringify({ email, customerId }),
});
if (r.ok) return (await r.json()) as VeraeBind;
} catch {
/* fall through */
}
}
const mock = process.env.MOCK_VERAE !== 'false';
const base = (process.env.VERAE_API_BASE_URL || '').replace(/\/$/, '');
if (mock || !base) return mockBind(email);