antenna-fyi 1.3.7 → 1.3.8
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/lib/core.js +3 -1
- package/lib/hermes-plugin/plugin.yaml +1 -1
- package/lib/hermes-plugin/schemas.py +2 -0
- package/lib/hermes-plugin/tools.py +7 -2
- package/lib/mcp.js +4 -2
- package/package.json +1 -1
- package/skill/SKILL.md +2 -0
package/lib/core.js
CHANGED
|
@@ -635,13 +635,15 @@ export async function getEvent({ code, supabaseUrl, supabaseKey }) {
|
|
|
635
635
|
return data;
|
|
636
636
|
}
|
|
637
637
|
|
|
638
|
-
export async function updateEvent({ code, device_id, name, description, og_image, lat, lng, starts_at, ends_at, supabaseUrl, supabaseKey }) {
|
|
638
|
+
export async function updateEvent({ code, device_id, name, description, og_image, lat, lng, starts_at, ends_at, requires_approval, screening_questions, supabaseUrl, supabaseKey }) {
|
|
639
639
|
const sb = getClient(supabaseUrl, supabaseKey);
|
|
640
640
|
const { data, error } = await sb.rpc("update_event", {
|
|
641
641
|
p_code: code, p_device_id: device_id,
|
|
642
642
|
p_name: name || null, p_description: description || null,
|
|
643
643
|
p_og_image: og_image || null, p_lat: lat ?? null, p_lng: lng ?? null,
|
|
644
644
|
p_starts_at: starts_at || null, p_ends_at: ends_at || null,
|
|
645
|
+
...(requires_approval != null ? { p_requires_approval: requires_approval } : {}),
|
|
646
|
+
...(screening_questions != null ? { p_screening_questions: screening_questions } : {}),
|
|
645
647
|
});
|
|
646
648
|
if (error) throw new Error(error.message);
|
|
647
649
|
return data;
|
|
@@ -307,6 +307,8 @@ EVENT_UPDATE_SCHEMA = {
|
|
|
307
307
|
"lng": {"type": "number"},
|
|
308
308
|
"starts_at": {"type": "string"},
|
|
309
309
|
"ends_at": {"type": "string"},
|
|
310
|
+
"requires_approval": {"type": "boolean", "description": "Require host approval to join"},
|
|
311
|
+
"screening_questions": {"type": "array", "items": {"type": "string"}, "description": "Screening questions for applicants"},
|
|
310
312
|
},
|
|
311
313
|
"required": ["code", "sender_id", "channel", "chat_id"],
|
|
312
314
|
},
|
|
@@ -645,13 +645,18 @@ def handle_event_checkin(params: dict) -> str:
|
|
|
645
645
|
def handle_event_update(params: dict) -> str:
|
|
646
646
|
sb = _sb()
|
|
647
647
|
did = _device_id(params["sender_id"], params["channel"], params.get("chat_id"))
|
|
648
|
-
|
|
648
|
+
rpc_params = {
|
|
649
649
|
"p_code": params["code"], "p_device_id": did,
|
|
650
650
|
"p_name": params.get("name"), "p_description": params.get("description"),
|
|
651
651
|
"p_og_image": params.get("og_image"), "p_lat": params.get("lat"),
|
|
652
652
|
"p_lng": params.get("lng"), "p_starts_at": params.get("starts_at"),
|
|
653
653
|
"p_ends_at": params.get("ends_at"),
|
|
654
|
-
}
|
|
654
|
+
}
|
|
655
|
+
if params.get("requires_approval") is not None:
|
|
656
|
+
rpc_params["p_requires_approval"] = params["requires_approval"]
|
|
657
|
+
if params.get("screening_questions") is not None:
|
|
658
|
+
rpc_params["p_screening_questions"] = params["screening_questions"]
|
|
659
|
+
resp = sb.rpc("update_event", rpc_params).execute()
|
|
655
660
|
return _ok(resp.data or {"error": "update failed"})
|
|
656
661
|
|
|
657
662
|
|
package/lib/mcp.js
CHANGED
|
@@ -413,10 +413,12 @@ export async function startMcpServer() {
|
|
|
413
413
|
lng: z.number().optional().describe("New event longitude"),
|
|
414
414
|
starts_at: z.string().optional().describe("New start time ISO"),
|
|
415
415
|
ends_at: z.string().optional().describe("New end time ISO"),
|
|
416
|
+
requires_approval: z.boolean().optional().describe("Require host approval to join"),
|
|
417
|
+
screening_questions: z.array(z.string()).optional().describe("Screening questions for applicants"),
|
|
416
418
|
},
|
|
417
|
-
async ({ code, sender_id, channel, name, description, og_image, lat, lng, starts_at, ends_at }) => {
|
|
419
|
+
async ({ code, sender_id, channel, name, description, og_image, lat, lng, starts_at, ends_at, requires_approval, screening_questions }) => {
|
|
418
420
|
try {
|
|
419
|
-
const result = await updateEvent({ code, device_id: deriveDeviceId(sender_id, channel), name, description, og_image, lat, lng, starts_at, ends_at });
|
|
421
|
+
const result = await updateEvent({ code, device_id: deriveDeviceId(sender_id, channel), name, description, og_image, lat, lng, starts_at, ends_at, requires_approval, screening_questions });
|
|
420
422
|
return jsonResult(result);
|
|
421
423
|
} catch (e) { return jsonResult({ error: e.message }); }
|
|
422
424
|
}
|
package/package.json
CHANGED
package/skill/SKILL.md
CHANGED
|
@@ -366,6 +366,8 @@ Update event info. Only creator or co-host can update.
|
|
|
366
366
|
- `sender_id`, `channel`: from context
|
|
367
367
|
- `chat_id`: REQUIRED for notifications
|
|
368
368
|
- `name`, `description`, `og_image`, `lat`, `lng`, `starts_at`, `ends_at`: all optional for update (only provided fields change, others stay as-is)
|
|
369
|
+
- `requires_approval`: optional boolean — enable/disable approval requirement
|
|
370
|
+
- `screening_questions`: optional string array — update screening questions
|
|
369
371
|
|
|
370
372
|
### `antenna_event_approve`
|
|
371
373
|
Approve a pending participant. Only creator or co-host.
|