feat: expand companion platform, device controls, and memoir workflows
ci / verify (push) Canceled after 0s

Add customer and operator login, BLE provisioning, device fleet controls, call memory, memoir generation, and refreshed family and maintenance portals. Include API contracts, migrations, firmware sources, tests, assets, and deployment documentation.
This commit is contained in:
Codex Local
2026-10-08 10:06:44 +08:00
parent 98fb2965d0
commit bf1233d5df
861 changed files with 94614 additions and 3209 deletions
@@ -0,0 +1,23 @@
BEGIN;
ALTER TABLE web_event DROP CONSTRAINT web_event_event_type_check;
ALTER TABLE web_event ADD CONSTRAINT web_event_event_type_check CHECK (event_type IN (
'device.presence.changed','device.binding.reset',
'conversation.started','conversation.completed','conversation.failed',
'story.created','story.revised','media.upload.completed','export.ready',
'privacy_request.updated','device.command.updated','household.member.updated'));
-- Retain metadata for the seven-day family activity view. No message content is stored here.
ALTER TABLE web_event ALTER COLUMN expires_at SET DEFAULT (now() + interval '7 days');
CREATE INDEX web_event_household_recent_idx ON web_event(household_id, occurred_at DESC);
CREATE FUNCTION household_member_web_event_trigger() RETURNS trigger LANGUAGE plpgsql AS $$
BEGIN
IF TG_OP='INSERT' OR OLD.status IS DISTINCT FROM NEW.status OR OLD.role IS DISTINCT FROM NEW.role THEN
PERFORM append_web_event(NEW.tenant_id,NEW.household_id,NULL,'household.member.updated','household',
(SELECT public_id FROM household WHERE id=NEW.household_id),NEW.status);
END IF;
RETURN NEW;
END;
$$;
CREATE TRIGGER household_member_web_event AFTER INSERT OR UPDATE ON household_member
FOR EACH ROW EXECUTE FUNCTION household_member_web_event_trigger();
COMMIT;