@team-semicolon/semicolony-cli 4.18.126 → 4.18.127
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.js +900 -900
- package/migrations/224_mcp_catalog_compatibility.sql +19 -0
- package/migrations/225_meeting_action_history_preservation.sql +388 -0
- package/migrations/226_action_items_work_loop.sql +634 -0
- package/migrations/227_action_items_web_identity.sql +34 -0
- package/package.json +1 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
-- Dashboard work-loop identity wrappers. Base eeeb688a + Task1 review fixes.
|
|
2
|
+
-- The HTTP server supplies the verified Supabase user UUID. Browser-selected
|
|
3
|
+
-- viewer/member/admin fields are never accepted as mutation authority.
|
|
4
|
+
CREATE FUNCTION semicolony.action_web_member(p_auth_user_id uuid) RETURNS text
|
|
5
|
+
LANGUAGE plpgsql STABLE SECURITY DEFINER SET search_path=pg_catalog AS $$
|
|
6
|
+
DECLARE member_domain text;
|
|
7
|
+
BEGIN
|
|
8
|
+
IF p_auth_user_id IS NULL OR (SELECT count(*) FROM semicolony.team_members
|
|
9
|
+
WHERE auth_user_id=p_auth_user_id AND status='active')<>1 THEN
|
|
10
|
+
RAISE EXCEPTION 'action_identity_unmapped' USING ERRCODE='AI005';
|
|
11
|
+
END IF;
|
|
12
|
+
SELECT domain INTO member_domain FROM semicolony.team_members
|
|
13
|
+
WHERE auth_user_id=p_auth_user_id AND status='active';
|
|
14
|
+
RETURN member_domain;
|
|
15
|
+
END $$;
|
|
16
|
+
CREATE FUNCTION semicolony.web_edit_action_item(p_auth_user_id uuid,p_action_item_id uuid,
|
|
17
|
+
p_expected_version bigint,p_patch jsonb) RETURNS uuid
|
|
18
|
+
LANGUAGE plpgsql SECURITY DEFINER SET search_path=pg_catalog AS $$
|
|
19
|
+
BEGIN
|
|
20
|
+
IF p_expected_version IS NULL OR p_expected_version<1 THEN RAISE EXCEPTION 'expected version required' USING ERRCODE='22023'; END IF;
|
|
21
|
+
RETURN semicolony.edit_action_item(p_action_item_id,'team-member',semicolony.action_web_member(p_auth_user_id),NULL,p_expected_version,p_patch);
|
|
22
|
+
END $$;
|
|
23
|
+
CREATE FUNCTION semicolony.web_resolve_action_candidate(p_auth_user_id uuid,p_candidate_id uuid,
|
|
24
|
+
p_decision text,p_expected_version bigint,p_fields jsonb,p_note text) RETURNS uuid
|
|
25
|
+
LANGUAGE plpgsql SECURITY DEFINER SET search_path=pg_catalog AS $$
|
|
26
|
+
BEGIN
|
|
27
|
+
IF p_expected_version IS NULL OR p_expected_version<1 THEN RAISE EXCEPTION 'expected version required' USING ERRCODE='22023'; END IF;
|
|
28
|
+
RETURN semicolony.resolve_action_candidate(p_candidate_id,p_decision,p_expected_version,p_fields,p_note,
|
|
29
|
+
'team-member',semicolony.action_web_member(p_auth_user_id),NULL);
|
|
30
|
+
END $$;
|
|
31
|
+
REVOKE ALL ON FUNCTION semicolony.action_web_member(uuid),semicolony.web_edit_action_item(uuid,uuid,bigint,jsonb),
|
|
32
|
+
semicolony.web_resolve_action_candidate(uuid,uuid,text,bigint,jsonb,text) FROM PUBLIC;
|
|
33
|
+
GRANT EXECUTE ON FUNCTION semicolony.web_edit_action_item(uuid,uuid,bigint,jsonb),
|
|
34
|
+
semicolony.web_resolve_action_candidate(uuid,uuid,text,bigint,jsonb,text) TO sc_fleet_board;
|